mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 01:12:05 +05:00
PAL14122: EDF307: GetInPlace --> COMM_FAILURE. A patch by PKV.
This commit is contained in:
parent
02aab3a5b3
commit
11568f579b
@ -31,7 +31,8 @@ deferred class BuilderShape from GEOMAlgo
|
|||||||
uses
|
uses
|
||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
ListOfShape from TopTools,
|
ListOfShape from TopTools,
|
||||||
MapOfShape from TopTools
|
MapOfShape from TopTools,
|
||||||
|
IndexedDataMapOfShapeListOfShape from TopTools
|
||||||
|
|
||||||
--raises
|
--raises
|
||||||
|
|
||||||
@ -91,9 +92,13 @@ is
|
|||||||
|
|
||||||
PrepareHistory (me:out)
|
PrepareHistory (me:out)
|
||||||
---Purpose: Prepare information for history support
|
---Purpose: Prepare information for history support
|
||||||
is virtual protected;
|
is virtual protected;
|
||||||
|
|
||||||
|
--modified by NIZNHY-PKV Thu Dec 7 11:13:17 2006f
|
||||||
|
ImagesResult(me)
|
||||||
|
returns IndexedDataMapOfShapeListOfShape from TopTools;
|
||||||
|
---C++: return const &
|
||||||
|
--modified by NIZNHY-PKV Thu Dec 7 11:13:20 2006t
|
||||||
fields
|
fields
|
||||||
myShape : Shape from TopoDS is protected;
|
myShape : Shape from TopoDS is protected;
|
||||||
--
|
--
|
||||||
@ -102,6 +107,8 @@ fields
|
|||||||
myHasDeleted : Boolean from Standard is protected;
|
myHasDeleted : Boolean from Standard is protected;
|
||||||
myHasGenerated : Boolean from Standard is protected;
|
myHasGenerated : Boolean from Standard is protected;
|
||||||
myHasModified : Boolean from Standard is protected;
|
myHasModified : Boolean from Standard is protected;
|
||||||
|
--modified by NIZNHY-PKV Thu Dec 7 11:13:10 2006f
|
||||||
|
myImagesResult : IndexedDataMapOfShapeListOfShape from TopTools is protected;
|
||||||
|
--modified by NIZNHY-PKV Thu Dec 7 11:13:13 2006t
|
||||||
end BuilderShape;
|
end BuilderShape;
|
||||||
|
|
||||||
|
@ -115,5 +115,17 @@
|
|||||||
myHasDeleted=Standard_False;
|
myHasDeleted=Standard_False;
|
||||||
myHasGenerated=Standard_False;
|
myHasGenerated=Standard_False;
|
||||||
myHasModified=Standard_False;
|
myHasModified=Standard_False;
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:14:15 2006
|
||||||
|
myImagesResult.Clear();
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:14:17 2006t
|
||||||
}
|
}
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f
|
||||||
|
//=======================================================================
|
||||||
|
//function : ImagesResult
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
|
||||||
|
{
|
||||||
|
return myImagesResult;
|
||||||
|
}
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:57:04 2006t
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// File generated by CPPExt (Value)
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// Copyright (C) 1991 - 2000 by
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// Matra Datavision SA. All rights reserved.
|
||||||
// License as published by the Free Software Foundation; either
|
//
|
||||||
// version 2.1 of the License.
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful
|
// This software may be distributed and/or modified under the terms and
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
// Lesser General Public License for more details.
|
//
|
||||||
//
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
// License along with this library; if not, write to the Free Software
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
//
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// License.
|
||||||
|
|
||||||
#ifndef _GEOMAlgo_BuilderShape_HeaderFile
|
#ifndef _GEOMAlgo_BuilderShape_HeaderFile
|
||||||
#define _GEOMAlgo_BuilderShape_HeaderFile
|
#define _GEOMAlgo_BuilderShape_HeaderFile
|
||||||
@ -32,11 +34,15 @@
|
|||||||
#ifndef _Standard_Boolean_HeaderFile
|
#ifndef _Standard_Boolean_HeaderFile
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
|
||||||
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _GEOMAlgo_Algo_HeaderFile
|
#ifndef _GEOMAlgo_Algo_HeaderFile
|
||||||
#include <GEOMAlgo_Algo.hxx>
|
#include <GEOMAlgo_Algo.hxx>
|
||||||
#endif
|
#endif
|
||||||
class TopoDS_Shape;
|
class TopoDS_Shape;
|
||||||
class TopTools_ListOfShape;
|
class TopTools_ListOfShape;
|
||||||
|
class TopTools_IndexedDataMapOfShapeListOfShape;
|
||||||
|
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
@ -93,6 +99,9 @@ Standard_EXPORT Standard_Boolean HasGenerated() const;
|
|||||||
Standard_EXPORT Standard_Boolean HasModified() const;
|
Standard_EXPORT Standard_Boolean HasModified() const;
|
||||||
|
|
||||||
|
|
||||||
|
Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -117,6 +126,7 @@ TopTools_MapOfShape myMapShape;
|
|||||||
Standard_Boolean myHasDeleted;
|
Standard_Boolean myHasDeleted;
|
||||||
Standard_Boolean myHasGenerated;
|
Standard_Boolean myHasGenerated;
|
||||||
Standard_Boolean myHasModified;
|
Standard_Boolean myHasModified;
|
||||||
|
TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -430,10 +430,33 @@ static
|
|||||||
GEOMAlgo_DataMapOfShapeShapeSet aMSS;
|
GEOMAlgo_DataMapOfShapeShapeSet aMSS;
|
||||||
GEOMAlgo_ShapeSet aSSi;
|
GEOMAlgo_ShapeSet aSSi;
|
||||||
//
|
//
|
||||||
aSB.SetContext(aCtx);
|
//modified by NIZNHY-PKV Wed Dec 6 17:08:03 2006f
|
||||||
|
//
|
||||||
|
// 0. Find same domain solids for non-interferred solids
|
||||||
|
aNbS=aDS.NumberOfShapesOfTheObject();
|
||||||
|
for (i=1; i<=aNbS; ++i) {
|
||||||
|
const TopoDS_Shape& aS=aDS.Shape(i);
|
||||||
|
if (aS.ShapeType()!=TopAbs_SOLID) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!aMFence.Add(aS)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(myDraftSolids.Contains(aS)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
aSSi.Clear();
|
||||||
|
aSSi.Add(aS, TopAbs_FACE);
|
||||||
|
//
|
||||||
|
aMSS.Bind(aS, aSSi);
|
||||||
|
} //for (i=1; i<=aNbS; ++i)
|
||||||
|
//
|
||||||
|
//modified by NIZNHY-PKV Wed Dec 6 17:08:09 2006t
|
||||||
//
|
//
|
||||||
// 1. Build solids for interferred source solids
|
// 1. Build solids for interferred source solids
|
||||||
//
|
//
|
||||||
|
aSB.SetContext(aCtx);
|
||||||
aNbS=myDraftSolids.Extent();
|
aNbS=myDraftSolids.Extent();
|
||||||
for (i=1; i<=aNbS; ++i) {
|
for (i=1; i<=aNbS; ++i) {
|
||||||
const TopoDS_Shape& aS =myDraftSolids.FindKey(i);
|
const TopoDS_Shape& aS =myDraftSolids.FindKey(i);
|
||||||
@ -525,6 +548,8 @@ static
|
|||||||
myImages.Bind(aS, aLSR);
|
myImages.Bind(aS, aLSR);
|
||||||
}
|
}
|
||||||
} // for (i=1; i<=aNbS; ++i) {
|
} // for (i=1; i<=aNbS; ++i) {
|
||||||
|
//modified by NIZNHY-PKV Wed Dec 6 17:07:47 2006f
|
||||||
|
/*
|
||||||
//
|
//
|
||||||
// 2. Find same domain solids for non-interferred solids
|
// 2. Find same domain solids for non-interferred solids
|
||||||
aNbS=aDS.NumberOfShapesOfTheObject();
|
aNbS=aDS.NumberOfShapesOfTheObject();
|
||||||
@ -553,6 +578,8 @@ static
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //for (i=1; i<=aNbS; ++i)
|
} //for (i=1; i<=aNbS; ++i)
|
||||||
|
*/
|
||||||
|
//modified by NIZNHY-PKV Wed Dec 6 17:07:55 2006t
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :FillInternalShapes
|
//function :FillInternalShapes
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_Tools3D.hxx>
|
#include <GEOMAlgo_Tools3D.hxx>
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
void MapShapes(const TopoDS_Shape& aS,
|
void MapShapes(const TopoDS_Shape& aS,
|
||||||
TopTools_MapOfShape& aM);
|
TopTools_MapOfShape& aM);
|
||||||
@ -208,35 +207,61 @@ static
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::PrepareHistory()
|
void GEOMAlgo_Builder::PrepareHistory()
|
||||||
{
|
{
|
||||||
myHistShapes.Clear();
|
|
||||||
myMapShape.Clear();
|
|
||||||
myHasDeleted=Standard_False;
|
|
||||||
myHasGenerated=Standard_False;
|
|
||||||
myHasModified=Standard_False;
|
|
||||||
//
|
|
||||||
if(myShape.IsNull()) {
|
if(myShape.IsNull()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
MapShapes(myShape, myMapShape);
|
|
||||||
//
|
|
||||||
Standard_Boolean bHasImage, bContainsSD;
|
Standard_Boolean bHasImage, bContainsSD;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
TopTools_MapOfShape aMS;
|
TopTools_MapOfShape aMS;
|
||||||
TopTools_ListIteratorOfListOfShape aIt;
|
TopTools_ListIteratorOfListOfShape aIt;
|
||||||
TopTools_MapIteratorOfMapOfShape aItM;
|
TopTools_MapIteratorOfMapOfShape aItM;
|
||||||
//
|
//
|
||||||
|
// 1. Clearing
|
||||||
|
GEOMAlgo_BuilderShape::PrepareHistory();
|
||||||
|
//
|
||||||
|
// 2. myMapShape - all shapes of result with theirs sub-shapes
|
||||||
|
MapShapes(myShape, myMapShape);
|
||||||
|
//
|
||||||
|
// 3. MS - all argument shapes with theirs sub-shapes
|
||||||
aIt.Initialize(myShapes);
|
aIt.Initialize(myShapes);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
const TopoDS_Shape& aSx=aIt.Value();
|
||||||
MapShapes(aS, aMS);
|
MapShapes(aSx, aMS);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
// 4. Treatment
|
||||||
aItM.Initialize(aMS);
|
aItM.Initialize(aMS);
|
||||||
for (; aItM.More(); aItM.Next()) {
|
for (; aItM.More(); aItM.Next()) {
|
||||||
const TopoDS_Shape& aSx=aItM.Key();
|
const TopoDS_Shape& aSx=aItM.Key();
|
||||||
aType=aSx.ShapeType();
|
aType=aSx.ShapeType();
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:34:05 2006f
|
||||||
//
|
//
|
||||||
|
// 4.1 .myImagesResult
|
||||||
|
TopTools_ListOfShape aLSx;
|
||||||
|
//
|
||||||
|
bHasImage=myImages.HasImage(aSx);
|
||||||
|
if (!bHasImage) {
|
||||||
|
if (myMapShape.Contains(aSx)) {
|
||||||
|
aLSx.Append(aSx);
|
||||||
|
myImagesResult.Add(aSx, aLSx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||||
|
aIt.Initialize(aLSp);
|
||||||
|
for (; aIt.More(); aIt.Next()) {
|
||||||
|
const TopoDS_Shape& aSp=aIt.Value();
|
||||||
|
if (myMapShape.Contains(aSp)) {
|
||||||
|
aLSx.Append(aSp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myImagesResult.Add(aSx, aLSx);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:34:10 2006t
|
||||||
|
//
|
||||||
|
// 4.2 As it was
|
||||||
if (!myHasDeleted) {
|
if (!myHasDeleted) {
|
||||||
myHasDeleted=IsDeleted(aSx);//xx
|
myHasDeleted=IsDeleted(aSx);//xx
|
||||||
}
|
}
|
||||||
@ -244,7 +269,9 @@ static
|
|||||||
if (!myHasGenerated || !myHasModified) {
|
if (!myHasGenerated || !myHasModified) {
|
||||||
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
|
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
|
||||||
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||||
bHasImage=myImages.HasImage(aSx);
|
//modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
|
||||||
|
//bHasImage=myImages.HasImage(aSx);
|
||||||
|
//modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
|
||||||
if (bHasImage) {
|
if (bHasImage) {
|
||||||
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||||
aIt.Initialize(aLSp);
|
aIt.Initialize(aLSp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user