mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025938: BRepBuilderAPI_Transform is not thread safe
ModifiedShape() method is made returning shape by value, not by reference.
This commit is contained in:
@@ -110,16 +110,13 @@ is
|
|||||||
returns ListOfShape from TopTools
|
returns ListOfShape from TopTools
|
||||||
is redefined virtual;
|
is redefined virtual;
|
||||||
|
|
||||||
-- Modified by Sergey KHROMOV - Thu Mar 27 17:43:59 2003 Begin
|
|
||||||
ModifiedShape(me; S: Shape from TopoDS)
|
ModifiedShape(me; S: Shape from TopoDS)
|
||||||
returns Shape from TopoDS
|
returns Shape from TopoDS
|
||||||
---Purpose: Returns the modified shape corresponding to <S>.
|
---Purpose: Returns the modified shape corresponding to <S>.
|
||||||
---C++: return const&
|
|
||||||
raises NoSuchObject from Standard
|
raises NoSuchObject from Standard
|
||||||
-- if S is not the initial shape or a sub-shape
|
-- if S is not the initial shape or a sub-shape
|
||||||
-- of the initial shape.
|
-- of the initial shape.
|
||||||
is redefined virtual;
|
is redefined virtual;
|
||||||
-- Modified by Sergey KHROMOV - Thu Mar 27 17:44:02 2003 End
|
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
|
@@ -98,7 +98,7 @@ const TopTools_ListOfShape& BRepBuilderAPI_GTransform::Modified
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
const TopoDS_Shape& BRepBuilderAPI_GTransform::ModifiedShape
|
TopoDS_Shape BRepBuilderAPI_GTransform::ModifiedShape
|
||||||
(const TopoDS_Shape& S) const
|
(const TopoDS_Shape& S) const
|
||||||
{
|
{
|
||||||
const TopTools_DataMapOfShapeListOfShape &aMapModif = myHist.Modification();
|
const TopTools_DataMapOfShapeListOfShape &aMapModif = myHist.Modification();
|
||||||
|
@@ -122,7 +122,6 @@ is
|
|||||||
-- transformation has been applied. Raises NoSuchObject from Standard
|
-- transformation has been applied. Raises NoSuchObject from Standard
|
||||||
-- if S is not the initial shape or a sub-shape
|
-- if S is not the initial shape or a sub-shape
|
||||||
-- of the initial shape.
|
-- of the initial shape.
|
||||||
---C++: return const&
|
|
||||||
raises NoSuchObject from Standard
|
raises NoSuchObject from Standard
|
||||||
|
|
||||||
is virtual;
|
is virtual;
|
||||||
|
@@ -131,7 +131,7 @@ void BRepBuilderAPI_ModifyShape::DoModif (const TopoDS_Shape& S,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
const TopoDS_Shape& BRepBuilderAPI_ModifyShape::ModifiedShape
|
TopoDS_Shape BRepBuilderAPI_ModifyShape::ModifiedShape
|
||||||
(const TopoDS_Shape& S) const
|
(const TopoDS_Shape& S) const
|
||||||
{
|
{
|
||||||
return myModifier.ModifiedShape(S);
|
return myModifier.ModifiedShape(S);
|
||||||
|
@@ -82,7 +82,6 @@ is
|
|||||||
ModifiedShape(me; S: Shape from TopoDS)
|
ModifiedShape(me; S: Shape from TopoDS)
|
||||||
returns Shape from TopoDS
|
returns Shape from TopoDS
|
||||||
---Purpose: Returns the modified shape corresponding to <S>.
|
---Purpose: Returns the modified shape corresponding to <S>.
|
||||||
---C++: return const&
|
|
||||||
raises NoSuchObject from Standard
|
raises NoSuchObject from Standard
|
||||||
-- if S is not the initial shape or a sub-shape
|
-- if S is not the initial shape or a sub-shape
|
||||||
-- of the initial shape.
|
-- of the initial shape.
|
||||||
|
@@ -79,15 +79,13 @@ void BRepBuilderAPI_Transform::Perform(const TopoDS_Shape& S,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
const TopoDS_Shape& BRepBuilderAPI_Transform::ModifiedShape
|
TopoDS_Shape BRepBuilderAPI_Transform::ModifiedShape
|
||||||
(const TopoDS_Shape& S) const
|
(const TopoDS_Shape& S) const
|
||||||
{
|
{
|
||||||
if (myUseModif) {
|
if (myUseModif) {
|
||||||
return myModifier.ModifiedShape(S);
|
return myModifier.ModifiedShape(S);
|
||||||
}
|
}
|
||||||
static TopoDS_Shape SM;
|
return S.Moved (myLocation);
|
||||||
SM = S.Moved (myLocation);
|
|
||||||
return SM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -311,7 +311,7 @@ static Standard_Boolean OCC23774Test(const TopoDS_Face& grossPlateFace, const To
|
|||||||
di << "Not Done1 " << "\n";
|
di << "Not Done1 " << "\n";
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
const TopoDS_Shape& step1ModifiedShape = transformer1.ModifiedShape(originalWire);
|
TopoDS_Shape step1ModifiedShape = transformer1.ModifiedShape(originalWire);
|
||||||
|
|
||||||
BRepExtrema_DistShapeShape distShapeShape1(grossPlateFace,step1ModifiedShape,Extrema_ExtFlag_MIN);
|
BRepExtrema_DistShapeShape distShapeShape1(grossPlateFace,step1ModifiedShape,Extrema_ExtFlag_MIN);
|
||||||
if(!distShapeShape1.IsDone())
|
if(!distShapeShape1.IsDone())
|
||||||
@@ -329,7 +329,7 @@ static Standard_Boolean OCC23774Test(const TopoDS_Face& grossPlateFace, const To
|
|||||||
di << "Not Done1 \n";
|
di << "Not Done1 \n";
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
const TopoDS_Shape& step2ModifiedShape = transformer1.ModifiedShape(step1ModifiedShape);
|
TopoDS_Shape step2ModifiedShape = transformer1.ModifiedShape(step1ModifiedShape);
|
||||||
|
|
||||||
//This is identity matrix for values but for type is gp_Rotation ?!
|
//This is identity matrix for values but for type is gp_Rotation ?!
|
||||||
gp_Trsf2d mirror11 = mirror1;
|
gp_Trsf2d mirror11 = mirror1;
|
||||||
|
@@ -524,7 +524,7 @@ void TNaming::Replicate (const TopoDS_Shape& SH,
|
|||||||
TNaming_Builder Builder2 (L.FindChild(1,Standard_True));
|
TNaming_Builder Builder2 (L.FindChild(1,Standard_True));
|
||||||
for (TopExp_Explorer exp(SH, SST); exp.More(); exp.Next()) {
|
for (TopExp_Explorer exp(SH, SST); exp.More(); exp.Next()) {
|
||||||
const TopoDS_Shape& oldSubShape = exp.Current();
|
const TopoDS_Shape& oldSubShape = exp.Current();
|
||||||
const TopoDS_Shape& newSubShape = opeTrsf.ModifiedShape(oldSubShape);
|
TopoDS_Shape newSubShape = opeTrsf.ModifiedShape(oldSubShape);
|
||||||
Builder2.Generated(oldSubShape, newSubShape);
|
Builder2.Generated(oldSubShape, newSubShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user