ModifiedShape() method is made returning shape by value, not by reference.
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
//purpose :
//=======================================================================
-const TopoDS_Shape& BRepBuilderAPI_GTransform::ModifiedShape
+TopoDS_Shape BRepBuilderAPI_GTransform::ModifiedShape
(const TopoDS_Shape& S) const
{
const TopTools_DataMapOfShapeListOfShape &aMapModif = myHist.Modification();
-- 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;
//purpose :
//=======================================================================
-const TopoDS_Shape& BRepBuilderAPI_ModifyShape::ModifiedShape
+TopoDS_Shape BRepBuilderAPI_ModifyShape::ModifiedShape
(const TopoDS_Shape& S) const
{
return myModifier.ModifiedShape(S);
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.
//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);
}
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())
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;
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);
}
}