1
0
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:
msv
2015-04-10 15:43:21 +03:00
committed by bugmaster
parent 124ee9c962
commit 346cf025a5
8 changed files with 7 additions and 14 deletions

View File

@@ -110,16 +110,13 @@ is
returns ListOfShape from TopTools
is redefined virtual;
-- Modified by Sergey KHROMOV - Thu Mar 27 17:43:59 2003 Begin
ModifiedShape(me; S: Shape from TopoDS)
returns Shape from TopoDS
---Purpose: Returns the modified shape corresponding to <S>.
---C++: return const&
raises NoSuchObject from Standard
-- if S is not the initial shape or a sub-shape
-- of the initial shape.
is redefined virtual;
-- Modified by Sergey KHROMOV - Thu Mar 27 17:44:02 2003 End
fields

View File

@@ -98,7 +98,7 @@ const TopTools_ListOfShape& BRepBuilderAPI_GTransform::Modified
//purpose :
//=======================================================================
const TopoDS_Shape& BRepBuilderAPI_GTransform::ModifiedShape
TopoDS_Shape BRepBuilderAPI_GTransform::ModifiedShape
(const TopoDS_Shape& S) const
{
const TopTools_DataMapOfShapeListOfShape &aMapModif = myHist.Modification();

View File

@@ -122,7 +122,6 @@ is
-- transformation has been applied. Raises NoSuchObject from Standard
-- if S is not the initial shape or a sub-shape
-- of the initial shape.
---C++: return const&
raises NoSuchObject from Standard
is virtual;

View File

@@ -131,7 +131,7 @@ void BRepBuilderAPI_ModifyShape::DoModif (const TopoDS_Shape& S,
//purpose :
//=======================================================================
const TopoDS_Shape& BRepBuilderAPI_ModifyShape::ModifiedShape
TopoDS_Shape BRepBuilderAPI_ModifyShape::ModifiedShape
(const TopoDS_Shape& S) const
{
return myModifier.ModifiedShape(S);

View File

@@ -82,7 +82,6 @@ is
ModifiedShape(me; S: Shape from TopoDS)
returns Shape from TopoDS
---Purpose: Returns the modified shape corresponding to <S>.
---C++: return const&
raises NoSuchObject from Standard
-- if S is not the initial shape or a sub-shape
-- of the initial shape.

View File

@@ -79,15 +79,13 @@ void BRepBuilderAPI_Transform::Perform(const TopoDS_Shape& S,
//purpose :
//=======================================================================
const TopoDS_Shape& BRepBuilderAPI_Transform::ModifiedShape
TopoDS_Shape BRepBuilderAPI_Transform::ModifiedShape
(const TopoDS_Shape& S) const
{
if (myUseModif) {
return myModifier.ModifiedShape(S);
}
static TopoDS_Shape SM;
SM = S.Moved (myLocation);
return SM;
return S.Moved (myLocation);
}

View File

@@ -311,7 +311,7 @@ static Standard_Boolean OCC23774Test(const TopoDS_Face& grossPlateFace, const To
di << "Not Done1 " << "\n";
return Standard_False;
}
const TopoDS_Shape& step1ModifiedShape = transformer1.ModifiedShape(originalWire);
TopoDS_Shape step1ModifiedShape = transformer1.ModifiedShape(originalWire);
BRepExtrema_DistShapeShape distShapeShape1(grossPlateFace,step1ModifiedShape,Extrema_ExtFlag_MIN);
if(!distShapeShape1.IsDone())
@@ -329,7 +329,7 @@ static Standard_Boolean OCC23774Test(const TopoDS_Face& grossPlateFace, const To
di << "Not Done1 \n";
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 ?!
gp_Trsf2d mirror11 = mirror1;

View File

@@ -524,7 +524,7 @@ void TNaming::Replicate (const TopoDS_Shape& SH,
TNaming_Builder Builder2 (L.FindChild(1,Standard_True));
for (TopExp_Explorer exp(SH, SST); exp.More(); exp.Next()) {
const TopoDS_Shape& oldSubShape = exp.Current();
const TopoDS_Shape& newSubShape = opeTrsf.ModifiedShape(oldSubShape);
TopoDS_Shape newSubShape = opeTrsf.ModifiedShape(oldSubShape);
Builder2.Generated(oldSubShape, newSubShape);
}
}