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);
}