}
}
if (Ok) {
- TopoDS_Shape curEdge = SubShapes.FindKey( i );
+ const TopoDS_Shape& curEdge = SubShapes.FindKey( i );
myMapOfEdges.Add(curEdge);
}
}
Standard_Boolean isRedisplayed = Standard_False;
for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
{
- Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
+ const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key();
if (anObj->Type() != theKOI)
{
continue;
continue;
}
- Handle(AIS_GlobalStatus) aStatus = anObjIter.Value();
+ const Handle(AIS_GlobalStatus)& aStatus = anObjIter.Value();
aStatus->SetDisplayMode (theMode);
if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed)
for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next())
{
- const Handle(SelectMgr_SelectableObject) anObject = anIter.Key();
+ const Handle(SelectMgr_SelectableObject)& anObject = anIter.Key();
Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue());
aBndSelected.Add (aTmpBox);
}
/* Loop. The upper limit is the integer value of the logarithm of base 2
*/
/* of NBENTR/NLONGR. */
- i__1 = (integer) (log((real) (*nbentr) / (float)63.) / log((float)2.))
+ i__1 = (integer) (std::log((real) (*nbentr) / (float)63.) / std::log((float)2.))
;
for (ibid = 1; ibid <= i__1; ++ibid) {
//function : isIsoLine
//purpose :
//=============================================================================
-Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
Standard_Boolean& theIsU,
Standard_Real& theParam,
Standard_Boolean& theIsForward) const
//function : buildC3dOnIsoLine
//purpose :
//=============================================================================
-Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
const Standard_Boolean theIsU,
const Standard_Real theParam,
const Standard_Boolean theIsForward)
//! @param theParam Line parameter.
//! @param theIsForward Flag indicating forward parameterization on a isoline.
//! @return Standard_True when 2d curve is a line and Standard_False otherwise.
- Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+ Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
Standard_Boolean& theIsU,
Standard_Real& theParam,
Standard_Boolean& theIsForward) const;
//! @param theParam Line parameter.
//! @param theIsForward Flag indicating forward parameterization on a isoline.
//! @return Standard_True when 3d curve is built and Standard_False otherwise.
- Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
+ Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
const Standard_Boolean theIsU,
const Standard_Real theParam,
const Standard_Boolean theIsForward);
//
aNbF = theMF.Extent();
for (i = 1; i <= aNbF; ++i) {
- TopoDS_Shape aF = theMF(i);
+ const TopoDS_Shape& aF = theMF(i);
TopExp::MapShapesAndAncestors(aF,
TopAbs_EDGE, TopAbs_FACE,
aMEF);
for (Standard_Integer i=1; i<=aNbCurves; i++) {
const IntTools_Curve& anIC=aSCs(i);
- Handle (Geom_Curve) aC3D = anIC.Curve();
+ const Handle (Geom_Curve)& aC3D = anIC.Curve();
if (aC3D.IsNull()) {
di << " has Null 3d curve# " << i << "\n";
DrawTrSurf::Set(nameC, aC3D);
di << nameC << " ";
//
- Handle(Geom2d_Curve) aPC1 = anIC.FirstCurve2d();
- Handle(Geom2d_Curve) aPC2 = anIC.SecondCurve2d();
+ const Handle(Geom2d_Curve)& aPC1 = anIC.FirstCurve2d();
+ const Handle(Geom2d_Curve)& aPC2 = anIC.SecondCurve2d();
//
if (!aPC1.IsNull() || !aPC2.IsNull()) {
di << "(";
return;
}
//
- TopoDS_Shape aSx = aS;
+ const TopoDS_Shape& aSx = aS;
//
anIndex=myShapes.FindIndex(aSx);
if (!anIndex) {
const Standard_Real aP2,
TopoDS_Edge& aNewEdge)
{
- Handle(Geom_Curve) aC=aIC.Curve ();
+ const Handle(Geom_Curve)& aC=aIC.Curve ();
BRepBuilderAPI_MakeEdge aMakeEdge(aC, aV1, aV2, aP1, aP2);
BRepTools_WireExplorer wexp(theWire);
for (; wexp.More(); wexp.Next()) {
- TopoDS_Edge anEdge = wexp.Current();
+ const TopoDS_Edge& anEdge = wexp.Current();
Standard_Real fpar, lpar;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
GeomAdaptor_Curve aGACurve(aCurve);
GeomAbs_CurveType aType = aGACurve.GetType();
- Handle(Geom_Curve) aBasisCurve = aGACurve.Curve();
+ const Handle(Geom_Curve)& aBasisCurve = aGACurve.Curve();
Standard_Boolean isFwd = (wexp.Orientation() != TopAbs_REVERSED);
if (aBasisCurve->IsPeriodic()) {
//purpose :
//=======================================================================
-static Standard_Boolean SamePnt2d(TopoDS_Vertex V,
+static Standard_Boolean SamePnt2d(const TopoDS_Vertex& V,
TopoDS_Edge& E1,
TopoDS_Edge& E2,
TopoDS_Face& F)
//
static Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS);
//
-static void FindExactUVBounds(const TopoDS_Face F,
+static void FindExactUVBounds(const TopoDS_Face& F,
Standard_Real& umin, Standard_Real& umax,
Standard_Real& vmin, Standard_Real& vmax,
const Standard_Real Tol,
//function : FindExactUVBounds
//purpose :
//=======================================================================
-void FindExactUVBounds(const TopoDS_Face FF,
+void FindExactUVBounds(const TopoDS_Face& FF,
Standard_Real& umin, Standard_Real& umax,
Standard_Real& vmin, Standard_Real& vmax,
const Standard_Real Tol,
//=======================================================================
static void Replace ( TopTools_ListOfShape& L,
- const TopoDS_Shape Old,
+ const TopoDS_Shape& Old,
const TopTools_ListOfShape& New)
{
//-----------------------------------
if (!LIG.IsEmpty()) {
if (ModBack.IsBound(S)) {
// Generation de modif => generation du shape initial
- TopoDS_Shape IS = ModBack(S);
+ const TopoDS_Shape& IS = ModBack(S);
StoreImage (Gen,IS,GenBack,LIG);
}
else {
gp_Pln aPln(myMesh->Node(anIdx[0]), aNorm);
BRepBuilderAPI_MakeFace aFaceMaker(aPln, aWire);
- const TopoDS_Face aFace = aFaceMaker.Face();
+ const TopoDS_Face& aFace = aFaceMaker.Face();
aBB.Add(aResult, aFace);
}
for (Standard_Integer i = 1; i <= seqEdges.Length(); i++) {
// Retrieve candidate section
- TopoDS_Shape oedge2 = seqEdges(i);
+ const TopoDS_Shape& oedge2 = seqEdges(i);
if (mySewing) {
// (they have other nearest edges belonging to the work face)
for(Standard_Integer k = 1; k<= seqNotCandidate.Length(); k++) {
Standard_Integer index1 = seqNotCandidate.Value(k);
- TopoDS_Shape edge = sequenceSec.Value(index1);
+ const TopoDS_Shape& edge = sequenceSec.Value(index1);
TopTools_SequenceOfShape tmpSeq;
tmpSeq.Append(edge);
for(Standard_Integer kk = 1; kk <= seqIndCandidate.Length();kk++)
for (i = 1; i <= myBoundFaces.Extent(); i++) {
TopoDS_Shape bound = myBoundFaces.FindKey(i);
for (TopoDS_Iterator itv(bound,Standard_False); itv.More(); itv.Next()) {
- TopoDS_Shape node = itv.Value();
+ const TopoDS_Shape& node = itv.Value();
if (myNodeSections.IsBound(node))
myNodeSections(node).Append(bound);
else {
theReShape->Replace(aSeqNMVert.Value(i),theV2);
continue;
}
- TopoDS_Shape aV = aSeqNMVert.Value(i);
+ const TopoDS_Shape& aV = aSeqNMVert.Value(i);
Standard_Integer j =1;
for( ; j <= aEdParams.Length();j++) {
Standard_Real apar2 = aEdParams.Value(j);
TopTools_MapOfShape mapEdges;
mapEdges.Add(edge);
for (Standard_Integer i = 1; i <= mapVert1.Extent(); i++) {
- TopoDS_Shape node1 = mapVert1.FindKey(i);
+ const TopoDS_Shape& node1 = mapVert1.FindKey(i);
if (!myNodeSections.IsBound(node1)) continue;
TopTools_ListIteratorOfListOfShape ilsec(myNodeSections(node1));
for (; ilsec.More(); ilsec.Next()) {
if (jdist < 0.0) {
// Bind new cutting node (end vertex only)
seqDist.SetValue(indexMin,disProj);
- TopoDS_Shape cvertex = seqVert.Value(indexMin);
+ const TopoDS_Shape& cvertex = seqVert.Value(indexMin);
NodeCuttingVertex.Add(node,cvertex);
}
else {
MapW1.Add( exp1.Current() );
for (exp2.Init( wir2, TopAbs_VERTEX ); exp2.More(); exp2.Next())
{
- TopoDS_Shape V = exp2.Current();
+ const TopoDS_Shape& V = exp2.Current();
if (MapW1.Contains( V ))
CommonVertices.Append( V );
}
{
return;
}
- const TopoDS_Edge anEl = theE.NextEdge(); // the next edge
if (!(BRep_Tool::Tolerance(aVl) > theMaxTol) || theE.NextEdge().IsNull())
{
return;
//gets transition of line <L> passing through/near the edge <e> of faces <f1>, <f2>. <param> is
// a parameter on the edge where the minimum distance between <l> and <e> was found
-static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e,
+static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge& e,
Standard_Real param, const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans);
static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Real param, gp_Dir& OutDir);
//=======================================================================
static Standard_Integer GetTransi(const TopoDS_Face& f1,
const TopoDS_Face& f2,
- const TopoDS_Edge e,
+ const TopoDS_Edge& e,
const Standard_Real param,
const gp_Lin& L,
IntCurveSurface_TransitionOnCurve& trans)
}
}
- inline Standard_Real DistanceInitiale(const TopoDS_Vertex V1,
- const TopoDS_Vertex V2)
+ inline Standard_Real DistanceInitiale(const TopoDS_Vertex& V1,
+ const TopoDS_Vertex& V2)
{
return (BRep_Tool::Pnt(V1).Distance(BRep_Tool::Pnt(V2)));
}
//=======================================================================
static Standard_Boolean IsIn (BRepTopAdaptor_FClass2d& FC,
- Geom2dAdaptor_Curve AC)
+ const Geom2dAdaptor_Curve& AC)
{
Standard_Real Def = 100*Precision::Confusion();
GCPnts_QuasiUniformDeflection QU(AC,Def);
#endif
theGlue.Perform();
if (theGlue.IsDone()) {
- TopoDS_Shape shshs = theGlue.ResultingShape();
+ const TopoDS_Shape& shshs = theGlue.ResultingShape();
// if (BRepOffsetAPI::IsTopologicallyValid(shshs)) {
if (BRepAlgo::IsValid(shshs)) {
UpdateDescendants(theGlue);
const TopoDS_Shape& theSFrom,
const TopoDS_Shape& theSUntil);
-static Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+static Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
const TopoDS_Shape& Until);
static Handle(Geom_Curve) TestCurve(const TopoDS_Face&);
// myPbase.Orientation(TopAbs_FORWARD);
LocOpe_DPrism theDPrism(myPbase,theheight,myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
myGShape = VraiDPrism;
GeneratedShapeValid();
- TopoDS_Shape Base = theDPrism.FirstShape();
+ const TopoDS_Shape& Base = theDPrism.FirstShape();
TopExp_Explorer exp(Base, TopAbs_FACE);
TopoDS_Face theBase = TopoDS::Face(exp.Current());
exp.Next();
Standard_Real Height =
sens*HeightMax(mySbase, mySkface, mySFrom, mySUntil);
LocOpe_DPrism theDPrism(myPbase,Height,myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
if(!Trf) {
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
myGShape = VraiDPrism;
GeneratedShapeValid();
- TopoDS_Shape Base = theDPrism.FirstShape();
+ const TopoDS_Shape& Base = theDPrism.FirstShape();
exp.Init(Base, TopAbs_FACE);
TopoDS_Face theBase = TopoDS::Face(exp.Current());
exp.Next();
UpdateDescendants(trP, trP.Shape(), Standard_False);
TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID);
- TopoDS_Shape Cutsh = ex.Current();
+ const TopoDS_Shape& Cutsh = ex.Current();
if(myFuse == 1) {
BRepAlgoAPI_Fuse f(mySbase, Cutsh);
myShape = f.Shape();
Standard_Real Height =
sens*HeightMax(mySbase, myPbase, mySFrom, mySUntil);
LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
if(!Trff) {
// myPbase.Orientation(TopAbs_FORWARD);
LocOpe_DPrism theDPrism(myPbase, Height, myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
sens*HeightMax(mySbase, mySkface, mySFrom, mySUntil);
LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
if(VraiDPrism.IsNull()) {
NotDone();
myStatusError = BRepFeat_NullRealTool;
Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil);
LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
myGShape = VraiDPrism;
Standard_Integer sens = SensOfPrism(C, mySUntil);
LocOpe_DPrism theDPrism(myPbase,sens*Height,myAngle);
- TopoDS_Shape VraiDPrism = theDPrism.Shape();
+ const TopoDS_Shape& VraiDPrism = theDPrism.Shape();
if(!Trf) { // case face finished
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
myGShape = VraiDPrism;
GeneratedShapeValid();
- TopoDS_Shape Base = theDPrism.FirstShape();
+ const TopoDS_Shape& Base = theDPrism.FirstShape();
exp.Init(Base, TopAbs_FACE);
TopoDS_Face theBase = TopoDS::Face(exp.Current());
exp.Next();
//function : SensOfPrism
//purpose : determine the direction of prism generation
//=======================================================================
-Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
const TopoDS_Shape& Until)
{
LocOpe_CSIntersector ASI1(Until);
const TopoDS_Shape& theSFrom,
const TopoDS_Shape& theSUntil);
-static Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+static Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
const TopoDS_Shape& Until);
static Handle(Geom_Curve) TestCurve(const TopoDS_Shape&,
//construction of prism of height Length
LocOpe_Prism thePrism(myPbase,V);
- TopoDS_Shape VraiPrism = thePrism.Shape();
+ const TopoDS_Shape& VraiPrism = thePrism.Shape();
// management of descendants
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
// construction of long prism
LocOpe_Prism thePrism(myPbase,V);
- TopoDS_Shape VraiPrism = thePrism.Shape();
+ const TopoDS_Shape& VraiPrism = thePrism.Shape();
// in case of support of face Until
if(!Trf) {
UpdateDescendants(trP, trP.Shape(), Standard_False);
//
TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID);
- TopoDS_Shape Cutsh = ex.Current();
+ const TopoDS_Shape& Cutsh = ex.Current();
if (myFuse == 1 && !myJustFeat) {
BRepAlgoAPI_Fuse f(mySbase, Cutsh);
myShape = f.Shape();
gp_Vec V(2*Height*myDir);
LocOpe_Prism thePrism(myPbase,V);
- TopoDS_Shape VraiPrism = thePrism.Shape();
+ const TopoDS_Shape& VraiPrism = thePrism.Shape();
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
gp_Vec Vtra(-3*Height*sens/2.*myDir);
gp_Vec Vect(3*sens*Height*myDir);
LocOpe_Prism thePrism(myPbase,Vect,Vtra);
- TopoDS_Shape VraiPrism = thePrism.Shape();
+ const TopoDS_Shape& VraiPrism = thePrism.Shape();
if(!Trf) { // case face until
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
gp_Vec V(3*Height*myDir);
gp_Vec Vtra(-3*Height/2.*myDir);
LocOpe_Prism thePrism(myPbase,V,Vtra);
- TopoDS_Shape VraiPrism = thePrism.Shape();
+ const TopoDS_Shape& VraiPrism = thePrism.Shape();
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
myGShape = VraiPrism;
Standard_Integer sens = SensOfPrism(C, mySUntil);
gp_Vec V(sens*Length*myDir);
LocOpe_Prism thePrism(myPbase,V);
- TopoDS_Shape VraiPrism = thePrism.Shape();
+ const TopoDS_Shape& VraiPrism = thePrism.Shape();
if(!Trf) {
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
//function : SensOfPrism
//purpose : Direction of the prism depending on the shape Until
//=======================================================================
-Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
+Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C,
const TopoDS_Shape& Until)
{
LocOpe_CSIntersector ASI1(Until);
myGShape = VraiRevol;
GeneratedShapeValid();
- TopoDS_Shape Base = theRevol.FirstShape();
+ const TopoDS_Shape& Base = theRevol.FirstShape();
exp.Init(Base, TopAbs_FACE);
TopoDS_Face theBase = TopoDS::Face(exp.Current());
exp.Next();
myGShape = VraiRevol;
GeneratedShapeValid();
- TopoDS_Shape Base = theRevol.FirstShape();
+ const TopoDS_Shape& Base = theRevol.FirstShape();
exp.Init(Base, TopAbs_FACE);
TopoDS_Face theBase = TopoDS::Face(exp.Current());
exp.Next();
TopTools_DataMapOfShapeShape& theMap)
{
Standard_Boolean GluedFaces = Standard_True;
- TopoDS_Shape VraiRevol = theRevol.Shape();
+ const TopoDS_Shape& VraiRevol = theRevol.Shape();
TColGeom_SequenceOfCurve scur;
theRevol.Curves(theCurves);
}
}
- TopoDS_Edge E = anExp.Current();
- TopoDS_Vertex V = anExp.CurrentVertex();
+ const TopoDS_Edge& E = anExp.Current();
+ const TopoDS_Vertex& V = anExp.CurrentVertex();
if (ndec==0 || BRep_Tool::Degenerated(E)) {
// copy the edge
const TopTools_SequenceOfShape& NewEdges = theEdgeNewEdges(theEdge);
for (Standard_Integer i = 1; i <= NewEdges.Length(); i++)
{
- TopoDS_Shape anEdge = NewEdges(i);
+ const TopoDS_Shape& anEdge = NewEdges(i);
AddNewEdge(anEdge, theEdgeNewEdges, ListNewEdges);
}
}
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itmap(myMap);
for (; itmap.More(); itmap.Next())
{
- TopoDS_Shape anEdge = itmap.Key();
+ const TopoDS_Shape& anEdge = itmap.Key();
TopTools_ListOfShape ListOfNewEdges;
//for each edge of <myMap> find all newest edges
for (WireExp.Init(TopoDS::Wire(FaceExp.Current())); WireExp.More();
WireExp.Next()) {
- TopoDS_Edge CurrentEdge = WireExp.Current();
+ const TopoDS_Edge& CurrentEdge = WireExp.Current();
TopoDS_Vertex VFirst,VLast;
EdgeVertices(CurrentEdge,VFirst,VLast);
B.MakeCompound(Res);
for (; exp.More(); exp.Next()) {
- TopoDS_Shape Sh = exp.Current();
+ const TopoDS_Shape& Sh = exp.Current();
B.MakeSolid(Sol);
B.Add(Sol,Sh);
BRepClass3d_SolidClassifier SC(Sol);
#include <TopoDS_Wire.hxx>
#include <Geom_Surface.hxx>
-static gp_Vec MakeFinVec( const TopoDS_Wire aWire, const TopoDS_Vertex aVertex )
+static gp_Vec MakeFinVec( const TopoDS_Wire& aWire, const TopoDS_Vertex& aVertex )
{
TopoDS_Vertex Vfirst, Vlast, Origin;
BRepTools_WireExplorer Explo( aWire );
}
#endif
- Geom2dAdaptor_Curve Cu1 = TheV;
+ const Geom2dAdaptor_Curve& Cu1 = TheV;
Geom2dAdaptor_Curve Cu2( Line);
Standard_Real TolConf = 0.;
TopoDS_Iterator itws( myWorkSpine );
for (; itws.More(); itws.Next())
{
- TopoDS_Shape aWire = itws.Value();
+ const TopoDS_Shape& aWire = itws.Value();
aSubst.Build( aWire );
if (aSubst.IsCopied(aWire))
{
TopExp_Explorer Explo(result, TopAbs_FACE);
for (; Explo.More(); Explo.Next())
{
- TopoDS_Shape aFace = Explo.Current();
+ const TopoDS_Shape& aFace = Explo.Current();
RebuildTopOrBottomFace(aFace.Reversed(), Standard_True); //top face was reversed
}
/////
TopoDS_Iterator itw(aWire);
for (; itw.More(); itw.Next())
{
- TopoDS_Shape anEdge = itw.Value();
+ const TopoDS_Shape& anEdge = itw.Value();
for (ii = myCurIndexOfSectionEdge; ii <= mySections->ColLength(); ii++)
{
TopoDS_Shape aVisoEdge = mySections->Value(ii, IndexOfSection);
for (; Explo.More(); Explo.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
- TopTools_ListOfShape aNewEdges = Georges.GeneratedShapes(anEdge);
+ const TopTools_ListOfShape& aNewEdges = Georges.GeneratedShapes(anEdge);
myEdgeNewEdges.Bind(anEdge, aNewEdges);
}
}
Sec.Vertex(),
Sec.WithContact(),
Sec.WithCorrection());
- TopoDS_Wire TmpWire = Sec.Wire();
+ const TopoDS_Wire& TmpWire = Sec.Wire();
aTrsf = Place.Transformation();
//Transform the copy
W = TopoDS::Wire(BRepBuilderAPI_Transform(TmpWire, aTrsf, Standard_True));
const Handle(IntTools_Context) aNullCtx;
if (BOPTools_AlgoTools::IsMicroEdge(E, aNullCtx))
{
- TopoDS_Vertex aV = VF;
+ const TopoDS_Vertex& aV = VF;
B.UpdateVertex(aV, P1.Distance(P2));
B.MakeEdge(E);
B.UpdateEdge(E, C2d, S, TopLoc_Location(), Tol);
Standard_Real Tol = Precision::Confusion();
// Standard_Real TolC = 1.e-9;
- Geom2dAdaptor_Curve CBis(Bis);
- Geom2dAdaptor_Curve CAC (AC);
+ const Geom2dAdaptor_Curve& CBis(Bis);
+ const Geom2dAdaptor_Curve& CAC (AC);
//Intersector = Geom2dInt_GInter(CBis, CAC, TolC, Tol);
Intersector = Geom2dInt_GInter(CAC, CBis, Tol, Tol);
Geom2dInt_GInter Intersector;
Standard_Real TolC = Tol;
- Geom2dAdaptor_Curve CBis(Bis);
- Geom2dAdaptor_Curve CAC (AC);
+ const Geom2dAdaptor_Curve& CBis(Bis);
+ const Geom2dAdaptor_Curve& CAC (AC);
Intersector = Geom2dInt_GInter(CAC, CBis, TolC, Tol);
aIt.Initialize(aLP);
for ( ; aIt.More(); aIt.Next()) {
const BOPDS_Pave& aPave = aIt.Value();
- TopoDS_Shape aV = theDS->Shape(aPave.Index());
+ const TopoDS_Shape& aV = theDS->Shape(aPave.Index());
if(aV.IsSame(alonevertices.First())) {
if(!bfound1) {
{
if (aMaxSegment != 0) return aMaxSegment;
- Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface();
- Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve();
+ const Handle(Adaptor3d_Surface)& aSurf = aCurveOnSurface.GetSurface();
+ const Handle(Adaptor2d_Curve2d)& aCurv2d = aCurveOnSurface.GetCurve();
Standard_Real aNbSKnots = 0, aNbC2dKnots = 0;
//function : UpdateVTol
//purpose :
//=======================================================================
-void UpdateVTol(const TopoDS_Vertex theV1, const TopoDS_Vertex& theV2, Standard_Real theTol)
+void UpdateVTol(const TopoDS_Vertex& theV1, const TopoDS_Vertex& theV2, Standard_Real theTol)
{
BRep_Builder aB;
if (!theV1.IsNull())
BRepTools::UVBounds (aFace, anUMin, anUMax, aVMin, aVMax);
BRepTopAdaptor_FClass2d aClassifier (aFace, Precision::Confusion());
- TopLoc_Location aLoc = theFace.Location();
+ const TopLoc_Location& aLoc = theFace.Location();
const gp_Trsf& aTrsf = aLoc.Transformation();
TopLoc_Location aLoc1;
Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1);
// Treatment of the next edges:
for (; anExp.More(); anExp.Next()) {
- TopoDS_Edge anEdge = anExp.Current();
+ const TopoDS_Edge& anEdge = anExp.Current();
anOldNewE.Add(anEdge, anEdge);
C2d = BRep_Tool::CurveOnSurface (anEdge, aFace, UFirst, ULast);
const gp_Vec2d& theRefLinkDir,
const IMeshData::SequenceOfBndB2d& theBoxes,
const IMeshData::SequenceOfInteger& thePolygon,
- const Handle(IMeshData::MapOfInteger) theSkipped,
+ const Handle(IMeshData::MapOfInteger)& theSkipped,
const Standard_Boolean& isSkipLeprous,
IMeshData::MapOfInteger& theLeprousLinks,
IMeshData::MapOfInteger& theDeadLinks,
const gp_Vec2d& theRefLinkDir,
const IMeshData::SequenceOfBndB2d& theBoxes,
const IMeshData::SequenceOfInteger& thePolygon,
- const Handle(IMeshData::MapOfInteger) theSkipped,
+ const Handle(IMeshData::MapOfInteger)& theSkipped,
const Standard_Boolean& isSkipLeprous,
IMeshData::MapOfInteger& theLeprousLinks,
IMeshData::MapOfInteger& theDeadLinks,
static Standard_Integer evaluateMaxSegment(const Adaptor3d_CurveOnSurface& aCurveOnSurface)
{
- Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface();
- Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve();
+ const Handle(Adaptor3d_Surface)& aSurf = aCurveOnSurface.GetSurface();
+ const Handle(Adaptor2d_Curve2d)& aCurv2d = aCurveOnSurface.GetCurve();
Standard_Real aNbSKnots = 0, aNbC2dKnots = 0;
//purpose :
//=======================================================================
-static Standard_Boolean UpdateVertex(TopoDS_Vertex V,
+static Standard_Boolean UpdateVertex(const TopoDS_Vertex& V,
TopoDS_Edge& OE,
TopoDS_Edge& NE,
Standard_Real TolConf)
TopExp_Explorer Exp1, Exp2;
Standard_Boolean bCoincide;
// intersect edges generated from vertex with the edges of the face
- TopoDS_Shape NE3 = Build(Vref);
+ const TopoDS_Shape& NE3 = Build(Vref);
//
for (Exp2.Init(NE3, TopAbs_EDGE); Exp2.More(); Exp2.Next()) {
const TopoDS_Edge& aE3 = *(TopoDS_Edge*)&Exp2.Current();
TopoDS_Wire aWire = TopoDS::Wire(itf.Value());
for (Wexp.Init(aWire, aFace); Wexp.More(); Wexp.Next())
{
- TopoDS_Edge anEdge = Wexp.Current();
+ const TopoDS_Edge& anEdge = Wexp.Current();
if (BRep_Tool::Degenerated(anEdge))
continue;
const BRepOffset_ListOfInterval& Lint = Analyser.Type(anEdge);
//purpose : Particular case of Curve On Surface.
//=======================================================================
-static void ComputeCurve3d(TopoDS_Edge Edge,
+static void ComputeCurve3d(const TopoDS_Edge& Edge,
const Handle(Geom2d_Curve)& Curve,
const Handle(Geom_Surface)& Surf,
- const TopLoc_Location Loc,
+ const TopLoc_Location& Loc,
Standard_Real Tol)
{
// try to find the particular case
//=======================================================================
static Standard_Boolean IsInOut (BRepTopAdaptor_FClass2d& FC,
- Geom2dAdaptor_Curve AC,
+ const Geom2dAdaptor_Curve& AC,
const TopAbs_State& S )
{
Standard_Real Def = 100*Precision::Confusion();
wit.Initialize( CurFace );
for (; wit.More(); wit.Next())
{
- TopoDS_Shape aWire = wit.Value();
+ const TopoDS_Shape& aWire = wit.Value();
if (! aWire.IsSame( CurWire ))
{
TColgp_SequenceOfPnt pts;
TopTools_DataMapIteratorOfDataMapOfShapeShape itve (VEmap);
for (; itve.More (); itve.Next ())
{
- TopoDS_Shape V = itve.Key ();
- TopoDS_Shape E = itve.Value ();
+ const TopoDS_Shape& V = itve.Key ();
+ const TopoDS_Shape& E = itve.Value ();
TopoDS_Shape W;
for (i = 1; i <= Eseq.Length (); i++)
{
eit.Initialize (aWire, Standard_False);
for (; eit.More (); eit.Next ())
{
- TopoDS_Shape anEdge = eit.Value ();
+ const TopoDS_Shape& anEdge = eit.Value ();
BB.Add (CurWire, anEdge);
}
if (aSub.IsCopied (CurFace))
Standard_Integer aSign = 1;
TopoDS_Vertex Vfirst, Vlast;
TopExp::Vertices(anEdge, Vfirst, Vlast);
- TopTools_ListOfShape aNewEdges = Georges.GeneratedShapes(anEdge);
+ const TopTools_ListOfShape& aNewEdges = Georges.GeneratedShapes(anEdge);
TColStd_ListOfInteger IList;
aWorkingSection = TopoDS::Wire(WorkingSections(ii));
Standard_Integer NbNewEdges = aNewEdges.Extent();
// Note: it is necessary to create copy of wire to avoid adding new pcurves into it
Handle(BRepTools_TrsfModification) Trsf = new BRepTools_TrsfModification(T);
BRepTools_Modifier Modif (Wire, Trsf);
- TopoDS_Shape WireBase = Modif.ModifiedShape(Wire);
+ const TopoDS_Shape& WireBase = Modif.ModifiedShape(Wire);
// Creation of a cylindrical surface
BRepSweep_Prism CylSurf (WireBase, Vsup, Standard_False);
std::cout<<"Error: failed to find a face for the wire "<<a[2]<<std::endl;
return 1; //TCL_ERROR
}
- TopoDS_Face aFace = aFaceMaker.Face();
+ const TopoDS_Face& aFace = aFaceMaker.Face();
TopoDS_Iterator anIter (aFace);
TopoDS_Wire aWire = TopoDS::Wire (anIter.Value());
aResult = BRepAlgo::ConvertWire (aWire, aTol, aFace);
if ( TE.More()) {
BRepTools_WireExplorer WE;
for ( WE.Init(mywire); WE.More(); WE.Next()) {
- TopoDS_Edge E = WE.Current();
+ const TopoDS_Edge& E = WE.Current();
if (E.IsNull()) {
AddWarning(mywire, "an Edge is a null entity");
}
//=============================================================================
Standard_Integer BRepToIGESBRep_Entity::IndexVertex(const TopoDS_Vertex& myvertex) const
{
- TopoDS_Shape V = myvertex;
+ const TopoDS_Shape& V = myvertex;
return myVertices.FindIndex(V);
}
{
if ( myvertex.IsNull()) return 0;
- TopoDS_Shape V = myvertex;
+ const TopoDS_Shape& V = myvertex;
Standard_Integer index = myVertices.FindIndex(V);
if (index == 0) {
index = myVertices.Add(V);
//=============================================================================
Standard_Integer BRepToIGESBRep_Entity::IndexEdge(const TopoDS_Edge& myedge) const
{
- TopoDS_Shape E = myedge;
+ const TopoDS_Shape& E = myedge;
return myEdges.FindIndex(E);
}
{
if ( myedge.IsNull()) return 0;
- TopoDS_Shape E = myedge;
+ const TopoDS_Shape& E = myedge;
Handle(IGESData_IGESEntity) C = mycurve3d;
Standard_Integer index = myEdges.FindIndex(E);
if (index == 0) {
TopExp_Explorer TE(mywire, TopAbs_VERTEX);
if ( TE.More()) {
for ( WE.Init(mywire,myface); WE.More(); WE.Next()) {
- TopoDS_Edge E = WE.Current();
+ const TopoDS_Edge& E = WE.Current();
if (E.IsNull()) {
AddWarning(mywire, "an Edge is a null entity");
}
Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE,
const Handle(Geom_Curve)& C3d,
- const Handle(Geom2d_Curve) C2d,
+ const Handle(Geom2d_Curve)& C2d,
const Handle(Geom_Surface)& S,
const Standard_Real f,
const Standard_Real l)
//! Method returns actual tolerance of edge
Standard_EXPORT static Standard_Real EvalAndUpdateTol(const TopoDS_Edge& theE,
const Handle(Geom_Curve)& theC3d,
- const Handle(Geom2d_Curve) theC2d,
+ const Handle(Geom2d_Curve)& theC2d,
const Handle(Geom_Surface)& theS,
const Standard_Real theF,
const Standard_Real theL);
// itm.More(); ) {
if(!M.IsBound(aexp.Current()))
continue;
- TopoDS_Shape ae = aexp.Current();
+ const TopoDS_Shape& ae = aexp.Current();
TopoDS_Shape as = M.Find(ae);
if (as.IsSame(oldShell)) {
// update the orientation of free edges in SH.
// apply recorded modifications to subshapes
Standard_Boolean isEmpty = Standard_True;
for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) {
- TopoDS_Shape sh = it.Value();
+ const TopoDS_Shape& sh = it.Value();
newsh = Apply ( sh, until );
if ( newsh != sh ) {
if ( myStatus & EncodeStatus(4)) //ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) )
}
Standard_Integer nitems = 0;
for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
- TopoDS_Shape subsh = subit.Value();
+ const TopoDS_Shape& subsh = subit.Value();
if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );//fix for SAMTECH bug OCC322 about abcense internal vertices after sewing.
else locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
}
//purpose :
//=======================================================================
-static void KPartCurve3d(TopoDS_Edge Edge,
+static void KPartCurve3d(const TopoDS_Edge& Edge,
Handle(Geom2d_Curve) Curve,
Handle(Geom_Surface) Surf)
{
exp.Init(Shells,TopAbs_SHELL);
for (; exp.More(); exp.Next()) {
// CurS = the current Shell.
- const TopoDS_Shape CurS = exp.Current();
+ const TopoDS_Shape& CurS = exp.Current();
TopExp_Explorer exp2(CurS, TopAbs_FACE);
for (; exp2.More(); exp2.Next()) {
// CurF = the current face of the current Shell.
- const TopoDS_Shape CurF = exp2.Current();
+ const TopoDS_Shape& CurF = exp2.Current();
for ( i = 1; i <= NbFaces; i++) {
const TopoDS_Shape& Center = myCenters(i);
const Standard_Real Tol,
const Standard_Boolean ComunElement)
{
- Handle(Geom2d_Curve) Bis1 = CBis1;
- Handle(Geom2d_Curve) Bis2 = CBis2;
+ const Handle(Geom2d_Curve)& Bis1 = CBis1;
+ const Handle(Geom2d_Curve)& Bis2 = CBis2;
Handle(Standard_Type) Type1 = Bis1->DynamicType();
Handle(Standard_Type) Type2 = Bis2->DynamicType();
void CDM_Document::SetRequestedFolder(const TCollection_ExtendedString& aFolder)
{
- TCollection_ExtendedString f(aFolder);
+ const TCollection_ExtendedString& f = aFolder;
if(f.Length() != 0) {
myRequestedFolderIsDefined=Standard_True;
myRequestedFolder=aFolder;
//purpose :
//=======================================================================
-TCollection_ExtendedString GetResource (const TCollection_ExtendedString aFormat,
- const TCollection_ExtendedString anItem)
+TCollection_ExtendedString GetResource (const TCollection_ExtendedString& aFormat,
+ const TCollection_ExtendedString& anItem)
{
TCollection_ExtendedString theResource;
theResource+= aFormat;
p = BRep_Tool::Pnt(v2);
}
- GeomAdaptor_Curve cc = c.Curve();
+ const GeomAdaptor_Curve& cc = c.Curve();
if (p.Distance(c.Value(first)) <= Precision::Confusion()) {
GCPnts_AbscissaPoint computePoint(cc, D, first);
Param = computePoint.Parameter();
if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), Precision::Angular()))
return Standard_True;
}
- Handle(Geom2d_Curve) aCurve = theCurve;
+ const Handle(Geom2d_Curve)& aCurve = theCurve;
for(a = anInter.NbSegments(); a > 0; a--)
{
//anInter.Segment(a, aCurve); //not implemented (bug in OCC)
Standard_Real par = 0.691254*first + 0.308746*last;
gp_Pnt pt, pt1, pt2; gp_Vec tgE, tgE1, tgE2, ns1, ns2, dint1, dint2;
- TopoDS_Face F1 = S1.Face();
- TopoDS_Face F2 = S2.Face();
+ const TopoDS_Face& F1 = S1.Face();
+ const TopoDS_Face& F2 = S2.Face();
//F1.Orientation(TopAbs_FORWARD);
//F2.Orientation(TopAbs_FORWARD);
if (letype == TopAbs_SHELL){
TopExp_Explorer expsh2(its.Value(),TopAbs_SHELL);
const TopoDS_Shape& cursh = expsh2.Current();
- TopoDS_Shape tt = cursh;
B1.Add(myShapeResult,cursh);
its.Next();
}
{
TopoDS_Edge OffsetEdge;
- TopoDS_Face F1 = S1.Face();
- TopoDS_Face F2 = S2.Face();
+ const TopoDS_Face& F1 = S1.Face();
+ const TopoDS_Face& F2 = S2.Face();
Handle(Geom_Surface) GS1 = BRep_Tool::Surface(F1);
Handle(Geom_Surface) TrGS1 =
new Geom_RectangularTrimmedSurface(GS1,
//
//=======================================================================
-static void CompParam(Geom2dAdaptor_Curve Carc,
+static void CompParam(const Geom2dAdaptor_Curve& Carc,
Handle(Geom2d_Curve) Ctg,
Standard_Real& parc,
Standard_Real& ptg,
static Standard_Boolean CompBlendPoint(const TopoDS_Vertex& V,
const TopoDS_Edge& E,
const Standard_Real W,
- const TopoDS_Face F1,
- const TopoDS_Face F2,
+ const TopoDS_Face& F1,
+ const TopoDS_Face& F2,
Blend_Point& BP)
{
gp_Pnt2d P1, P2;
//purpose : calcule a batten between curves 2d curv2d1 and curv2d2 at points p2d1 and p2d2
//=======================================================================
-static void CalculBatten (const Handle (GeomAdaptor_Surface) ASurf,
- const TopoDS_Face Face ,
+static void CalculBatten (const Handle (GeomAdaptor_Surface)& ASurf,
+ const TopoDS_Face& Face ,
const Standard_Real xdir,
const Standard_Real ydir,
const gp_Pnt2d & p2d1,
const Standard_Boolean isFirst,
const Standard_Integer ons,
const Standard_Real pitol,
- const TopoDS_Vertex bout)
+ const TopoDS_Vertex& bout)
{
Standard_Integer opp = 3 - ons;
setProp(Sh, a, n);
for (ex.Init (Sh,TopAbs_VERTEX); ex.More(); ex.Next()) {
- TopoDS_Shape S = ex.Current();
+ const TopoDS_Shape& S = ex.Current();
setProp(S, a, n);
}
for (ex.Init (Sh,TopAbs_EDGE); ex.More(); ex.Next()) {
- TopoDS_Shape S = ex.Current();
+ const TopoDS_Shape& S = ex.Current();
setProp(S, a, n);
}
for (ex.Init (Sh,TopAbs_FACE); ex.More(); ex.Next()) {
- TopoDS_Shape S = ex.Current();
+ const TopoDS_Shape& S = ex.Current();
setProp(S, a, n);
}
// std::cout<<"\tSource Attribute dynamic type = "<<itr.Value()->DynamicType()<<std::endl;
const TDF_AttributeMap& attMap = ds1->Attributes(); //attMap
for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
- Handle(TDF_Attribute) sAtt = attMItr.Key();
+ const Handle(TDF_Attribute)& sAtt = attMItr.Key();
// std::cout<<"\t\tSource references attribute dynamic type = "<<sAtt->DynamicType()<<std::endl;
for (TDF_AttributeIterator itr2(TARGET); itr2.More(); itr2.Next()) {
itr2.Value()->References(ds2);
// std::cout<<"\t\t\tTARGET attribute dynamic type = "<<itr2.Value()->DynamicType()<<std::endl;
const TDF_AttributeMap& attMap2 = ds2->Attributes(); //attMap
for (TDF_MapIteratorOfAttributeMap attMItr2(attMap2);attMItr2.More(); attMItr2.Next()) {
- Handle(TDF_Attribute) tAtt = attMItr2.Key();
+ const Handle(TDF_Attribute)& tAtt = attMItr2.Key();
// std::cout<<"\t\t\t\tTarget reference attribute dynamic type = "<<tAtt->DynamicType()<<std::endl;
if (tAtt->IsInstance(sAtt->DynamicType()))
if(tAtt == sAtt) {
di<<"\tSource Attribute dynamic type = " << itr.Value()->DynamicType()->Name() << "\n";
const TDF_AttributeMap& attMap = ds1->Attributes(); //attMap
for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
- Handle(TDF_Attribute) sAtt = attMItr.Key();
+ const Handle(TDF_Attribute)& sAtt = attMItr.Key();
TCollection_AsciiString entry;
TDF_Tool::Entry(sAtt->Label(), entry);
//std::cout<<"\t\tReferences attribute dynamic type = "<<sAtt->DynamicType()<<",\tLabel = "<<entry<<std::endl;
const TColStd_DataMapOfStringInteger& aMap = anAtt->GetIntegersContainer();
TColStd_DataMapIteratorOfDataMapOfStringInteger itr(aMap);
for (; itr.More(); itr.Next()){
- TCollection_ExtendedString aKey(itr.Key());
+ const TCollection_ExtendedString& aKey(itr.Key());
Standard_Integer aValue = itr.Value();
di << "Key = " << aKey << " Value = " << aValue << "\n";
}
const TDataStd_DataMapOfStringReal& aMap = anAtt->GetRealsContainer();
TDataStd_DataMapIteratorOfDataMapOfStringReal itr(aMap);
for (; itr.More(); itr.Next()){
- TCollection_ExtendedString aKey(itr.Key());
+ const TCollection_ExtendedString& aKey(itr.Key());
Standard_Real aValue = itr.Value();
di << "Key = " << aKey << " Value = " << aValue << "\n";
}
TDataStd_DataMapIteratorOfDataMapOfStringByte itr(aMap);
for (; itr.More(); itr.Next())
{
- TCollection_ExtendedString aKey(itr.Key());
+ const TCollection_ExtendedString& aKey(itr.Key());
Standard_Byte aValue = itr.Value();
std::cout << "Key = " << aKey << " Value = " <<aValue<<std::endl;
}
const TDataStd_DataMapOfStringHArray1OfInteger& aMap = anAtt->GetArraysOfIntegersContainer();
TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger itr(aMap);
for (; itr.More(); itr.Next()){
- TCollection_ExtendedString aKey(itr.Key());
+ const TCollection_ExtendedString& aKey(itr.Key());
std::cout << "Key = " << aKey<< std::endl;
- Handle(TColStd_HArray1OfInteger) anArrValue = itr.Value();
+ const Handle(TColStd_HArray1OfInteger)& anArrValue = itr.Value();
if(!anArrValue.IsNull()) {
Standard_Integer lower = anArrValue->Lower();
Standard_Integer upper = anArrValue->Upper();
const TDataStd_DataMapOfStringHArray1OfReal& aMap = anAtt->GetArraysOfRealsContainer();
TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal itr(aMap);
for (; itr.More(); itr.Next()){
- TCollection_ExtendedString aKey(itr.Key());
+ const TCollection_ExtendedString& aKey(itr.Key());
std::cout << "Key = " << aKey << std::endl;
- Handle(TColStd_HArray1OfReal) anArrValue = itr.Value();
+ const Handle(TColStd_HArray1OfReal)& anArrValue = itr.Value();
if(!anArrValue.IsNull()) {
Standard_Integer lower = anArrValue->Lower();
Standard_Integer upper = anArrValue->Upper();
StdObjMgt_TransientPersistentMap aMap;
for (Standard_Integer i = 1; i <= aShapes.Length(); ++i)
{
- TopoDS_Shape aShape = aShapes.Value(i);
+ const TopoDS_Shape& aShape = aShapes.Value(i);
Handle(ShapePersistent_TopoDS::HShape) aPShape =
ShapePersistent_TopoDS::Translate(aShape, aMap, ShapePersistent_WithTriangle);
const TCollection_AsciiString& aVendorName = aVendorIter.Key();
if (!theVendorPriority.Contains(aVendorName))
{
- Handle(DE_ConfigurationNode) aNode = aVendorIter.Value();
+ const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value();
if (theToDisable)
{
aNode->SetEnabled(Standard_False);
TopExp_Explorer anEx(S,TopAbs_EDGE); // mpv: new explorer iterator because we need keep edges order
for(;anEx.More();anEx.Next()) {
Standard_Boolean aC0 = Standard_False;
- TopoDS_Shape anEdge1 = anEx.Current();
+ const TopoDS_Shape& anEdge1 = anEx.Current();
if (edgeNaborFaces.IsBound(anEdge1)) {
const TopTools_ListOfShape& aList1 = edgeNaborFaces.Find(anEdge1);
if (aList1.Extent()<2) continue; // mpv (06.09.2002): these edges already was loaded
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itr(edgeNaborFaces);
for (; itr.More(); itr.Next()) {
- TopoDS_Shape anEdge2 = itr.Key();
+ const TopoDS_Shape& anEdge2 = itr.Key();
if(anEdgesToDelete.Contains(anEdge2)) continue;
if (anEdge1.IsSame(anEdge2)) continue;
const TopTools_ListOfShape& aList2 = itr.Value();
gp_Ax1& theAxis)
{
// Find surface
- TopLoc_Location aLocation = theShape.Location();
Handle(Geom_Plane) aPlane;
if (theShape.ShapeType() == TopAbs_FACE) {
TopExp_Explorer anExpE(theShape, TopAbs_EDGE);
for(; anExpE.More(); anExpE.Next()) {
- Handle(BRepCheck_Result) aResult = theAnalyzer.Result(anExpE.Current());
+ const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(anExpE.Current());
if(aResult.IsNull() || theMap.Contains(anExpE.Current()))
continue;
}
}
else if(theShape.ShapeType() == TopAbs_EDGE) {
- Handle(BRepCheck_Result) aResult = theAnalyzer.Result(theShape);
+ const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(theShape);
itl.Initialize(aResult->Status());
for(; itl.More(); itl.Next()) {
if(FindOtherErrors(anIt.Value(), theAnalyzer, theMap))
return Standard_True;
}
- Handle(BRepCheck_Result) aResult = theAnalyzer.Result(theShape);
+ const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(theShape);
if (!aResult.IsNull()) {
TopExp_Explorer anExpE(anExpF.Current(), TopAbs_EDGE);
for(; anExpE.More(); anExpE.Next()) {
- Handle(BRepCheck_Result) aResultE = theAnalyzer.Result(anExpE.Current());
+ const Handle(BRepCheck_Result)& aResultE = theAnalyzer.Result(anExpE.Current());
if(aResultE.IsNull())
continue;
if(aNode.IsNull())
aNode = TDataStd_TreeNode::Set(Obj->Label());
aNode->Remove();
- Handle(TDataStd_UAttribute) aContainer = ContextObj;
+ const Handle(TDataStd_UAttribute)& aContainer = ContextObj;
if(aContainer->Label().FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), RNode))
RNode->Append(aNode);
TDataStd_Name::Set(Obj->Label(), "Auxiliary_Object");
#endif
TDF_Tool::OutReferences(aLabel,anExtMap);
for (TDF_MapIteratorOfAttributeMap attMItr(anExtMap);attMItr.More(); attMItr.Next()) {
- Handle(TDF_Attribute) att = attMItr.Key();
+ const Handle(TDF_Attribute)& att = attMItr.Key();
#ifdef OCCT_DEBUG_SELN
TDF_Tool::Entry(att->Label(), entr1);
std::cout<<"## References attribute dynamic type = "<<att->DynamicType()<<" at Label = "<<entr1 <<std::endl;
DNaming_DataMapIteratorOfDataMapOfShapeOfName itrn(aDMapOfShapeOfName);
for(;itrn.More();itrn.Next()) {
- TCollection_AsciiString name = itrn.Value();
+ const TCollection_AsciiString& name = itrn.Value();
const TopoDS_Shape Result = TR.Copied(itrn.Key());
DBRep::Set(name.ToCString(), Result);
di.AppendElement(name.ToCString());
{
for (i = 1; i <= i2s.NbLines(); i++)
{
- Handle( Geom_Curve ) aCurve = i2s.Line(i);
+ const Handle( Geom_Curve )& aCurve = i2s.Line(i);
gp_Pnt Pnt = aCurve->Value( aCurve->FirstParameter() );
GeomAPI_ProjectPointOnSurf projector( Pnt, S1, Precision::Confusion() );
Standard_Real U, V;
for (Standard_Integer j = 1; j <= aMapExtent; ++j)
{
TCollection_AsciiString aValue;
- const TCollection_AsciiString aResource = theMap.FindKey (j);
+ const TCollection_AsciiString& aResource = theMap.FindKey (j);
if (theResMgr->Find (aResource, aValue))
{
#ifdef OCCT_DEBUG
const Standard_Integer aMapExtent = aMap.Extent();
for (Standard_Integer aResIter = 1; aResIter <= aMapExtent; ++aResIter)
{
- const TCollection_AsciiString aResource = aMap.FindKey (aResIter);
+ const TCollection_AsciiString& aResource = aMap.FindKey (aResIter);
#ifdef OCCT_DEBUG
std::cout << "aResource = " << aResource << std::endl;
#endif
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = C2.GetType();
GeomAbs_CurveType Type3 = OnCurve.GetType();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) CC2 = C2.Curve();
- Handle(Geom2d_Curve) Con = OnCurve.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC2 = C2.Curve();
+ const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
//=============================================================================
// Appel a GccAna. +
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type3 = OnCurve.GetType();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) Con = OnCurve.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
//=============================================================================
// Appel a GccAna. +
parcen3(1,8)
{
GeomAbs_CurveType Type3 = OnCurve.GetType();
- Handle(Geom2d_Curve) Con = OnCurve.Curve();
+ const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
//=============================================================================
// Appel a GccAna. +
else {
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) CC2 = C2.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC2 = C2.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = C2.GetType();
if (Radius < 0.) { throw Standard_NegativeValue(); }
else {
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
Geom2dAdaptor_Curve C3 = Qualified3.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) CC2 = C2.Curve();
- Handle(Geom2d_Curve) CC3 = C3.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC2 = C2.Curve();
+ const Handle(Geom2d_Curve)& CC3 = C3.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = C2.GetType();
GeomAbs_CurveType Type3 = C3.GetType();
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) CC2 = C2.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC2 = C2.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = C2.GetType();
pararg3(1,16)
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
pararg1(1,2)
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = OnCurve.GetType();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) Con = OnCurve.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
//=============================================================================
// Appel a GccAna. +
else {
gp_Pnt2d point1(Point1->Pnt2d());
GeomAbs_CurveType Type2 = OnCurve.GetType();
- Handle(Geom2d_Curve) Con = OnCurve.Curve();
+ const Handle(Geom2d_Curve)& Con = OnCurve.Curve();
//=============================================================================
// Appel a GccAna. +
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) CC2 = C2.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC2 = C2.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = C2.GetType();
pararg2(1,2)
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
- Handle(Geom2d_Curve) CC2 = C2.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC2 = C2.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
GeomAbs_CurveType Type2 = C2.GetType();
pararg2(1,2)
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
pararg2(1,2)
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
pararg2(1,2)
{
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
- Handle(Geom2d_Curve) CC1 = C1.Curve();
+ const Handle(Geom2d_Curve)& CC1 = C1.Curve();
GeomAbs_CurveType Type1 = C1.GetType();
//=============================================================================
Standard_Real GeomConvert_SurfToAnaSurf::ComputeGap(const Handle(Geom_Surface)& theSurf,
const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
- const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol)
+ const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol)
{
GeomAdaptor_Surface aGAS(theNewSurf);
GeomAbs_SurfaceType aSType = aGAS.GetType();
static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf,
const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
- const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast());
+ const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol = RealLast());
Standard_Boolean no_sing = Standard_True;
Seq2.Clear();
- Handle(Geom_Curve) C1 = Seq1.Value(1);
+ const Handle(Geom_Curve)& C1 = Seq1.Value(1);
Standard_Real f = C1->FirstParameter(), l = C1->LastParameter();
Standard_Integer iP, NP = 21;
TColgp_Array1OfPnt Tab(1,NP);
for (Standard_Integer iseq=2; iseq<=Seq1.Length(); iseq++) {
// discretisation de C2
- Handle(Geom_Curve) C2 = Seq1.Value(iseq);
+ const Handle(Geom_Curve)& C2 = Seq1.Value(iseq);
f = C2->FirstParameter();
l = C2->LastParameter();
u = f;
//function : isIsoLine
//purpose :
//=============================================================================
-Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
+Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
Standard_Boolean& theIsU,
Standard_Real& theParam,
Standard_Boolean& theIsForward)
//function : buildC3dOnIsoLine
//purpose :
//=============================================================================
-Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
- const Handle(Adaptor3d_Surface) theSurf,
+Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
+ const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theFirst,
const Standard_Real theLast,
const Standard_Real theTolerance,
//! @param theParam Line parameter.
//! @param theIsForward Flag indicating forward parameterization on a isoline.
//! @return Standard_True when 2d curve is a line and Standard_False otherwise.
- Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
+ Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
Standard_Boolean& theIsU,
Standard_Real& theParam,
Standard_Boolean& theIsForward);
//! @param theParam Line parameter.
//! @param theIsForward Flag indicating forward parameterization on a isoline.
//! @return Standard_True when 3d curve is built and Standard_False otherwise.
- Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D,
- const Handle(Adaptor3d_Surface) theSurf,
+ Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D,
+ const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theFirst,
const Standard_Real theLast,
const Standard_Real theTolerance,
done = Standard_False;
return;
}
- Handle(StepGeom_Surface) StepSurf = mkSurf.Value();
+ const Handle(StepGeom_Surface)& StepSurf = mkSurf.Value();
Standard_Real U1,U2,V1,V2;
RTSurf->Bounds(U1, U2, V1, V2);
if (anApprox.IsDone())
{
- Handle(Geom_BSplineSurface) S = anApprox.Surface();
+ const Handle(Geom_BSplineSurface)& S = anApprox.Surface();
DrawTrSurf::Set(a[1], S);
di << a[1];
}
}
if (anApprox.IsDone())
{
- Handle(Geom_BSplineSurface) S = anApprox.Surface();
+ const Handle(Geom_BSplineSurface)& S = anApprox.Surface();
DrawTrSurf::Set(a[1], S);
di << a[1];
}
1.0e-5) ;
anInterpolator.Perform() ;
if (anInterpolator.IsDone()) {
- Handle(Geom_BSplineCurve) C =
+ const Handle(Geom_BSplineCurve)& C =
anInterpolator.Curve();
DrawTrSurf::Set(a[1], C);
}
1.0e-5);
a2dInterpolator.Perform() ;
if (a2dInterpolator.IsDone()) {
- Handle(Geom2d_BSplineCurve) C = a2dInterpolator.Curve() ;
+ const Handle(Geom2d_BSplineCurve)& C = a2dInterpolator.Curve() ;
DrawTrSurf::Set(a[1], C);
}
}
for (Graphic3d_MapOfStructure::Iterator aDispStructIter (myStructsDisplayed); aDispStructIter.More(); aDispStructIter.Next())
{
- Handle(Graphic3d_Structure) aStruct = aDispStructIter.Key();
+ const Handle(Graphic3d_Structure)& aStruct = aDispStructIter.Key();
const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual());
if (anAnswer != Graphic3d_TOA_COMPUTE)
{
// function : Graphic3d_CubeMapOrder
// purpose :
// =======================================================================
-Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder)
+Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder)
:
myConvolution (theOrder.Order.myConvolution),
myHasOverflows (theOrder.Order.myHasOverflows)
// function : Permute
// purpose :
// =======================================================================
-Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCubeMapOrder thePermutation)
+Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (const Graphic3d_ValidatedCubeMapOrder& thePermutation)
{
for (unsigned char i = 0; i < 6; ++i)
{
// function : Permuted
// purpose :
// =======================================================================
-Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (Graphic3d_ValidatedCubeMapOrder thePermutation) const
+Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (const Graphic3d_ValidatedCubeMapOrder& thePermutation) const
{
Graphic3d_CubeMapOrder anOrder = *this;
anOrder.Permute (thePermutation);
unsigned char theNegZLocation);
//! Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder.
- Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder);
+ Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder);
//! Alias of 'operator='.
Standard_EXPORT Graphic3d_CubeMapOrder& Set (const Graphic3d_CubeMapOrder& theOrder);
Standard_EXPORT Graphic3d_CubeMapOrder& SetDefault();
//! Applies another cubemap order as permutation for the current one.
- Standard_EXPORT Graphic3d_CubeMapOrder& Permute (Graphic3d_ValidatedCubeMapOrder anOrder);
+ Standard_EXPORT Graphic3d_CubeMapOrder& Permute (const Graphic3d_ValidatedCubeMapOrder& anOrder);
//! Returns permuted by other cubemap order copy of current one.
- Standard_EXPORT Graphic3d_CubeMapOrder Permuted (Graphic3d_ValidatedCubeMapOrder anOrder) const;
+ Standard_EXPORT Graphic3d_CubeMapOrder Permuted (const Graphic3d_ValidatedCubeMapOrder& anOrder) const;
//! Swaps values of two cubemap sides.
Standard_EXPORT Graphic3d_CubeMapOrder& Swap (Graphic3d_CubeMapSide theFirstSide,
// purpose :
// =======================================================================
Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString& theFilePath,
- const Graphic3d_ValidatedCubeMapOrder theOrder)
+ const Graphic3d_ValidatedCubeMapOrder& theOrder)
:
Graphic3d_CubeMap (theFilePath),
myOrder (theOrder),
// purpose :
// =======================================================================
Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const Handle(Image_PixMap)& theImage,
- const Graphic3d_ValidatedCubeMapOrder theOrder)
+ const Graphic3d_ValidatedCubeMapOrder& theOrder)
:
Graphic3d_CubeMap (Handle(Image_PixMap)()),
myOrder (theOrder),
//! @theFileName - path to the cubemap image
//! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
Standard_EXPORT Graphic3d_CubeMapPacked (const TCollection_AsciiString& theFileName,
- const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
+ const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default());
//! Initialization to set cubemap directly by PixMap.
//! @thePixMap - origin PixMap
//! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
Standard_EXPORT Graphic3d_CubeMapPacked (const Handle(Image_PixMap)& theImage,
- const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
+ const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default());
//! Returns current cubemap side as compressed PixMap.
Standard_EXPORT virtual Handle(Image_CompressedPixMap) CompressedValue (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
Handle(Graphic3d_Structure) SGfound;
for (; it.More() && notfound; it.Next()) {
- Handle(Graphic3d_Structure) SG = it.Key();
+ const Handle(Graphic3d_Structure)& SG = it.Key();
if ( SG->Identification () == AId) {
notfound = Standard_False;
SGfound = SG;
NCollection_Map<Graphic3d_Structure*> aStructNetwork;
for (Graphic3d_MapIteratorOfMapOfStructure anIter(myDisplayedStructure); anIter.More(); anIter.Next())
{
- Handle(Graphic3d_Structure) aStructure = anIter.Key();
anIter.Key()->Network (anIter.Key().get(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
}
#include <gp_XYZ.hxx>
#include <Standard_Dump.hxx>
+#include <cmath>
+
Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) const
{
- return sqrt( (X() - AOther.X()) * (X() - AOther.X())
+ return std::sqrt( (X() - AOther.X()) * (X() - AOther.X())
+ (Y() - AOther.Y()) * (Y() - AOther.Y())
+ (Z() - AOther.Z()) * (Z() - AOther.Z()) );
}
for (Interface_EntityIterator iter = thegraph.Shareds(thegraph.Entity(num));
iter.More(); iter.Next()) {
- Handle(Standard_Transient) ent = iter.Value();
+ const Handle(Standard_Transient)& ent = iter.Value();
Standard_Integer nument = thegraph.EntityNumber(ent);
if (!thegraph.IsPresent(num)) {
thegraph.GetFromEntity(ent,Standard_False);
Interface_EntityIterator loaded = Loaded();
Reset();
for (loaded.Start(); loaded.More(); loaded.Next()) {
- Handle(Standard_Transient) ent = loaded.Value();
+ const Handle(Standard_Transient)& ent = loaded.Value();
if (IsInPart(ent)) continue;
IFGraph_AllConnected connect(Model(),ent);
AddPart();
return Standard_True;
}
if (type.IsEqual("IFSelect_SelectTextType")) {
- const TCollection_AsciiString exname = file.ParamValue(1);
+ const TCollection_AsciiString& exname = file.ParamValue(1);
if (exname.Length() < FIRSTCHAR) return Standard_False;
if (exname.Value(FIRSTCHAR) == 'e') {}
else if (exname.Value(FIRSTCHAR) == 'c') {}
if (type.IsEqual("IFSelect_TransformStandard")) {
Standard_Boolean copyoption;
- const TCollection_AsciiString copyname = file.ParamValue(1);
+ const TCollection_AsciiString& copyname = file.ParamValue(1);
if (copyname.Length() < FIRSTCHAR) return Standard_False;
if (copyname.Value(FIRSTCHAR) == 'c') copyoption = Standard_True;
else if (copyname.Value(FIRSTCHAR) == 'o') copyoption = Standard_False;
for (list.Start(); list.More(); list.Next()) {
num = list.Number();
Handle(Standard_Transient) ent;
- const Handle(Interface_Check) check = list.Value();
+ const Handle(Interface_Check)& check = list.Value();
ent = check->Entity();
if (ent.IsNull() && num > 0 && num <= nbe) ent = model->Value(num);
nb = check->NbFails();
Interface_CheckIterator checks;
checks.SetName ("X-STEP WorkSession : Send All");
Message::SendInfo() << "** WorkSession : Sending all data"<<std::endl;
- Handle(Interface_InterfaceModel) model = G.Model();
+ const Handle(Interface_InterfaceModel)& model = G.Model();
if (model.IsNull() || protocol.IsNull() || WL.IsNull()) return checks;
Interface_CopyTool TC (model, protocol);
Interface_CheckIterator checks;
checks.SetName ("X-STEP WorkSession : Send Selected");
Message::SendInfo() << "** WorkSession : Sending selected data"<<std::endl;
- Handle(Interface_InterfaceModel) original = G.Model();
+ const Handle(Interface_InterfaceModel)& original = G.Model();
if (original.IsNull() || protocol.IsNull() || WL.IsNull()) return checks;
Handle(Interface_InterfaceModel) newmod = original->NewEmptyModel();
Interface_CopyTool TC (original, protocol);
// et aussi : pas de Dispatch (envoi en bloc)
applied.Nullify();
- Handle(Interface_InterfaceModel) original = G.Model();
+ const Handle(Interface_InterfaceModel)& original = G.Model();
if (dispnum > 0) {
newmod = original->NewEmptyModel();
TC.Clear();
(const Interface_Graph& G, const Handle(IFSelect_WorkLibrary)& WL,
Interface_CopyTool& TC, Handle(Interface_InterfaceModel)& newmod)
{
- Handle(Interface_InterfaceModel) original = G.Model();
+ const Handle(Interface_InterfaceModel)& original = G.Model();
// Interface_CopyTool TC(original,protocol);
newmod = original->NewEmptyModel();
TC.Clear();
{
Interface_EntityIterator iter;
Interface_EntityIterator inputer = InputResult(G); // tient compte de tout
- Handle(Interface_InterfaceModel) model = G.Model();
Standard_Integer rank = 0;
for (inputer.Start(); inputer.More(); inputer.Next()) {
- Handle(Standard_Transient) ent = inputer.Value();
+ const Handle(Standard_Transient)& ent = inputer.Value();
rank ++;
if (SortInGraph(rank,ent,G) == thesort) iter.GetOneItem(ent);
}
// A present, on retient, parmi les inputs, celles comptees une seule fois
// (N.B.: on prend inp1, qui donne UNE entite par composant, simple ou cycle)
for (inp1.Start(); inp1.More(); inp1.Next()) {
- Handle(Standard_Transient) ent = inp1.Value();
+ const Handle(Standard_Transient)& ent = inp1.Value();
if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
}
return iter;
// On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous
// niveaux). Les Roots initiales comptees une seule fois sont bonnes
for (input.Start(); input.More(); input.Next()) {
- Handle(Standard_Transient) ent = input.Value();
+ const Handle(Standard_Transient)& ent = input.Value();
GC.GetFromEntity(ent);
}
// A present, on retient, parmi les inputs, celles comptees une seule fois
for (input.Start(); input.More(); input.Next()) {
- Handle(Standard_Transient) ent = input.Value();
+ const Handle(Standard_Transient)& ent = input.Value();
if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
}
return iter;
{
Standard_Boolean res;
Standard_CString txt;
- Handle(Interface_InterfaceModel) model = G.Model();
+ const Handle(Interface_InterfaceModel)& model = G.Model();
if (theexact <= 0) {
if (!thematcher.IsNull()) return thematcher->Matches (ent,model,thesigntext, (theexact < 0));
txt = thecounter->ComputedSign(ent,G);
// On peut utiliser le Graphe a present
Interface_Graph GG(G);
for (iter.Start(); iter.More(); iter.Next()) {
- Handle(Standard_Transient) ent = iter.Value();
+ const Handle(Standard_Transient)& ent = iter.Value();
GG.GetFromEntity(ent,Standard_True); // et voila
}
return Interface_GraphContent(GG); // EntityIterator specialise (meme taille)
nbtot += nbent;
nbsign ++;
if (nbent > maxent) maxent = nbent;
- TCollection_AsciiString name = iter.Key();
+ const TCollection_AsciiString& name = iter.Key();
// if (!name.IsIntegerValue()) continue; pas bien fiable
Standard_Integer ic, nc = name.Length();
Standard_Boolean iaint = Standard_True;
(const Interface_Graph& G, Interface_CopyTool& TC,
Handle(Interface_InterfaceModel)& newmod) const
{
- Handle(Interface_InterfaceModel) original = G.Model();
+ const Handle(Interface_InterfaceModel)& original = G.Model();
newmod = original->NewEmptyModel();
TC.Clear();
Standard_Integer nb = G.Size();
Standard_Boolean res = Standard_True;
Standard_Boolean chg = Standard_False;
Standard_Integer nb = NbModifiers();
- Handle(Interface_InterfaceModel) original = G.Model();
+ const Handle(Interface_InterfaceModel)& original = G.Model();
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IFSelect_Modifier) unmod = Modifier(i);
BM.Init (Standard_False,Flag_Incorrect);
Standard_Integer num, nb = CG.Size();
for (checklist.Start(); checklist.More(); checklist.Next()) {
- const Handle(Interface_Check) chk = checklist.Value();
+ const Handle(Interface_Check)& chk = checklist.Value();
if (!chk->HasFailed()) continue;
num = checklist.Number();
if (num > 0 && num <= nb) BM.SetTrue (num,Flag_Incorrect);
thecheckana = TCollection_AsciiString (nb+1,' ');
for (chl.Start(); chl.More(); chl.Next()) {
Standard_Integer num = chl.Number();
- const Handle(Interface_Check) ach = chl.Value();
+ const Handle(Interface_Check)& ach = chl.Value();
if (ach->HasFailed()) thecheckana.SetValue(num,'2');
else if (ach->HasWarnings()) thecheckana.SetValue(num,'1');
}
IFSelect_SelectionIterator iter; sel->FillIterator(iter);
for (; iter.More(); iter.Next()) {
nb ++;
- Handle(IFSelect_Selection) newsel = iter.Value();
+ const Handle(IFSelect_Selection)& newsel = iter.Value();
sout<<" -- "<<newsel->Label()<<std::endl;
}
sout << " Nb Inputs:"<<nb<<std::endl;
// mode : 0 comptage 1 n0s entites 2 n0s+id ents
if (mode == IFSelect_ItemsByEntity) checklist.Print (S,myModel,failsonly);
else {
- Interface_CheckIterator chks = checklist;
+ const Interface_CheckIterator& chks = checklist;
Handle(IFSelect_CheckCounter) counter =
new IFSelect_CheckCounter (mode>1 && mode != IFSelect_CountSummary);
counter->Analyse (chks,myModel,Standard_True,failsonly);
if (!titre && mode == 0) sout<<" Keys : R Root ? Unknown * Unloaded"<<std::endl;
if (!titre && mode == 2) sout<<"(";
titre = 1;
- Handle(Standard_Transient) ent = iter.Value();
+ const Handle(Standard_Transient)& ent = iter.Value();
Standard_Integer num = myModel->Number(ent);
if (mode == 1) {
// n0 id (root?) category validity tracetype
// function : setStatic
// purpose :
//=======================================================================
-void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter)
+void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection& theParameter)
{
Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity);
Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode);
void initStatic(const Handle(DE_ConfigurationNode)& theNode);
//! Initialize static variables
- void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter);
+ void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection& theParameter);
//! Reset used interface static variables
void resetStatic();
TopTools_MapOfShape& theMap)
{
TopoDS_Shape aShape = theShape;
- TopLoc_Location aLoc = theShape.Location();
+ const TopLoc_Location& aLoc = theShape.Location();
if (!theConsiderLoc && !aLoc.IsIdentity())
aShape.Location( TopLoc_Location() );
if (!theMap.Add (aShape))
// check if shape has its own style (or inherits from ancestor)
XCAFPrs_Style style = inherit;
if ( settings.Contains(S) ) {
- XCAFPrs_Style own = settings.FindFromKey(S);
+ const XCAFPrs_Style& own = settings.FindFromKey(S);
if ( own.IsSetColorCurv() ) style.SetColorCurv ( own.GetColorCurv() );
if ( own.IsSetColorSurf() ) style.SetColorSurf ( own.GetColorSurf() );
style.SetMaterial (own.Material());
if ( aSh.ShapeType() == TopAbs_COMPOUND ) {
TopoDS_Iterator aShIt(aSh);
for ( ; aShIt.More(); aShIt.Next() ) {
- TopoDS_Shape newSh = aShIt.Value();
+ const TopoDS_Shape& newSh = aShIt.Value();
Handle(TColStd_HSequenceOfExtendedString) shLayers = new TColStd_HSequenceOfExtendedString;
if (! LTool->GetLayers( newSh, shLayers) || newSh.ShapeType() == TopAbs_COMPOUND )
AttachLayer(FP, LTool, newSh, localIntName);
}
for (Standard_Integer i = 1; i <= shseq.Length(); i++ ) {
- TopoDS_Shape localShape = shseq.Value(i);
+ const TopoDS_Shape& localShape = shseq.Value(i);
Handle(IGESData_IGESEntity) Igesent;
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, localShape );
if ( FP->FindTypedTransient ( mapper, STANDARD_TYPE(IGESData_IGESEntity), Igesent ) ) {
// Init for dicoCountResult for IFSelect_ResultCount
if ( mode == IFSelect_ResultCount ) {
char mess[300];
- const Handle(Transfer_Binder) aBinder = iterTrans.Value();
+ const Handle(Transfer_Binder)& aBinder = iterTrans.Value();
sprintf(mess,"\t%s",aBinder->ResultTypeName());
if (aMapCountResult.IsBound(mess))
aMapCountResult.ChangeFind(mess)++;
// Init for dicoCountMapping for IFSelect_Mapping
else if ( mode == IFSelect_Mapping ) {
char mess[300];
- const Handle(Transfer_Binder) aBinder = iterTrans.Value();
+ const Handle(Transfer_Binder)& aBinder = iterTrans.Value();
DeclareAndCast(IGESData_IGESEntity,igesEnt,iterTrans.Starting());
sprintf(mess,"%d\t%d\t%s\t%s", igesEnt->TypeNumber(), igesEnt->FormNumber(),
// Init the dicoCount dicoList and nbWarn ,nb Fail.
for(checkIterator.Start(); checkIterator.More(); checkIterator.Next() ) {
char mess[300];
- const Handle(Interface_Check) aCheck = checkIterator.Value();
+ const Handle(Interface_Check)& aCheck = checkIterator.Value();
Handle(Standard_Transient) ent = model->Value(checkIterator.Number());
DeclareAndCast(IGESData_IGESEntity,igesEnt,ent);
Standard_Integer type = igesEnt->TypeNumber(), form = igesEnt->FormNumber();
Message_Messenger::StreamBuffer aSender = TF->SendInfo();
aSender << aMapCountIter.Value() << aMapCountIter.Key() << std::endl;
if (mode == IFSelect_ListByItem) {
- Handle(TColStd_HSequenceOfInteger) entityList = aMapListIter.Value();
+ const Handle(TColStd_HSequenceOfInteger)& entityList = aMapListIter.Value();
Standard_Integer length = entityList->Length();
Message_Msg msg3035("IGES_3035");
TF->Send(msg3035, Message_Info);
if (enfr->NbAssociativities() != 0) {
for (Interface_EntityIterator iter = enfr->Associativities();
iter.More(); iter.Next()) {
- Handle(Standard_Transient) anent = iter.Value();
+ const Handle(Standard_Transient)& anent = iter.Value();
Handle(Standard_Transient) newent;
if (TC.Search(anent,newent)) ento->AddAssociativity
(GetCasted(IGESData_IGESEntity,newent));
if (str.IsNull())
{ ach->SendFail(Msg57); return; }
- Handle(TCollection_HAsciiString) stdvar = str;
+ const Handle(TCollection_HAsciiString)& stdvar = str;
if (strcmp(mess,"Last Change Date")==0)
Msg57.Arg(25);
else
{
Standard_Integer res = 0;
Standard_Integer nb = ent->NbDisplayedEntities();
- Handle(IGESData_ViewKindEntity) entcomp (ent);
+ const Handle(IGESData_ViewKindEntity)& entcomp = ent;
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
if (entcomp != displayed->View()) res ++;
// Les entites affichees doivent referencer <ent>. Elles ont priorite.
Standard_Boolean res = Standard_False;
Standard_Integer nb = ent->NbDisplayedEntities();
- Handle(IGESData_ViewKindEntity) entcomp (ent);
+ const Handle(IGESData_ViewKindEntity)& entcomp = ent;
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
if (entcomp != displayed->View()) res = Standard_True;
if (ent->LineFontValue(i) != 0 && ent->IsFontDefinition(i)) ach->AddFail
("At least one Line Font Definition Mismatch (both Value and Entity");
}
- Handle(IGESData_ViewKindEntity) entcomp (ent);
+ const Handle(IGESData_ViewKindEntity)& entcomp = ent;
Standard_Integer res = 0;
nb = ent->NbDisplayedEntities();
for (i = 1; i <= nb; i ++) {
// Les entites affichees doivent referencer <ent>. Elles ont priorite.
Standard_Boolean res = Standard_False;
Standard_Integer nb = ent->NbDisplayedEntities();
- Handle(IGESData_ViewKindEntity) entcomp (ent);
+ const Handle(IGESData_ViewKindEntity)& entcomp = ent;
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
if (entcomp != displayed->View()) res = Standard_True;
(const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G,
Handle(IGESData_IGESEntity)& /* sup */, Standard_Integer& /* index */)
{
- Handle(IGESData_IGESEntity) igesent = ent;
+ const Handle(IGESData_IGESEntity)& igesent = ent;
if (igesent.IsNull()) return Standard_False;
// Standard_Integer igt = igesent->TypeNumber();
DeclareAndCast(IGESData_IGESModel,model,G.Model());
if (type.IsEqual("IGESSelect_SelectIGESTypeForm")) {
if (file.NbParams() < 2) return Standard_False;
//Standard_Boolean exact; //szv#4:S4163:12Mar99 not needed
- const TCollection_AsciiString exname = file.ParamValue(1);
+ const TCollection_AsciiString& exname = file.ParamValue(1);
if (exname.Length() < 1) return Standard_False;
if (exname.Value(1) == 'e') {} //szv#4:S4163:12Mar99 `exact = Standard_True` not needed
else if (exname.Value(1) == 'c') {} //szv#4:S4163:12Mar99 `exact = Standard_False` not needed
if (file.NbParams() < 2) return Standard_False;
Handle(IGESSelect_FloatFormat) ff = new IGESSelect_FloatFormat;
Standard_Boolean zerosup;
- const TCollection_AsciiString zsup = file.ParamValue(1);
+ const TCollection_AsciiString& zsup = file.ParamValue(1);
if (zsup.Length() < 1) return Standard_False;
if (zsup.Value(1) == 'z') zerosup = Standard_True;
else if (zsup.Value(1) == 'n') zerosup = Standard_False;
if (type.IsEqual("IGESSelect_SplineToBSpline")) {
if (file.NbParams() < 1) return Standard_False;
Standard_Boolean tryc2;
- const TCollection_AsciiString tc2 = file.ParamValue(1);
+ const TCollection_AsciiString& tc2 = file.ParamValue(1);
if (tc2.Length() < 1) return Standard_False;
if (tc2.Value(1) == 'T') tryc2 = Standard_True;
else if (tc2.Value(1) == 'N') tryc2 = Standard_False;
Interface_CheckTool cht (model,protocol);
Interface_CheckIterator anIter = cht.CompleteCheckList();
for(anIter.Start(); anIter.More(); anIter.Next()) {
- const Handle(Interface_Check) ach = anIter.Value();
+ const Handle(Interface_Check)& ach = anIter.Value();
nbWarn += ach->NbWarnings();
nbFail += ach->NbFails();
}
return res;
}
- TopoDS_Face F = MF.Face();
+ const TopoDS_Face& F = MF.Face();
GProp_GProps G;
BRepGProp::SurfaceProperties(F,G);
if (G.Mass() < 0) {
gp_Pnt ptpoly;
IntSurf_PntOn2S p2s;
Handle(IntSurf_LineOn2S) Thelin = new IntSurf_LineOn2S ();
- Handle(Adaptor2d_Curve2d) arcsegm = thesegm.Curve();
+ const Handle(Adaptor2d_Curve2d)& arcsegm = thesegm.Curve();
Standard_Integer nbsample = 100;
if (!reversed) {
aTInterm=IntTools_Tools::IntermediatePoint(aT1, aT2);
- Handle(Geom_Curve) aC3D=aC.Curve();
+ const Handle(Geom_Curve)& aC3D=aC.Curve();
// point 3D
aC3D->D0(aTInterm, aPInterm);
//
aPv=BRep_Tool::Pnt(aV);
- Handle(Geom_Curve) aC3D=aC.Curve();
+ const Handle(Geom_Curve)& aC3D=aC.Curve();
aTolSum=aTolV+aTolC;
Standard_Integer IntTools_Tools::SplitCurve(const IntTools_Curve& IC,
IntTools_SequenceOfCurves& aCvs)
{
- Handle (Geom_Curve) aC3D =IC.Curve();
+ const Handle (Geom_Curve)& aC3D =IC.Curve();
if(aC3D.IsNull())
return 0;
//
- Handle (Geom2d_Curve) aC2D1=IC.FirstCurve2d();
- Handle (Geom2d_Curve) aC2D2=IC.SecondCurve2d();
+ const Handle (Geom2d_Curve)& aC2D1=IC.FirstCurve2d();
+ const Handle (Geom2d_Curve)& aC2D2=IC.SecondCurve2d();
Standard_Boolean bIsClosed;
bIsClosed=IntTools_Tools::IsClosed(aC3D);
// Mise en forme : liste d entiers
for (iter.Start(); iter.More(); iter.Next()) {
// num = 0 -> on sort du Model de depart, le noter "Error" et passer
- Handle(Standard_Transient) entshare = iter.Value();
+ const Handle(Standard_Transient)& entshare = iter.Value();
if(entshare == ent)
continue;
if(thestats.IsNull())
return;
for (iter.Start(); iter.More(); iter.Next()) {
- Handle(Standard_Transient) ent = iter.Value();
+ const Handle(Standard_Transient)& ent = iter.Value();
Standard_Integer num = EntityNumber(ent);
if (!num)
continue;
if(thestats.IsNull())
return;
for (iter.Start(); iter.More(); iter.Next()) {
- Handle(Standard_Transient) ent = iter.Value();
+ const Handle(Standard_Transient)& ent = iter.Value();
Standard_Integer num = EntityNumber(ent);
if (!num)
continue;
Standard_Integer nb = list.NbEntities();
if (nb == 0) return; // Liste redefinie a VIDE
for( ; list.More(); list.Next()) {
- Handle(Standard_Transient) curent = list.Value();
+ const Handle(Standard_Transient)& curent = list.Value();
if (agraph.IsPresent(agraph.EntityNumber(curent)))
GetOneItem (curent);
}
for (checks.Start(); checks.More(); checks.Next()) nb ++;
therepch.ReSize (therepch.Extent() + nb + 2);
for (checks.Start(); checks.More(); checks.Next()) {
- const Handle(Interface_Check) ach = checks.Value();
+ const Handle(Interface_Check)& ach = checks.Value();
Standard_Integer num = checks.Number();
// global check : ok si MEME MODELE
if (num == 0) thechecksem->GetMessages(ach);
{
theentities.Clear(); theentities.ReSize (aniter.NbEntities());
for (aniter.Start(); aniter.More(); aniter.Next()) {
- Handle(Standard_Transient) ent = aniter.Value(); AddEntity(ent);
+ const Handle(Standard_Transient)& ent = aniter.Value();
+ AddEntity(ent);
}
}
for (; iter.More(); iter.Next()) {
if (!iter.Key().StartsWith(rootkey)) continue;
S<<"@"<<iter.Key()<<"\n";
- const Handle(TCollection_HAsciiString) str = iter.Value();
+ const Handle(TCollection_HAsciiString)& str = iter.Value();
if (str.IsNull()) continue;
nb ++;
S<<str->ToCString()<<"\n";
{
S << " Nb.Entities : " << iter.NbEntities() << " : ";
for (iter.Start(); iter.More(); iter.Next()) {
- Handle(Standard_Transient) ent = iter.Value();
+ const Handle(Standard_Transient)& ent = iter.Value();
S << " n0/id:";
Model()->Print (ent, S);
}
Standard_Boolean rev = Standard_False;
TopoDS_Vertex Vf = V1;
TopoDS_Vertex Vl = V2;
- Handle(Geom_Curve) Cimg = i2s.Line(i);
+ const Handle(Geom_Curve)& Cimg = i2s.Line(i);
Handle(Geom2d_Curve) Cimg2d;
if (AppS1) {
Cimg2d = i2s.LineOnS1(i);
else
{
//we have to choose the direction
- TopoDS_Edge aStartEdge = wexp.Current();
+ const TopoDS_Edge& aStartEdge = wexp.Current();
TopTools_ListOfShape Ldirs;
Ldirs.Append(aStartEdge);
Ldirs.Append(NextSectionWire);
}
}
if (itms.More()) {
- TopoDS_Shape fac = itms.Key();
+ const TopoDS_Shape& fac = itms.Key();
for (exp.Init(fac,TopAbs_EDGE); exp.More(); exp.Next()) {
if (!Mapebord.Add(exp.Current())) {
Mapebord.Remove(exp.Current());
MAT_DataMapIteratorOfDataMapOfIntegerBisector itmap(bisectormap);
for (; itmap.More(); itmap.Next())
{
- Handle(MAT_Bisector) aBisector = itmap.Value();
+ const Handle(MAT_Bisector)& aBisector = itmap.Value();
aBisector->FirstEdge(NULL);
aBisector->SecondEdge(NULL);
}
w.Close();
TopoDS_Wire wireShape( w.Wire());
BRepBuilderAPI_MakeFace faceBuilder(wireShape);
- TopoDS_Face f( faceBuilder.Face());
+ const TopoDS_Face& f = faceBuilder.Face();
BRepMesh_IncrementalMesh im(f,1);
BRepTools::Clean(f);
}
for (MeshVS_SequenceOfPrsBuilder::Iterator aBuilderIter (myBuilders); aBuilderIter.More(); aBuilderIter.Next())
{
- Handle(MeshVS_PrsBuilder) aBuilder = aBuilderIter.Value();
+ const Handle(MeshVS_PrsBuilder)& aBuilder = aBuilderIter.Value();
if (!aBuilder.IsNull()
&& aBuilder->TestFlags (theMode))
{
//function : sendMetricAlert
//purpose :
//=======================================================================
-void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString theValue,
+void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString& theValue,
const Message_Gravity theGravity) const
{
Message_AlertExtended::AddAlert (Report(), new Message_AttributeMeter (theValue), theGravity);
const Message_Gravity theGravity) const Standard_OVERRIDE;
//! Send an alert with metrics active in the current report
- Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString theValue,
+ Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString& theValue,
const Message_Gravity theGravity) const;
private:
Message_SequenceOfPrinters aPrintersToRemove;
for (Message_SequenceOfPrinters::Iterator anIterator (aMessenger->Printers()); anIterator.More(); anIterator.Next())
{
- const Handle(Message_Printer) aPrinter = anIterator.Value();
+ const Handle(Message_Printer)& aPrinter = anIterator.Value();
if (aPrinter->IsKind(STANDARD_TYPE (Message_PrinterToReport)) &&
Handle(Message_PrinterToReport)::DownCast (aPrinter)->Report() == this)
aPrintersToRemove.Append (aPrinter);
NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
for (; iter.More(); iter.Next()) {
- TCollection_AsciiString name = iter.Key();
+ const TCollection_AsciiString& name = iter.Key();
if (!name.StartsWith(fromname))
continue;
- Handle(Standard_Transient) atr = iter.Value();
+ const Handle(Standard_Transient)& atr = iter.Value();
Handle(Standard_Transient) newatr = atr;
// Copy ? according type
def.AssignCat(" , alpha: ");
NCollection_DataMap<TCollection_AsciiString, Standard_Integer>::Iterator listadd(theeadds);
for (; listadd.More(); listadd.Next()) {
- TCollection_AsciiString aName = listadd.Key();
+ const TCollection_AsciiString& aName = listadd.Key();
Standard_CString enva = aName.ToCString();
if (enva[0] == '?') continue;
Sprintf(mess,":%d ",listadd.Value());
}
theWidth = Max (theWidth, aWidth);
- Handle(OpenGl_Context) aCtx = theCtx;
+ const Handle(OpenGl_Context)& aCtx = theCtx;
aFont.Nullify();
aCtx->ReleaseResource (aFontKey, Standard_True);
}
// of the DocumentElement, the XML format cannot be defined
if (aParser.parse (theFileName.ToCString()))
{
- LDOM_Element anElement = aParser.GetElement();
+ const LDOM_Element& anElement = aParser.GetElement();
if (anElement.getTagName().equals (LDOMString(aDocumentElementName)))
theFormat = anElement.getAttribute ("format");
}
// of the DocumentElement, the XML format cannot be defined
if (aParser.parse (theIStream, Standard_True))
{
- LDOM_Element anElement = aParser.GetElement();
+ const LDOM_Element& anElement = aParser.GetElement();
if (anElement.getTagName().equals (LDOMString(aDocumentElementName)))
theFormat = anElement.getAttribute ("format");
}
}
// Get intersect line.
- Handle(Geom_Curve) anIntersectCurve = aPlaneIntersector.Line (1);
+ const Handle(Geom_Curve)& anIntersectCurve = aPlaneIntersector.Line (1);
Handle(Geom_Line) anIntersectLine = Handle(Geom_Line)::DownCast (anIntersectCurve);
}
// Get intersect line.
- Handle(Geom_Curve) anIntersectCurve = aSurfaceIntersector.Line (1);
-
Handle(Geom_Line) aFirstLine, aSecondLine;
Standard_Real aFirstU = 0.0;
Standard_Real aFirstV = 0.0;
// current face
BRepBuilderAPI_MakeFace makeface (myPlane->Pln());
- TopoDS_Face face (makeface.Face());
BRepAdaptor_Surface adp (makeface.Face());
// 2d lines => projection of 3d on current plane
aPresentation->SetInfiniteState(isInfinite1 || isInfinite2);
// current face
BRepBuilderAPI_MakeFace makeface(myPlane->Pln());
- TopoDS_Face face(makeface.Face());
BRepAdaptor_Surface adp(makeface.Face());
Standard_Integer typArg(0);
//=======================================================================
void PrsMgr_PresentableObject::AddChild (const Handle(PrsMgr_PresentableObject)& theObject)
{
- Handle(PrsMgr_PresentableObject) aHandleGuard = theObject;
+ const Handle(PrsMgr_PresentableObject)& aHandleGuard = theObject;
if (theObject->myParent != NULL)
{
theObject->myParent->RemoveChild (aHandleGuard);
}
// Construction du Geom_Plane
GC_MakePlane MkPlane(A,B,C);
- Handle(Geom_Plane) theGeomPlane=MkPlane.Value();
+ const Handle(Geom_Plane)& theGeomPlane=MkPlane.Value();
// on le display & bind
theAISPlaneTri= new AIS_PlaneTrihedron(theGeomPlane );
// performTriangulation
//=======================================================================
-Standard_Integer performTriangulation (TopoDS_Shape aShape, Draw_Interpretor& di)
+Standard_Integer performTriangulation (const TopoDS_Shape& aShape, Draw_Interpretor& di)
{
int failed=0, total=0;
TopExp_Explorer ExpFace;
Handle(Geom_BezierSurface) BezSurf = new Geom_BezierSurface(poles);
Handle(Geom_BSplineSurface) BSpSurf = GeomConvert::SurfaceToBSplineSurface(BezSurf);
BRepBuilderAPI_MakeFace faceMaker(BSpSurf, Precision::Confusion());
- TopoDS_Face face = faceMaker.Face();
+ const TopoDS_Face& face = faceMaker.Face();
gp_Pnt pnt(0, size, 0);
BRepPrimAPI_MakeHalfSpace *hSpace = new BRepPrimAPI_MakeHalfSpace(face,pnt);
// performBlend
//=======================================================================
-int performBlend (TopoDS_Shape aShape, Standard_Real rad, TopoDS_Shape& bShape, Draw_Interpretor& di)
+int performBlend (const TopoDS_Shape& aShape, Standard_Real rad, TopoDS_Shape& bShape, Draw_Interpretor& di)
{
Standard_Integer status = 0;
TopoDS_Shape newShape;
Handle(Geom_Surface) aSurf = FS.Surface();
BRepBuilderAPI_MakeFace aMakeFace(aSurf,aWire,Standard_True);
if(aMakeFace.IsDone()) {
- TopoDS_Face aFace = aMakeFace.Face();
+ const TopoDS_Face& aFace = aMakeFace.Face();
DBRep::Set(a[1],aFace);
}
}
BRepBuilderAPI_MakeWire wire_(edg1_, edg2_, edg3_, edg4_);
BRepBuilderAPI_MakeFace face_(wire_);
- TopoDS_Face sh_ = face_.Face();
+ const TopoDS_Face& sh_ = face_.Face();
int up = 1;
myAISContext->Display(AISPoint, Standard_True);
BRepPrimAPI_MakeHalfSpace half_(sh_, g_pnt);
- TopoDS_Solid sol1_ = half_.Solid();
+ const TopoDS_Solid& sol1_ = half_.Solid();
DBRep::Set("Face", sol1_);
TopExp_Explorer TE(awire, TopAbs_VERTEX);
if ( TE.More()) {
BRepTools_WireExplorer WE;
- for ( WE.Init(awire,aface); WE.More(); WE.Next()) {
- TopoDS_Edge E = WE.Current();
+ for ( WE.Init(awire,aface); WE.More(); WE.Next())
+ {
count++;
}
}
return 0;
}
-int TestOpenSave(TCollection_ExtendedString aFile1,
- TCollection_ExtendedString aFile2,
- TCollection_ExtendedString aFile3)
+int TestOpenSave(const TCollection_ExtendedString& aFile1,
+ const TCollection_ExtendedString& aFile2,
+ const TCollection_ExtendedString& aFile3)
{
// Std
Handle(TDocStd_Document) doc_std, doc_std_open;
w.Close();
TopoDS_Wire wireShape( w.Wire());
BRepBuilderAPI_MakeFace faceBuilder(wireShape);
- TopoDS_Face f( faceBuilder.Face());
+ const TopoDS_Face& f( faceBuilder.Face());
BRepMesh_IncrementalMesh im(f,1);
BRepTools::Clean(f);
}
}
// Construction du Geom_Plane
GC_MakePlane MkPlane(A,B,C);
- Handle(Geom_Plane) theGeomPlane=MkPlane.Value();
+ const Handle(Geom_Plane)& theGeomPlane=MkPlane.Value();
// on le display & bind
theAISPlaneTri= new AIS_PlaneTrihedron(theGeomPlane );
if (!result_surf1.IsNull())
{
BRepBuilderAPI_MakeFace b_face1(result_surf1, Precision::Confusion());
- TopoDS_Face bsp_face1 = b_face1.Face();
+ const TopoDS_Face& bsp_face1 = b_face1.Face();
DBRep::Set(a[1],bsp_face1);
}
}
TopoDS_Wire twire = wire.Wire();
BRepBuilderAPI_MakeFace face(twire);
- TopoDS_Face tface = face.Face();
+ const TopoDS_Face& tface = face.Face();
////////Handle(AIS_Shape) face_ais = new AIS_Shape( tface );
////////aContext->Display(face_ais);
}
GCE2d_MakeSegment MakeSegment(P1,P2);
- Handle(Geom2d_TrimmedCurve) TrimmedCurve = MakeSegment.Value();
+ const Handle(Geom2d_TrimmedCurve)& TrimmedCurve = MakeSegment.Value();
DrawTrSurf::Set(argv[1], TrimmedCurve);
return 0;
}
QCOMPARE ( Abs( ea.RealValue() - 0.1 * i ) < 1e-10 , Standard_True );
// TCollection_ExtendedString (const TCollection_ExtendedString& astring)
- const TCollection_ExtendedString f(e);
+ const TCollection_ExtendedString& f(e);
//assert( f.Length() == e.Length());
//assert( f == e );
QCOMPARE ( f.Length() , e.Length() );
if (!aRes.IsNull())
{
BRepBuilderAPI_MakeFace b_face1(aRes, Precision::Confusion());
- TopoDS_Face bsp_face1 = b_face1.Face();
+ const TopoDS_Face& bsp_face1 = b_face1.Face();
DBRep::Set(theArgVal[2], bsp_face1);
}
}
Handle(Geom_OffsetSurface) offsurf;
offsurf = new Geom_OffsetSurface(BZ1, -100);
BRepBuilderAPI_MakeFace bzf2( offsurf, Precision::Confusion() );
- TopoDS_Face F2= bzf2.Face();
+ const TopoDS_Face& F2= bzf2.Face();
Handle(AIS_Shape) ais22 = new AIS_Shape(F2);
aContext->Display (ais22, Standard_False);
DBRep::Set("F2",F2);
shell.Closed (BRep_Tool::IsClosed (shell));
BRepPrimAPI_MakeHalfSpace half(shell, gp_Pnt(0, 0, 20));
- TopoDS_Solid sol = half.Solid();
+ const TopoDS_Solid& sol = half.Solid();
gp_Ax2 anAx2(gp_Pnt(-800.0, 0.0, 0), gp_Dir(0, 0, -1));
BRepPrimAPI_MakeCylinder cyl(anAx2, 50, 300);
TopoDS_Shape sh = cyl.Shape();
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
- Handle(Graphic3d_Structure) aStructure (thePrs);
+ const Handle(Graphic3d_Structure)& aStructure = thePrs;
Handle(Graphic3d_Group) aGroup = aStructure->NewGroup();
Handle(Prs3d_ShadingAspect) anAspect = myDrawer->ShadingAspect();
Graphic3d_MaterialAspect aMat = anAspect->Aspect()->FrontMaterial();
DNaming_DataMapIteratorOfDataMapOfShapeOfName itrn(aDMapOfShapeOfName);
for(;itrn.More();itrn.Next()) {
- TCollection_AsciiString name = itrn.Value();
+ const TCollection_AsciiString& name = itrn.Value();
const TopoDS_Shape Result = TR.Copied(itrn.Key());
DBRep::Set(name.ToCString(), Result);
di.AppendElement(name.ToCString());
// function : SetReaderParameters
// purpose :
//=======================================================================
- static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode) theNode)
+ static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode)& theNode)
{
theReader.SetDoublePrecision(!theNode->InternalParameters.ReadSinglePrecision);
theReader.SetSystemLengthUnit(theNode->GlobalParameters.LengthUnit / 1000);
const Interface_ShareTool& aShto,
Handle(Interface_Check)& ach) const
{
- Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) aRationalBSC = ent;
+ const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& aRationalBSC = ent;
Handle(StepGeom_BSplineCurveWithKnots) aBSCWK =
aRationalBSC->BSplineCurveWithKnots();
RWStepGeom_RWBSplineCurveWithKnots t1;
const Interface_ShareTool& aShto,
Handle(Interface_Check)& ach) const
{
- Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) aRationalBSS = ent;
+ const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& aRationalBSS = ent;
Handle(StepGeom_BSplineSurfaceWithKnots) aBSSWK =
aRationalBSS->BSplineSurfaceWithKnots();
RWStepGeom_RWBSplineSurfaceWithKnots t1;
GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
const Standard_Real theValue,
- const StepBasic_Unit theUnit)
+ const StepBasic_Unit& theUnit)
{
if ((theModifiers.Length() == 0) && (theModifWithVal == XCAFDimTolObjects_DatumModifWithValue_None))
return NULL;
//function : GetTessellation
//purpose :
//=======================================================================
-Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape theShape)
+Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape& theShape)
{
// Build coordinate list and curves
NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = new StepVisual_VectorOfHSequenceOfInteger;
Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
const Standard_Real theValue,
- const StepBasic_Unit theUnit);
+ const StepBasic_Unit& theUnit);
- Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape theShape);
+ Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape& theShape);
};
// function : setStatic
// purpose :
//=======================================================================
-void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter)
+void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter)
{
Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity);
Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode);
void initStatic(const Handle(DE_ConfigurationNode)& theNode);
//! Initialize static variables
- void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter);
+ void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter);
//! Reset used interface static variables
void resetStatic();
// check whether it has associated external ref
TColStd_SequenceOfHAsciiString SHAS;
if (ShapePDMap.IsBound(S) && PDFileMap.IsBound(ShapePDMap.Find(S))) {
- Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(ShapePDMap.Find(S));
+ const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(ShapePDMap.Find(S));
if (!EF.IsNull()) {
// (store information on extern refs in the document)
SHAS.Append(EF->GetName());
return Standard_True;
}
// for root style returns true only if it is overridden by other root style
- auto anItem = anOverRidingStyle->ItemAP242 ().Value ();
+ const Handle(Standard_Transient)& anItem = anOverRidingStyle->ItemAP242().Value();
if(!anItem.IsNull() && anItem->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)))
{
return Standard_True;
{
TDF_Label L;
if (PDFileMap.IsBound(PD)) {
- Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD);
+ const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD);
if (!EF.IsNull()) {
L = EF->GetLabel();
if (!L.IsNull()) return L;
TDF_Label L;
// get shape resulting from CDSR (in fact, only location is interesting)
- Handle(Transfer_TransientProcess) TP = Tool.TransientProcess();
+ const Handle(Transfer_TransientProcess)& TP = Tool.TransientProcess();
Handle(Transfer_Binder) binder = TP->Find(NAUO);
if (binder.IsNull() || !binder->HasResult()) {
#ifdef OCCT_DEBUG
{
TDF_Label L;
if (PDFileMap.IsBound(PD)) {
- Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD);
+ const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD);
if (!EF.IsNull()) {
L = EF->GetLabel();
if (!L.IsNull()) return L;
//function : readAnnotationPlane
//purpose : read annotation plane
//=======================================================================
-Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane) theAnnotationPlane,
+Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& theAnnotationPlane,
gp_Ax2& thePlane)
{
if (theAnnotationPlane.IsNull())
//purpose : read connection points for given dimension
//=======================================================================
void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR,
- const Handle(Standard_Transient) theGDT,
+ const Handle(Standard_Transient)& theGDT,
const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject)
{
if (theGDT.IsNull() || theDimObject.IsNull())
Handle(StepShape_ShapeDimensionRepresentation) aSDR = NULL;
for (Interface_EntityIterator anIt = aGraph.Sharings(theGDT); aSDR.IsNull() && anIt.More(); anIt.Next()) {
- Handle(Standard_Transient) anEnt = anIt.Value();
+ const Handle(Standard_Transient)& anEnt = anIt.Value();
Handle(StepShape_DimensionalCharacteristicRepresentation) aDCR =
Handle(StepShape_DimensionalCharacteristicRepresentation)::DownCast(anEnt);
if (!aDCR.IsNull())
const Interface_Graph &graph,
const Handle(Transfer_TransientProcess) &TP,
const TDF_Label TolerL,
- const Handle(StepDimTol_GeometricToleranceWithDatumReference) GTWDR)
+ const Handle(StepDimTol_GeometricToleranceWithDatumReference)& GTWDR)
{
if (GTWDR.IsNull()) return Standard_False;
Handle(StepDimTol_HArray1OfDatumReference) HADR = GTWDR->DatumSystem();
Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
for (anIter.Start(); anIter.More(); anIter.Next()) {
- Handle(Standard_Transient) anAtr = anIter.Value();
+ const Handle(Standard_Transient)& anAtr = anIter.Value();
if (anAtr->IsKind(STANDARD_TYPE(StepDimTol_DatumSystem)))
{
Standard_Integer aPositionCounter = 0;//position on frame
Handle(StepDimTol_DatumSystem) aDS = Handle(StepDimTol_DatumSystem)::DownCast(anAtr);
Interface_EntityIterator anIterDS = aGraph.Sharings(aDS);
for (anIterDS.Start(); anIterDS.More(); anIterDS.Next()) {
- Handle(Standard_Transient) anAtrDS = anIterDS.Value();
+ const Handle(Standard_Transient)& anAtrDS = anIterDS.Value();
if (anAtrDS->IsKind(STANDARD_TYPE(StepAP242_GeometricItemSpecificUsage)))
{
//get axis
// Collect all Shape_Aspect entities
Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
for (anIter.Start(); anIter.More(); anIter.Next()) {
- Handle(Standard_Transient) anAtr = anIter.Value();
+ const Handle(Standard_Transient)& anAtr = anIter.Value();
NCollection_Sequence<Handle(StepRepr_ShapeAspect)> aSAs;
if (anAtr->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape)))
{
Interface_EntityIterator anIterSDR = aGraph.Sharings(anAtr);
for (anIterSDR.Start(); anIterSDR.More(); anIterSDR.Next())
{
- Handle(Standard_Transient) anAtrSDR = anIterSDR.Value();
+ const Handle(Standard_Transient)& anAtrSDR = anIterSDR.Value();
if (anAtrSDR->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation)))
{
isAllOver = Standard_True;
Interface_EntityIterator anIterABSR = aGraph.Shareds(anAtrSDR);
for (anIterABSR.Start(); anIterABSR.More(); anIterABSR.Next())
{
- Handle(Standard_Transient) anAtrABSR = anIterABSR.Value();
+ const Handle(Standard_Transient)& anAtrABSR = anIterABSR.Value();
if (anAtrABSR->IsKind(STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation)))
{
aSeqRI1.Append(anAtrABSR);
void collectViewShapes(const Handle(XSControl_WorkSession)& theWS,
const Handle(TDocStd_Document)& theDoc,
- const Handle(StepRepr_Representation) theRepr,
+ const Handle(StepRepr_Representation)& theRepr,
TDF_LabelSequence& theShapes)
{
Handle(XSControl_TransferReader) aTR = theWS->TransferReader();
//=======================================================================
Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_GeometricRepresentationItem)& theClippingCameraModel,
TDF_LabelSequence& theClippingPlanes,
- const Handle(XCAFDoc_ClippingPlaneTool) theTool)
+ const Handle(XCAFDoc_ClippingPlaneTool)& theTool)
{
Handle(TCollection_HAsciiString) anExpression = new TCollection_HAsciiString();
NCollection_Sequence<Handle(StepGeom_GeometricRepresentationItem)> aPlanes;
// topological containers to expand
for (Standard_Integer i = 1; i <= aReprItems.Length(); ++i)
{
- Handle(StepRepr_RepresentationItem) aTRepr = aReprItems.Value(i);
+ const Handle(StepRepr_RepresentationItem)& aTRepr = aReprItems.Value(i);
if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep)))
aMSBSeq.Append(aTRepr);
else if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ShellBasedSurfaceModel)))
for (NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>::Iterator anExtFileIter(myFiles);
anExtFileIter.More(); anExtFileIter.Next())
{
- Handle(STEPCAFControl_ExternFile) anExtFile = anExtFileIter.Value();
+ const Handle(STEPCAFControl_ExternFile)& anExtFile = anExtFileIter.Value();
if (anExtFile->GetWriteStatus() != IFSelect_RetVoid)
{
continue;
aFatherStyleIter.More(); aFatherStyleIter.Next())
{
StepVisual_PresentationStyleSelect aPSS;
- StepVisual_PresentationStyleSelect anOlDPSS = aFatherStyleIter.Value();
+ const StepVisual_PresentationStyleSelect& anOlDPSS = aFatherStyleIter.Value();
if (!anOlDPSS.PointStyle().IsNull())
aPSS.SetValue(anOlDPSS.PointStyle());
else if (!anOlDPSS.CurveStyle().IsNull())
if (theInherit) aStyle = *theInherit;
if (theSettings.Contains(theShape))
{
- XCAFPrs_Style anOwnStyle = theSettings.FindFromKey(theShape);
+ const XCAFPrs_Style& anOwnStyle = theSettings.FindFromKey(theShape);
if (!anOwnStyle.IsVisible())
aStyle.SetVisibility(Standard_False);
if (anOwnStyle.IsSetColorCurv())
//purpose : auxiliary
//======================================================================
static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard_Real theValue,
- const StepBasic_Unit theUnit,
+ const StepBasic_Unit& theUnit,
const Handle(TCollection_HAsciiString)& theName,
const Standard_CString theMeasureName,
const Standard_Boolean theIsAngle,
//=======================================================================
Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
const TDF_Label theLabel,
- const TopoDS_Shape theShape,
+ const TopoDS_Shape& theShape,
Handle(StepRepr_RepresentationContext)& theRC,
Handle(StepAP242_GeometricItemSpecificUsage)& theGISU)
{
for (Interface_EntityIterator aSharingIter = aGraph.Sharings(aPDS);
aSharingIter.More() && aSDR.IsNull(); aSharingIter.Next())
{
- Handle(Standard_Transient) anEntity = aSharingIter.Value();
+ const Handle(Standard_Transient)& anEntity = aSharingIter.Value();
aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(anEntity);
}
if (aSDR.IsNull())
const Standard_Boolean theHasPlane,
const gp_Ax2& theAnnotationPlane,
const gp_Pnt& theTextPosition,
- const Handle(Standard_Transient) theDimension)
+ const Handle(Standard_Transient)& theDimension)
{
if (thePresentation.IsNull())
return;
// Plane
Handle(StepGeom_Plane) aPlane = new StepGeom_Plane();
GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane);
- Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value();
+ const Handle(StepGeom_Axis2Placement3d)& anAxis = anAxisMaker.Value();
// Set text position to plane origin
Handle(StepGeom_CartesianPoint) aTextPos = new StepGeom_CartesianPoint();
Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
const TDF_LabelSequence& theShapeL,
const TDF_Label& theDatumL,
const Standard_Boolean theIsFirstDTarget,
- const Handle(StepDimTol_Datum) theWrittenDatum)
+ const Handle(StepDimTol_Datum)& theWrittenDatum)
{
// Get working data
const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
// qualifiers, modifiers, orientation and tolerance class)
//======================================================================
static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS,
- const Handle(XCAFDimTolObjects_DimensionObject) theObject,
- const Handle(StepRepr_RepresentationContext) theRC,
- const StepShape_DimensionalCharacteristic theDimension)
+ const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
+ const Handle(StepRepr_RepresentationContext)& theRC,
+ const StepShape_DimensionalCharacteristic& theDimension)
{
// Get working data
const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
XCAFDimTolObjects_DimensionModifiersSequence aModifiers = theObject->GetModifiers();
- Handle(Standard_Transient) aDim = theDimension.Value();
+ const Handle(Standard_Transient)& aDim = theDimension.Value();
Standard_Boolean isAngle = aDim->IsKind(STANDARD_TYPE(StepShape_AngularLocation)) ||
aDim->IsKind(STANDARD_TYPE(StepShape_AngularSize));
gp_Dir aDir;
theObject->GetDirection(aDir);
GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0));
- Handle(StepGeom_CartesianPoint) aLoc = MkPoint.Value();
+ const Handle(StepGeom_CartesianPoint)& aLoc = MkPoint.Value();
Handle(StepGeom_Direction) anAxis = new StepGeom_Direction();
Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
aCoords->SetValue(1, aDir.X());
//======================================================================
static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS,
const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
- const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr,
+ const Handle(StepRepr_ConstructiveGeometryRepresentation)& theRepr,
Handle(StepRepr_ShapeAspect)& theFirstSA,
Handle(StepRepr_ShapeAspect)& theSecondSA,
NCollection_Vector<Handle(StepGeom_CartesianPoint)>& thePnts)
//======================================================================
static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession)& theWS,
const TDF_Label theGeomTolL,
- const TDF_LabelSequence theDatumSeq,
- const STEPConstruct_DataMapOfAsciiStringTransient theDatumMap,
+ const TDF_LabelSequence& theDatumSeq,
+ const STEPConstruct_DataMapOfAsciiStringTransient& theDatumMap,
const Handle(StepRepr_RepresentationContext)& theRC)
{
// Get working data
Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
const TDF_Label theLabel,
- const TopoDS_Shape theShape,
+ const TopoDS_Shape& theShape,
Handle(StepRepr_RepresentationContext)& theRC,
Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
const Standard_Boolean theHasPlane,
const gp_Ax2& theAnnotationPlane,
const gp_Pnt& theTextPosition,
- const Handle(Standard_Transient) theDimension);
+ const Handle(Standard_Transient)& theDimension);
Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS,
const TDF_LabelSequence& theShapeL,
const TDF_Label& theDatumL,
const Standard_Boolean isFirstDTarget,
- const Handle(StepDimTol_Datum) theWrittenDatum);
+ const Handle(StepDimTol_Datum)& theWrittenDatum);
void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
Handle(Standard_Type) tSDR = STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation);
Interface_EntityIterator anIter = theGraph.Sharings(rep1);
for (; anIter.More() && pd1.IsNull(); anIter.Next()) {
- Handle(Standard_Transient) enti = anIter.Value();
+ const Handle(Standard_Transient)& enti = anIter.Value();
if (enti->DynamicType() == tSDR) {
Handle(StepShape_ShapeDefinitionRepresentation) SDR =
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti);
anIter = theGraph.Sharings(rep2);
for (; anIter.More() && pd2.IsNull(); anIter.Next()) {
- Handle(Standard_Transient) enti = anIter.Value();
+ const Handle(Standard_Transient)& enti = anIter.Value();
if (enti->DynamicType() == tSDR) {
Handle(StepShape_ShapeDefinitionRepresentation) SDR =
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti);
// for each DocumentFile, find associated with it data:
Interface_EntityIterator subs = Graph().Sharings(DocFile);
for (subs.Start(); subs.More(); subs.Next()) {
- Handle(Standard_Transient) sub = subs.Value();
+ const Handle(Standard_Transient)& sub = subs.Value();
// FORMAT - ???????
//
// Handle(Standard_Transient) sub = subs.Value();
Interface_EntityIterator subs = Graph().Sharings(PD);
for (subs.Start(); subs.More(); subs.Next()) {
- Handle(Standard_Transient) sub = subs.Value();
+ const Handle(Standard_Transient)& sub = subs.Value();
if (!sub->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape))) continue;
Handle(StepRepr_ProductDefinitionShape) ProdDefSh =
Handle(StepRepr_ProductDefinitionShape)::DownCast ( sub );
// Interface_EntityIterator subs2 = Graph().Sharings(ProdDef);
Interface_EntityIterator subs2 = Graph().Sharings(PD);
for (subs2.Start(); subs2.More(); subs2.Next()) {
- Handle(Standard_Transient) sub2 = subs2.Value();
+ const Handle(Standard_Transient)& sub2 = subs2.Value();
if (sub2->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) {
Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO =
TopoDS_Iterator it(Result1);
for ( ; it.More(); it.Next() )
{
- TopoDS_Shape aSubShape = it.Value();
+ const TopoDS_Shape& aSubShape = it.Value();
B.Add(Cund, aSubShape);
}
}
TopoDS_Iterator it(Result1);
for ( ; it.More(); it.Next() )
{
- TopoDS_Shape aSubShape = it.Value();
+ const TopoDS_Shape& aSubShape = it.Value();
B.Add(Cund, aSubShape);
}
}
Interface_EntityIterator subs1 = graph.Sharings(rep);
Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship);
for (subs1.Start(); subs1.More(); subs1.Next()) {
- Handle(Standard_Transient) anitem = subs1.Value();
+ const Handle(Standard_Transient)& anitem = subs1.Value();
if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
continue;
if (anitem->DynamicType() == tSRR)
// Put not suspected open Shells as they are (updated 23.11.2010)
TopExp_Explorer allShellsExp(comp, TopAbs_SHELL);
for ( ; allShellsExp.More(); allShellsExp.Next() ) {
- TopoDS_Shape aCurrentShell = allShellsExp.Current();
+ const TopoDS_Shape& aCurrentShell = allShellsExp.Current();
if ( !myNMTool.IsPureNMShell(aCurrentShell) && !shellClosingsMap.Contains(aCurrentShell) )
brepBuilder.Add(compWithClosings, aCurrentShell);
}
TopExp_Explorer exp(comp, TopAbs_SHELL);
for (; exp.More(); exp.Next())
{
- TopoDS_Shape aSubShape = exp.Current();
+ const TopoDS_Shape& aSubShape = exp.Current();
if (aSubShape.ShapeType() == TopAbs_SHELL && aSubShape.Closed()) {
TopoDS_Solid nextSolid;
brepBuilder.MakeSolid(nextSolid);
for (subs.Start(); subs.More() && PS.More(); subs.Next())
{
Message_ProgressRange aRange = PS.Next();
- Handle(Standard_Transient) anitem = subs.Value();
+ const Handle(Standard_Transient)& anitem = subs.Value();
if ( anitem->DynamicType() != tCDSR && anitem->DynamicType() != tSRR ) continue;
// DeclareAndCast(StepShape_ContextDependentShapeRepresentation,anitem,subs.Value());
// if (anitem.IsNull()) continue;
TopExp_Explorer shellExpA(comp, TopAbs_SHELL);
for ( ; shellExpA.More(); shellExpA.Next() ) {
- TopoDS_Shape shellA = shellExpA.Current();
+ const TopoDS_Shape& shellA = shellExpA.Current();
TopExp_Explorer shellExpB(comp, TopAbs_SHELL);
TopTools_ListOfShape closingShells;
for ( ; shellExpB.More(); shellExpB.Next() ) {
- TopoDS_Shape shellB = shellExpB.Current();
+ const TopoDS_Shape& shellB = shellExpB.Current();
if ( shellA.IsSame(shellB) )
continue;
// Check whether ShellB is non-manifold and adjacent to ShellA.
TopoDS_Iterator anIt(theShape);
for ( ; anIt.More(); anIt.Next() ) {
- TopoDS_Shape aDirectChild = anIt.Value();
+ const TopoDS_Shape& aDirectChild = anIt.Value();
if (aDirectChild.ShapeType() != TopAbs_COMPOUND)
aBrepBuilder.Add(aDirectShapes, aDirectChild);
}
// Transfer Solids to closed Shells. Prepare RepItemSeq & NonManifoldGroup
for ( TopoDS_Iterator iter(aNMCompound); iter.More(); iter.Next() ) {
- TopoDS_Shape aSubShape = iter.Value();
+ const TopoDS_Shape& aSubShape = iter.Value();
if (aSubShape.ShapeType() == TopAbs_SOLID) {
for ( TopoDS_Iterator aSubIter(aSubShape); aSubIter.More(); aSubIter.Next() ) {
TopoDS_Shell aSubShell = TopoDS::Shell( aSubIter.Value() );
aGCSet->SetName(empty);
// iterates on compound with vertices and traces each vertex
for ( anExp.ReInit() ; anExp.More(); anExp.Next() ) {
- TopoDS_Shape aVertex = anExp.Current();
+ const TopoDS_Shape& aVertex = anExp.Current();
if ( aVertex.ShapeType() != TopAbs_VERTEX )
continue;
curNb++;
#endif
for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) {
- TopoDS_Shape aSubShape = iter.Value();
+ const TopoDS_Shape& aSubShape = iter.Value();
if (aSubShape.ShapeType() != TopAbs_VERTEX || !isSeparateVertices) {
// Store non-manifold topology as shells (ssv; 10.11.2010)
gp_Trsf aLoc;
Standard_Boolean isShapeLocated = Standard_False;
if ( GroupMode() >0) {
- TopLoc_Location shloc = shape.Location();
+ const TopLoc_Location& shloc = shape.Location();
isShapeLocated = !shloc.IsIdentity();
aLoc = shloc.Transformation();
TopLoc_Location shident;
// make location for assembly placement
GeomToStep_MakeAxis2Placement3d mkax (aLoc);
- Handle(StepGeom_Axis2Placement3d) AxLoc = mkax.Value();
+ const Handle(StepGeom_Axis2Placement3d)& AxLoc = mkax.Value();
AX1 = AxLoc;
// create assembly structures (CDSR, NAUO etc.)
Standard_Integer nbElem = gs->NbElements();
for (Standard_Integer i = 1; i <= nbElem ; i++) {
StepShape_GeometricSetSelect aGSS = gs->ElementsValue(i);
- Handle(Standard_Transient) ent = aGSS.Value();
+ const Handle(Standard_Transient)& ent = aGSS.Value();
Handle(StepGeom_CompositeCurve) ccurve = Handle(StepGeom_CompositeCurve)::DownCast(ent);
if(!ccurve.IsNull()) {
myNbWires++;
return 1;
}
- TopLoc_Location L = a.Location();
+ const TopLoc_Location& L = a.Location();
di << "Location of shape " << argv[1] << ":\n";
di << "Results in:\n";
gp_Trsf T = L.Transformation();
}
private:
- BVHBuilderAdaptorRegular& operator=(BVHBuilderAdaptorRegular) { return *this; }
+ BVHBuilderAdaptorRegular& operator=(const BVHBuilderAdaptorRegular&) { return *this; }
private:
ObjectsMap& myObjects;
}
private:
- BVHBuilderAdaptorPersistent& operator=(BVHBuilderAdaptorPersistent) { return *this; }
+ BVHBuilderAdaptorPersistent& operator=(const BVHBuilderAdaptorPersistent&) { return *this; }
private:
ObjectsMap& myObjects;
// function : SetCamera
// purpose :
//=======================================================================
-void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera) theCamera)
+void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera)& theCamera)
{
Standard_ASSERT_RAISE(!myActiveSelectingVolume.IsNull(),
"SelectMgr_SelectingVolumeManager::SetCamera() should be called after initialization of selection volume ");
//! Updates camera projection and orientation matrices in all selecting volumes
//! Note: this method should be called after selection volume building
//! else exception will be thrown
- Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera) theCamera);
+ Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera)& theCamera);
//! Updates viewport in all selecting volumes
//! Note: this method should be called after selection volume building
//=======================================================================
void SelectMgr_ViewerSelector::RemoveSelectableObject (const Handle(SelectMgr_SelectableObject)& theObject)
{
- Handle(SelectMgr_SelectableObject) anObj = theObject;
if (myMapOfObjectSensitives.UnBind (theObject))
{
RemovePicked (theObject);
#define NbControl 23
-static void ContourProperties(TopoDS_Wire wire,
+static void ContourProperties(const TopoDS_Wire& wire,
Standard_Real& countourArea,
Standard_Real& countourLength)
{
gp_XYZ prev, cont;
for (BRepTools_WireExplorer exp(wire); exp.More(); exp.Next()) {
- TopoDS_Edge Edge = exp.Current(); nbe++;
-
+ const TopoDS_Edge& Edge = exp.Current();
+ nbe++;
+
Standard_Real First, Last;
Handle(Geom_Curve) c3d;
ShapeAnalysis_Edge sae;
if (shape.ShapeType() == TopAbs_SHELL) myShells.Add (shape); //szv#4:S4163:12Mar99 i =
else {
for (TopExp_Explorer exs (shape,TopAbs_SHELL); exs.More(); exs.Next()) {
- TopoDS_Shape sh = exs.Current();
+ const TopoDS_Shape& sh = exs.Current();
myShells.Add (sh); //szv#4:S4163:12Mar99 i =
}
}
TopTools_IndexedMapOfShape dirs, revs, ints;
for (TopExp_Explorer exs(shape,TopAbs_SHELL); exs.More(); exs.Next()) {
- TopoDS_Shape sh = exs.Current();
+ const TopoDS_Shape& sh = exs.Current();
//szv#4:S4163:12Mar99 optimized
if (CheckEdges (sh,myBad,dirs,revs,ints))
if (myShells.Add (sh)) res = Standard_True;
Standard_Integer nb = dirs.Extent();
Standard_Integer i; // svv Jan11 2000 : porting on DEC
for (i = 1; i <= nb; i ++) {
- TopoDS_Shape sh = dirs.FindKey (i);
+ const TopoDS_Shape& sh = dirs.FindKey (i);
if (!myBad.Contains(sh)) {
if (!revs.Contains(sh)) {
if(checkinternaledges) {
nb = revs.Extent();
for (i = 1; i <= nb; i ++) {
- TopoDS_Shape sh = revs.FindKey (i);
+ const TopoDS_Shape& sh = revs.FindKey (i);
if (!myBad.Contains(sh)) {
if (!dirs.Contains(sh)) {
if(checkinternaledges) {
//function : CorrectParameter
//purpose : auxiliary
//=======================================================================
-static Standard_Real CorrectParameter(const Handle(Geom2d_Curve) crv,
+static Standard_Real CorrectParameter(const Handle(Geom2d_Curve)& crv,
const Standard_Real param)
{
if(crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
//update tolerance
Standard_Boolean needUpdate = Standard_False;
gp_Pnt aPV = (*((Handle(BRep_TVertex)*)&anewV.TShape()))->Pnt();
- TopLoc_Location toLoc = toedge.Location();
+ const TopLoc_Location& toLoc = toedge.Location();
BRep_ListIteratorOfListOfCurveRepresentation toitcr
((*((Handle(BRep_TEdge)*)&toedge.TShape()))->ChangeCurves());
void ShapeBuild_Edge::CopyPCurves (const TopoDS_Edge& toedge, const TopoDS_Edge& fromedge) const
{
- TopLoc_Location fromLoc = fromedge.Location();
- TopLoc_Location toLoc = toedge.Location();
+ const TopLoc_Location& fromLoc = fromedge.Location();
+ const TopLoc_Location& toLoc = toedge.Location();
for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr
((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) {
Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value());
TopoDS_Compound C;
B.MakeCompound (C);
for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
- TopoDS_Shape sh = it.Value();
+ const TopoDS_Shape& sh = it.Value();
Standard_Integer stat = Status (sh,newsh,Standard_False);
if (stat != 0) modif = 1;
if (stat >= 0) B.Add (C,newsh);
TopoDS_Solid S;
B.MakeSolid (S);
for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
- TopoDS_Shape sh = it.Value();
+ const TopoDS_Shape& sh = it.Value();
newsh = Apply (sh,until,buildmode);
if (newsh.IsNull()) {
modif = -1;
else if (newsh.ShapeType() != TopAbs_SHELL) {
Standard_Integer nbsub = 0;
for (TopExp_Explorer exh(newsh,TopAbs_SHELL); exh.More(); exh.Next()) {
- TopoDS_Shape onesh = exh.Current ();
+ const TopoDS_Shape& onesh = exh.Current ();
B.Add (S,onesh);
nbsub ++;
}
TopoDS_Shell S;
B.MakeShell (S);
for (TopoDS_Iterator it (shape); it.More(); it.Next()) {
- TopoDS_Shape sh = it.Value();
+ const TopoDS_Shape& sh = it.Value();
newsh = Apply (sh,until,buildmode);
if (newsh.IsNull()) {
modif = -1;
else if (newsh.ShapeType() != TopAbs_FACE) {
Standard_Integer nbsub = 0;
for (TopExp_Explorer exf(newsh,TopAbs_FACE); exf.More(); exf.Next()) {
- TopoDS_Shape onesh = exf.Current ();
+ const TopoDS_Shape& onesh = exf.Current ();
B.Add (S,onesh);
nbsub ++;
}
// apply recorded modifications to subshapes
for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) {
- TopoDS_Shape sh = it.Value();
+ const TopoDS_Shape& sh = it.Value();
newsh = Apply ( sh, until );
if ( newsh != sh ) {
if ( ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) )
}
Standard_Integer nitems = 0;
for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) {
- TopoDS_Shape subsh = subit.Value();
+ const TopoDS_Shape& subsh = subit.Value();
if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );
else locStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 );
}
}
GeomAPI_PointsToBSpline appr(points3d, params->Array1(), 1, 10, GeomAbs_C1, theTolerance2d);
- Handle(Geom_BSplineCurve) crv3d = appr.Curve();
+ const Handle(Geom_BSplineCurve)& crv3d = appr.Curve();
Standard_Integer NbPoles = crv3d->NbPoles();
TColgp_Array1OfPnt poles3d (1, NbPoles);
TColgp_Array1OfPnt2d poles2d (1, NbPoles);
const TopoDS_Shape& comp, const Standard_Boolean expcomp)
{
for (TopoDS_Iterator it (comp); it.More(); it.Next()) {
- TopoDS_Shape sub = it.Value();
+ const TopoDS_Shape& sub = it.Value();
if (sub.ShapeType() != TopAbs_COMPOUND) list->Append (sub);
else if (!expcomp) list->Append (sub);
else FillList (list,sub,expcomp);
if (!compound || res != TopAbs_COMPOUND) return res;
res = TopAbs_SHAPE;
for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) {
- TopoDS_Shape sh = iter.Value();
+ const TopoDS_Shape& sh = iter.Value();
if (sh.IsNull()) continue;
TopAbs_ShapeEnum typ = sh.ShapeType();
if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound);
//purpose : auxiliary for FixVertexPosition
//=======================================================================
static Standard_Boolean getNearestEdges(TopTools_ListOfShape& theLEdges,
- const TopoDS_Vertex theVert,
+ const TopoDS_Vertex& theVert,
TopTools_SequenceOfShape& theSuitEdges,
TopTools_SequenceOfShape& theRejectEdges,
const Standard_Real theTolerance,
Standard_Integer nV =1;
TopoDS_Iterator aExp3(aExp1.Current());
for( ; aExp3.More(); aExp3.Next(),nV++) {
- TopoDS_Shape aVert = aExp3.Value();
+ const TopoDS_Shape& aVert = aExp3.Value();
if(nV ==1)
aVert1 = aVert;
else if(aVert1.IsSame(aVert))
// After applying context to (seam) edge, distribute its indices on new edges,
// according to their parameters on that edge
static void DistributeSplitPoints (const Handle(ShapeExtend_WireData) &sbwd,
- const TopoDS_Face myFace,
+ const TopoDS_Face& myFace,
const Standard_Integer index,
const Standard_Integer nsplit,
TColStd_SequenceOfInteger& indexes,
//function : GetGridResolution
//purpose : auxiliary
//=======================================================================
-static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal) SplitValues,
+static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal)& SplitValues,
const Standard_Integer cutIndex)
{
Standard_Integer nb = SplitValues->Length();
ShapeFix_WireSegment wire = seqw(i);
if(wire.IsVertex())
continue;
- Handle(ShapeExtend_WireData) sbwd = wire.WireData();
+ const Handle(ShapeExtend_WireData)& sbwd = wire.WireData();
// find first vertex for split
Standard_Integer j; // svv #1
// -1 - short in 3d but not in 2d (to be checked after algo and atteching to
// another wire if alone)
static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
- const TopoDS_Face myFace,
+ const TopoDS_Face& myFace,
const Handle(Geom_Surface)& myGrid,
const TopLoc_Location &myLoc,
const Standard_Real UResolution,
Standard_Integer code = 1;
ShapeAnalysis_Edge sae;
- Handle(ShapeExtend_WireData) sbwd = seg.WireData();
+ const Handle(ShapeExtend_WireData)& sbwd = seg.WireData();
for ( Standard_Integer i=1; i <= sbwd->NbEdges(); i++ ) {
TopoDS_Edge edge = sbwd->Edge ( i );
if ( ! Vf.IsSame ( sae.LastVertex ( edge ) ) ) return 0;
// find next segment to connect (or first if sbwd is NULL)
for ( i = 1; i <= seqw.Length(); i++ ) {
- ShapeFix_WireSegment seg = seqw.Value(i);
+ const ShapeFix_WireSegment& seg = seqw.Value(i);
if(seg.IsVertex())
continue;
TopAbs_Orientation anOr = seg.Orientation();
// distance 2
// short auto
// angle ->> PI 1
- Handle(ShapeExtend_WireData) wire = seg.WireData();
+ const Handle(ShapeExtend_WireData)& wire = seg.WireData();
for ( Standard_Integer j=0; j <2; j++ ) {
if ( ! endV.IsSame ( j ? seg.LastVertex() : seg.FirstVertex() ) ) continue;
Bnd_Box2d box;
ShapeAnalysis_Edge sae;
ShapeAnalysis_Curve sac;
- Handle(ShapeExtend_WireData) wd = wire.WireData();
+ const Handle(ShapeExtend_WireData)& wd = wire.WireData();
for(Standard_Integer i = 1; i <= wd->NbEdges(); i++) {
TopoDS_Edge E = wd->Edge (i);
Standard_Real cf,cl;
if ( loops.Length() == 1 ) {
TopoDS_Face newFace;
B.MakeFace ( newFace, surf, myLoc, ::Precision::Confusion() );
- TopoDS_Shape aSH = loops.Value(1);
+ const TopoDS_Shape& aSH = loops.Value(1);
if( aSH.ShapeType() != TopAbs_WIRE)
return;
TopoDS_Wire wire = TopoDS::Wire ( loops.Value(1) );
loops.Append(wires(i).GetVertex());
}
else {
- Handle(ShapeExtend_WireData) aWD = aSeg.WireData();
+ const Handle(ShapeExtend_WireData)& aWD = aSeg.WireData();
if(!aWD.IsNull())
loops.Append ( aWD->Wire() );
}
TopoDS_Shape aCurW = aItW.Value();
while(aMapReorderedWires.IsBound(aCurW))
{
- TopoDS_Shape aFixW = aMapReorderedWires.Find(aCurW);
+ const TopoDS_Shape& aFixW = aMapReorderedWires.Find(aCurW);
Context()->Replace(aCurW, aFixW);
aCurW = aFixW;
}
// Shift all pcurves of edges in the given wire on the given face
// to vector <vec>
-static void Shift2dWire(const TopoDS_Wire w, const TopoDS_Face f,
+static void Shift2dWire(const TopoDS_Wire& w, const TopoDS_Face& f,
const gp_Vec2d vec,
const Handle(ShapeAnalysis_Surface)& mySurf,
Standard_Boolean recompute3d = Standard_False)
if(nb < nbAll) {
for( i =1; i <= nbAll;i++) {
- TopoDS_Shape aS2 = allSubShapes.Value(i);
+ const TopoDS_Shape& aS2 = allSubShapes.Value(i);
if(aS2.ShapeType() != TopAbs_WIRE ||
(aS2.Orientation() != TopAbs_FORWARD && aS2.Orientation() != TopAbs_REVERSED))
B.Add ( S,aS2);
B.Add(newface,wire);
}
for(i=1 ; i<=SeqNMShapes.Length(); i++) {
- TopoDS_Shape aNMS = SeqNMShapes.Value(i);
+ const TopoDS_Shape& aNMS = SeqNMShapes.Value(i);
B.Add(newface,aNMS);
}
newface.Orientation(ori);
TopTools_SequenceOfShape AddShapes;
for(Standard_Integer i1 = 1 ; i1<=Lface.Length();i1++ ) {
- TopoDS_Shape aShape = Lface.Value(i1);
+ const TopoDS_Shape& aShape = Lface.Value(i1);
Standard_Integer aNbMultEdges =0;
for(TopoDS_Iterator aItWires(aShape,Standard_False); aItWires.More(); aItWires.Next()) {
Standard_Integer aNbEdges =0;
for(TopoDS_Iterator aItEdges(aItWires.Value(),Standard_False); aItEdges.More(); aItEdges.Next(),aNbEdges++) {
- TopoDS_Shape edge = aItEdges.Value();
+ const TopoDS_Shape& edge = aItEdges.Value();
if(!aMapMultiConnectEdges.Contains(edge)) continue;
aNbMultEdges++;
}
TopTools_DataMapOfShapeShape aTmpFaceShell;
if(GetShells(llPosibleShells,aMap,aTmpShells,aTmpFaceShell,aTmp)) {
for(Standard_Integer kk =1; kk <= aTmpShells.Length(); kk++) {
- TopoDS_Shape aSh = aTmpShells.Value(kk);
+ const TopoDS_Shape& aSh = aTmpShells.Value(kk);
TopTools_MapOfShape mapEdges;
if(GetFreeEdges(aSh,mapEdges)) {
Standard_Integer nbedge =0;
for(Standard_Integer k1 =1; k1 <= AddShapes.Length(); k1++) {
TopTools_DataMapOfShapeInteger MapOtherShells;
TopTools_MapOfShape dire,reve;
- TopoDS_Shape aSh = AddShapes.Value(k1);
+ const TopoDS_Shape& aSh = AddShapes.Value(k1);
TopTools_MapOfShape mapEdges;
if(!GetFreeEdges(aSh,mapEdges)) continue;
TopTools_ListOfShape lfaces;
Standard_Boolean isReversed = Standard_False;
Standard_Integer nbedge =0;
TopTools_MapOfShape mapEdges2;
- TopoDS_Shape aShell2 = OpenShells.Value(j);
+ const TopoDS_Shape& aShell2 = OpenShells.Value(j);
if(!GetFreeEdges(aShell2,mapEdges2)) continue;
for(TopTools_MapIteratorOfMapOfShape aIte2( mapEdges2);aIte2.More() && isAddShell;aIte2.Next()) {
TopoDS_Edge edge2 = TopoDS::Edge(aIte2.Key());
{
TopTools_IndexedDataMapOfShapeListOfShape aMap;
for(Standard_Integer i =1 ; i <= SeqShells.Length(); i++) {
- TopoDS_Shape aShell = SeqShells.Value(i);
+ const TopoDS_Shape& aShell = SeqShells.Value(i);
TopTools_IndexedMapOfShape medeg;
TopExp::MapShapes(aShell,TopAbs_EDGE,medeg);
for(TopTools_MapIteratorOfMapOfShape mit(aMapMultiConnectEdges); mit.More(); mit.Next()) {
//for(TopExp_Explorer aExp(aShell,TopAbs_EDGE); aExp.More(); aExp.Next(),nbe++) {
//TopoDS_Shape ae = aExp.Current();
- TopoDS_Shape ae =mit.Key();
+ const TopoDS_Shape& ae =mit.Key();
//if( aMapMultiConnectEdges.Contains(aExp.Current())) {
if(medeg.Contains(ae)) {
if(aMap.Contains(ae))
else if(ismerged) {
TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value());
while(aMapShells.Contains(arshell)){
- TopoDS_Shape ss = aMapShells.FindFromKey(arshell);
+ const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell);
if(ss.IsSame(arshell)) break;
arshell = ss;
}
else {
TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value());
while(aMapShells.Contains(arshell)) {
- TopoDS_Shape ss = aMapShells.FindFromKey(arshell);
+ const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell);
if(ss.IsSame(arshell)) break;
arshell = ss;
}
}
if(mapmerge.Extent() >1 || ismerged) {
for(TopTools_MapIteratorOfMapOfShape alit1(mapmerge); alit1.More();alit1.Next()) {
- TopoDS_Shape oldShell = alit1.Key();
+ const TopoDS_Shape& oldShell = alit1.Key();
//while(aMapShells.Contains(oldShell)) {
// TopoDS_Shape ss = aMapShells.FindFromKey(oldShell);
// if(ss.IsSame(oldShell)) break;
if(aMapShells.Contains(SeqShells.Value(nn))) {
TopoDS_Shape aNewShell = aMapShells.FindFromKey(SeqShells.Value(nn));
while(aMapShells.Contains(aNewShell)) {
- TopoDS_Shape ss = aMapShells.FindFromKey(aNewShell);
+ const TopoDS_Shape& ss = aMapShells.FindFromKey(aNewShell);
if(ss.IsSame(aNewShell)) break;
aNewShell = ss;
}
if(!st) continue;
for ( Standard_Integer j = 1; j <= aSeqShells.Length(); j++ ) {
if(i==j) continue;
- TopoDS_Shape aShell2 = aSeqShells.Value(j);
+ const TopoDS_Shape& aShell2 = aSeqShells.Value(j);
if(!BRep_Tool::IsClosed(aShell2)) continue;
if(aMapHoles.Contains(aShell2)) continue;
if(aMapShellHoles.IsBound(aShell2)) {
//purpose :
//=======================================================================
-static Standard_Boolean CreateSolids(const TopoDS_Shape theShape,TopTools_IndexedMapOfShape& aMapSolids)
+static Standard_Boolean CreateSolids(const TopoDS_Shape& theShape,TopTools_IndexedMapOfShape& aMapSolids)
{
TopTools_SequenceOfShape aSeqShells;
Standard_Boolean isDone = Standard_False;
if(aExp.More()) {
TopoDS_Shell aShtmp = TopoDS::Shell(aExp.Current());
ShapeAnalysis_FreeBounds sfb(aShtmp);
- TopoDS_Compound aC1 = sfb.GetClosedWires();
- TopoDS_Compound aC2 = sfb.GetOpenWires();
+ const TopoDS_Compound& aC1 = sfb.GetClosedWires();
+ const TopoDS_Compound& aC2 = sfb.GetOpenWires();
Standard_Integer numedge =0;
TopExp_Explorer aExp1(aC1,TopAbs_EDGE);
for( ; aExp1.More(); aExp1.Next())
if(CreateSolids(aResShape,aMapSolids)) {
SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG20"));// Orientation of shell was corrected..
if(aMapSolids.Extent() ==1) {
- TopoDS_Shape aResSol = aMapSolids.FindKey(1);
+ const TopoDS_Shape& aResSol = aMapSolids.FindKey(1);
if(aResShape.ShapeType() == TopAbs_SHELL && myCreateOpenSolidMode) {
TopoDS_Solid solid;
BRep_Builder B;
const TopoDS_Edge& fromedge,
const Standard_Boolean reverse)
{
- TopLoc_Location fromLoc = fromedge.Location();
- TopLoc_Location toLoc = toedge.Location();
+ const TopLoc_Location& fromLoc = fromedge.Location();
+ const TopLoc_Location& toLoc = toedge.Location();
for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr
((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) {
Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value());
{
TopoDS_Shape r = S;
//gka -modification to keep history for shape with location (OCC21617)
- TopLoc_Location aShLoc = S.Location();
+ const TopLoc_Location& aShLoc = S.Location();
TopLoc_Location aNullLoc;
r.Location(aNullLoc);
Standard_Boolean modif = Standard_False;
BRep_Builder B;
for ( TopoDS_Iterator it(r,Standard_False); it.More(); it.Next() ) {
- TopoDS_Shape sh = it.Value();
+ const TopoDS_Shape& sh = it.Value();
if ( repl.IsBound(sh) ) {
- TopoDS_Shape newsh = repl.Find(sh);
+ const TopoDS_Shape& newsh = repl.Find(sh);
if ( ! newsh.IsNull() ) B.Add ( result, newsh );
modif = Standard_True;
}
TopTools_DataMapOfShapeShape &map,
const TopAbs_ShapeEnum until)
{
- TopoDS_Shape res = repl.ModifiedShape ( S );
+ const TopoDS_Shape& res = repl.ModifiedShape ( S );
if ( res != S )
{
//purpose :
//=======================================================================
-static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf,
+static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface)& surf,
const Standard_Real U1,
const Standard_Real U2,
const Standard_Real V1,
TopTools_IndexedDataMapOfShapeListOfShape aWireFaces;
Standard_Integer i =1, nb = theSeqShapes.Length();
for( ; i <= nb; i++) {
- TopoDS_Shape aS = theSeqShapes.Value(i);
+ const TopoDS_Shape& aS = theSeqShapes.Value(i);
if(aS.ShapeType() == TopAbs_FACE)
removeSmallWire(aS,TopoDS_Wire());
else if(aS.ShapeType() == TopAbs_WIRE) {
TopoDS_Iterator aIte(aW,Standard_False);
for( ; aIte.More(); aIte.Next()) {
- TopoDS_Shape aE = aIte.Value();
+ const TopoDS_Shape& aE = aIte.Value();
if(myRemoveEdges.IsBound(aE))
myRemoveEdges.ChangeFind(aE).Append(aF);
else {
//collecting all faces containing edges from removed wire
for( ; aIte.More(); aIte.Next()) {
- TopoDS_Shape aEdge = aIte.Value();
+ const TopoDS_Shape& aEdge = aIte.Value();
if(!myEdgeFaces.Contains(aEdge)) {
myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
continue;
Standard_Boolean ShapeUpgrade_RemoveLocations::Remove(const TopoDS_Shape& theShape)
{
- TopoDS_Shape aShape = theShape;
+ const TopoDS_Shape& aShape = theShape;
myShape = aShape;
TopAbs_ShapeEnum shtype = theShape.ShapeType();
Standard_Boolean isRemoveLoc = ((shtype != TopAbs_COMPOUND && myLevelRemoving == TopAbs_SHAPE) ||
aNewShape= myMapNewShapes.Find(aShape);
aNewShape.Orientation(theShape.Orientation());
if(!theRemoveLoc && !theShape.Location().IsIdentity()) {
- TopLoc_Location aL = theShape.Location();
+ const TopLoc_Location& aL = theShape.Location();
aNewShape.Location(aL);
}
if(shtype != TopAbs_EDGE) {
aNewShape.Orientation(TopAbs_FORWARD);
TopoDS_Iterator aIt(aShape,Standard_False,isRemoveLoc);
for( ; aIt.More(); aIt.Next()) {
- TopoDS_Shape subshape = aIt.Value();
+ const TopoDS_Shape& subshape = aIt.Value();
TopoDS_Shape anewsubshape;
Standard_Boolean isDoneSubShape = MakeNewShape(subshape,anAncShape,anewsubshape,isRemoveLoc);
isDone = (isDone || isDoneSubShape);
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
if ( spc.Status ( ShapeExtend_DONE3 ) ) {
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
- Handle(Geom_Curve) aNewBascurve = spc.GetCurve();
+ const Handle(Geom_Curve)& aNewBascurve = spc.GetCurve();
Surface->SetBasisCurve(aNewBascurve);
}
return;
// seams and equal edges are dropped
// Returns true if one of original edges dropped
static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
- const TopoDS_Shape aShape,
+ const TopoDS_Shape& aShape,
Standard_Integer& anIndex,
TopTools_SequenceOfShape& theRemovedEdges)
{
TopTools_IndexedMapOfShape aNewEdges;
//add edges without seams
for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) {
- TopoDS_Shape edge = exp.Current();
+ const TopoDS_Shape& edge = exp.Current();
if(aNewEdges.Contains(edge))
{
aNewEdges.RemoveKey(edge);
// fill in the map V-E
for (TopoDS_Iterator it(anEdge.Oriented(TopAbs_FORWARD)); it.More(); it.Next())
{
- TopoDS_Shape aV = it.Value();
+ const TopoDS_Shape& aV = it.Value();
if (aV.Orientation() == TopAbs_FORWARD || aV.Orientation() == TopAbs_REVERSED)
{
if (!aMapVE.Contains(aV))
Standard_Boolean hasConnectAnotherFaces = Standard_False;
TopExp_Explorer ex(faces(i), TopAbs_EDGE);
for (; ex.More() && !hasConnectAnotherFaces; ex.Next()) {
- TopoDS_Shape aE = ex.Current();
+ const TopoDS_Shape& aE = ex.Current();
const TopTools_ListOfShape& aLF = aMapEF.FindFromKey(aE);
if (aLF.Extent() > 1) {
for (it.Init(aLF); it.More() && !hasConnectAnotherFaces; it.Next()) {
//purpose :
//=======================================================================
-static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d,
- const Handle(TColStd_HSequenceOfReal) orig2d,
+static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal)& orig3d,
+ const Handle(TColStd_HSequenceOfReal)& orig2d,
Handle(TColStd_HSequenceOfReal) new2d,
Handle(TColStd_HSequenceOfReal) new3d)
{
StdLPersistent_HArray1OfPersistent::Iterator anIter (*myVariables->Array());
for (; anIter.More(); anIter.Next())
{
- const Handle(StdObjMgt_Persistent) aPersistent = anIter.Value();
+ const Handle(StdObjMgt_Persistent)& aPersistent = anIter.Value();
if (aPersistent)
theAttribute->GetVariables().Append (aPersistent->GetAttribute());
}
StdLPersistent_HArray1OfPersistent::Iterator anIter (*myArgs->Array());
for (; anIter.More(); anIter.Next())
{
- Handle(StdObjMgt_Persistent) aPersistent = anIter.Value();
+ const Handle(StdObjMgt_Persistent)& aPersistent = anIter.Value();
if (aPersistent)
{
Handle(TDF_Attribute) anArg = aPersistent->GetAttribute();
// purpose:
//==================================================================
static void DrawCurve (const Adaptor3d_Curve& aCurve,
- const Handle(Graphic3d_Group) aGroup,
+ const Handle(Graphic3d_Group)& aGroup,
const Standard_Integer NbP,
const Standard_Real U1,
const Standard_Real U2,
aSequence = new StepFEA_HSequenceOfElementRepresentation;
for (; anIter.More(); anIter.Next()) {
- Handle(Standard_Transient) anEntity = anIter.Value();
+ const Handle(Standard_Transient)& anEntity = anIter.Value();
if(anEntity->IsKind(theType)) {
Handle(StepFEA_ElementRepresentation) anElement =
Handle(StepFEA_ElementRepresentation)::DownCast(anEntity);
Interface_ShareTool sh(me,aHP);
Handle(Interface_GeneralModule) module; Standard_Integer CN;
for (Interface_EntityIterator iter = Header(); iter.More(); iter.Next()) {
- Handle(Standard_Transient) head = iter.Value();
+ const Handle(Standard_Transient)& head = iter.Value();
if (!lib.Select(head,module,CN)) continue;
module->CheckCase(CN,head,sh,ach);
}
Interface_EntityIterator header = themodel->Header();
thenum = 0;
for (header.Start(); header.More(); header.Next()) {
- Handle(Standard_Transient) anent = header.Value();
+ const Handle(Standard_Transient)& anent = header.Value();
// Write Entity via Lib (similaire a SendEntity)
Handle(StepData_ReadWriteModule) module; Standard_Integer CN;
for (i = 1; i <= nb; i ++) {
Handle(StepData_PDescr) pde;
if (!descr.IsNull()) pde = descr->Field(i);
- const StepData_Field fild = list.Field(i);
+ const StepData_Field& fild = list.Field(i);
SendField (fild,pde);
}
// end entity ?
void StepKinematics_MechanismStateRepresentation::Init(const Handle(TCollection_HAsciiString)& theName,
const Handle(StepRepr_HArray1OfRepresentationItem)& theItems,
const Handle(StepRepr_RepresentationContext)& theContextOfItems,
- const Handle(StepKinematics_MechanismRepresentation) theMechanism)
+ const Handle(StepKinematics_MechanismRepresentation)& theMechanism)
{
StepRepr_Representation::Init(theName, theItems, theContextOfItems);
myRepresentedMechanism = theMechanism;
//! Returns a MechanismStateRepresentation
Standard_EXPORT StepKinematics_MechanismStateRepresentation();
- Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation) theMechanism);
+ Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation)& theMechanism);
Standard_EXPORT void SetMechanism(const Handle(StepKinematics_MechanismRepresentation)& theMechanism);
void StepRepr_ReprItemAndMeasureWithUnitAndQRI::Init (const Handle(StepBasic_MeasureWithUnit)& aMWU,
const Handle(StepRepr_RepresentationItem)& aRI,
- const Handle(StepShape_QualifiedRepresentationItem) aQRI)
+ const Handle(StepShape_QualifiedRepresentationItem)& aQRI)
{
StepRepr_ReprItemAndMeasureWithUnit::Init(aMWU, aRI);
myQualifiedRepresentationItem = aQRI;
Standard_EXPORT StepRepr_ReprItemAndMeasureWithUnitAndQRI();
- Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem) aQRI);
+ Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem)& aQRI);
Standard_EXPORT void SetQualifiedRepresentationItem (const Handle(StepShape_QualifiedRepresentationItem)& aQRI);
{
Message_ProgressRange aRange = aPS.Next();
StepShape_GeometricSetSelect aGSS = GCS->ElementsValue(i);
- Handle(Standard_Transient) ent = aGSS.Value();
+ const Handle(Standard_Transient)& ent = aGSS.Value();
TopoDS_Shape res = TransferBRep::ShapeResult ( TP, ent );
if ( ! res.IsNull() ) { // already translated
Standard_Boolean result = Standard_True;
TopExp_Explorer edgeExp(Shell, TopAbs_EDGE);
for ( ; edgeExp.More(); edgeExp.Next() ) {
- TopoDS_Shape currentEdge = edgeExp.Current();
+ const TopoDS_Shape& currentEdge = edgeExp.Current();
if ( !this->isEdgeRegisteredAsNM(currentEdge) ) {
result = Standard_False;
break;
TopExp_Explorer edgeExpA(ShellA, TopAbs_EDGE);
for ( ; edgeExpA.More(); edgeExpA.Next() ) {
- TopoDS_Shape currentEdgeA = edgeExpA.Current();
+ const TopoDS_Shape& currentEdgeA = edgeExpA.Current();
TopExp_Explorer edgeExpB(ShellB, TopAbs_EDGE);
for ( ; edgeExpB.More(); edgeExpB.Next() ) {
- TopoDS_Shape currentEdgeB = edgeExpB.Current();
+ const TopoDS_Shape& currentEdgeB = edgeExpB.Current();
if ( currentEdgeA.IsSame(currentEdgeB) )
return Standard_True;
}
// ============================================================================
static Handle(Geom_Curve) MakeCurve
- (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess) TP)
+ (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess)& TP)
{
Handle(Geom_Curve) C2 = Handle(Geom_Curve)::DownCast (TP->FindTransient(C1));
if (!C2.IsNull()) return C2;
// TDF_Tool::Entry(itr.Value()->Label(), entr1); //d
// std::cout<<"\tSource Attribute dynamic type = "<<itr.Value()->DynamicType()<<" Label = "<<entr1 <<std::endl;
for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) {
- Handle(TDF_Attribute) att = attMItr.Key();
+ const Handle(TDF_Attribute)& att = attMItr.Key();
// TDF_Tool::Entry(att->Label(), entr1);
// std::cout<<"\t\tReferences attribute dynamic type = "<<att->DynamicType()<<" Label = "<<entr1 <<std::endl;
TDF_ClosureTool::Closure(ds, myFilter, mode);
if(extReferers) {
for (TDF_MapIteratorOfAttributeMap attMItr(myMapOfExt);attMItr.More(); attMItr.Next()) {
- Handle(TDF_Attribute) att = attMItr.Key();
+ const Handle(TDF_Attribute)& att = attMItr.Key();
myRT->SetRelocation(att, att);
#ifdef OCCT_DEBUG
PrintEntry(att->Label(), Standard_True);
if (aPtrCurrentAtt->mySavedTransaction >=
aPtrCurrentAtt->myTransaction)
{
- const Handle(TDF_Attribute) currentAtt = aPtrCurrentAtt;
+ const Handle(TDF_Attribute)& currentAtt = aPtrCurrentAtt;
// Collision with a not forgotten version.
if (backupAtt.IsNull()) {
TDF_Data_DeltaCreation
attMItr.More(); attMItr.Next()) {
// CLE
// const Handle(TDF_Attribute)& att = attMItr.Key();
- Handle(TDF_Attribute) att = attMItr.Key();
+ const Handle(TDF_Attribute)& att = attMItr.Key();
if (!att.IsNull() && !att->Label().IsNull())
{
// ENDCLE
attMItr.More(); attMItr.Next()) {
// CLE
// const Handle(TDF_Attribute)& att = attMItr.Key();
- Handle(TDF_Attribute) att = attMItr.Key();
+ const Handle(TDF_Attribute)& att = attMItr.Key();
// ENDCLE
if (aFilterForReferences.IsKept(att) &&
!att->Label().IsNull() &&
itr.Value()->References(ds);
const TDF_AttributeMap& attMap = ds->Attributes();
for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More();attMItr.Next()) {
- Handle(TDF_Attribute) att = attMItr.Key();
+ const Handle(TDF_Attribute)& att = attMItr.Key();
if (aFilterForReferences.IsKept(att) &&
!att->Label().IsNull() &&
!att->Label().IsDescendant(aRefLabel))
NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_RetrievalDriver)>::Iterator
anIter(myReaders);
for (; anIter.More(); anIter.Next()) {
- Handle(PCDM_RetrievalDriver) aDriver = anIter.Value();
+ const Handle(PCDM_RetrievalDriver)& aDriver = anIter.Value();
if (aDriver.IsNull() == Standard_False) {
theFormats.Append(anIter.Key());
}
NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_StorageDriver)>::Iterator
anIter(myWriters);
for (; anIter.More(); anIter.Next()) {
- Handle(PCDM_StorageDriver) aDriver = anIter.Value();
+ const Handle(PCDM_StorageDriver)& aDriver = anIter.Value();
if (aDriver.IsNull() == Standard_False) {
theFormats.Append(anIter.Key());
}
//purpose : Tries to make shape with given type from the given shape
//=======================================================================
-static TopoDS_Shape ShapeWithType(const TopoDS_Shape theShape,
+static TopoDS_Shape ShapeWithType(const TopoDS_Shape& theShape,
const TopAbs_ShapeEnum theType ) {
if (theShape.IsNull() || theType == TopAbs_SHAPE) return theShape;
Standard_Integer aType = theShape.ShapeType();
//----------------------------------------
// First argument: collection has to be filtered.
//----------------------------------------
- Handle(TNaming_NamedShape) Cand = Args.First(); //collection of candidates
+ const Handle(TNaming_NamedShape)& Cand = Args.First(); //collection of candidates
#ifdef OCCT_DEBUG_FNB
Standard_Integer i = 1;
//purpose :
//=======================================================================
-void TObj_Assistant::BindModel (const Handle(TObj_Model) theModel)
+void TObj_Assistant::BindModel (const Handle(TObj_Model)& theModel)
{
getModels().Append(theModel);
}
//! Binds model to the map
static Standard_EXPORT void
- BindModel (const Handle(TObj_Model) theModel);
+ BindModel (const Handle(TObj_Model)& theModel);
//! Clears all records from the model map
static Standard_EXPORT void
if ( ! ClearShapeSameDomain(aS1, aS2, HDS) ) return;
- TopoDS_Shape S1 = aS1;
- TopoDS_Shape S2 = aS2;
+ const TopoDS_Shape& S1 = aS1;
+ const TopoDS_Shape& S2 = aS2;
TopOpeBRepDS_DataStructure& BDS1 = HDS->ChangeDS();
BDS1.AddShape(S1,1);
BDS1.AddShape(S2,2);
SetShapeTransition(P2D,T1,T2);
if (isvertex1) {
- const TopoDS_Shape V = V1;
+ const TopoDS_Shape& V = V1;
Standard_Integer Vindex = myPDS->AddShape(V,1);
TopOpeBRepDS_Config SSC = P2D.EdgesConfig();
EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_True,SSC,par1,1);
}
if (isvertex2) {
- const TopoDS_Shape V = V2;
+ const TopoDS_Shape& V = V2;
Standard_Integer Vindex = myPDS->AddShape(V,2);
TopOpeBRepDS_Config SSC = P2D.EdgesConfig();
EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_False,SSC,par1,1);
// P.IsOnDomS1() and P.IsOnDomS2() are both false
Standard_Integer nbv = LI.NbVPoint();
- TopOpeBRep_VPointInter P1 = LI.VPoint(1);
+ const TopOpeBRep_VPointInter& P1 = LI.VPoint(1);
Standard_Real par1 = P1.ParameterOnLine();
- TopOpeBRep_VPointInter Pn = LI.VPoint(nbv);
+ const TopOpeBRep_VPointInter& Pn = LI.VPoint(nbv);
Standard_Real parn = Pn.ParameterOnLine();
Standard_Real par = P.ParameterOnLine();
Standard_Boolean& EPIfound, Handle(TopOpeBRepDS_Interference)& IEPI, // out
Standard_Boolean& CPIfound, Handle(TopOpeBRepDS_Interference)& ICPI, // out
const Standard_Integer mkVP);
-Standard_EXPORT Standard_Boolean FUN_newtransEdge(const Handle(TopOpeBRepDS_HDataStructure) HDS,
+Standard_EXPORT Standard_Boolean FUN_newtransEdge(const Handle(TopOpeBRepDS_HDataStructure)& HDS,
const TopOpeBRep_FacesFiller& FF,
const TopOpeBRep_LineInter& L,
const Standard_Boolean& Lonrest,
//-----------------------------------------------------------------------
static void FUN_ALINETOWLINE (const Handle(IntPatch_ALine)& AL,
- const Handle(BRepAdaptor_Surface) surf1,
- const Handle(BRepAdaptor_Surface) surf2,
+ const Handle(BRepAdaptor_Surface)& surf1,
+ const Handle(BRepAdaptor_Surface)& surf2,
IntPatch_SequenceOfLine& theLines)
{
Standard_Integer nbpointsmax = 200;
TopoDS_Wire w = mkw.Wire();
BRepLib_MakeFace mkf( w );
- TopoDS_Face infFace = mkf.Face();
+ const TopoDS_Face& infFace = mkf.Face();
TopoDS_Shell newShell;
TopoDS_Solid newSolid;
Standard_Boolean keep = Standard_True;
if (LITdefinie) {
- Handle(TopOpeBRepDS_Interference) I = DSCIL.Last();
+ const Handle(TopOpeBRepDS_Interference)& I = DSCIL.Last();
TopOpeBRepDS_Transition LIT = I->Transition();
Standard_Boolean LITonsort = M_FORWARD( LIT.Orientation(TopAbs_OUT) );
Standard_Boolean LprecIsEntrant = !LITonsort;
// we have to parametrize the found interference (parameter PIfound)
// and next interference (parline)
- Handle(TopOpeBRepDS_Interference) Ifound = DSCIL.First();
+ const Handle(TopOpeBRepDS_Interference)& Ifound = DSCIL.First();
Standard_Real PIfound = TopOpeBRepDS_InterferenceTool::Parameter(Ifound);
FUNBREP_Periodize(L,Ifound,PIfound,parline);
TopOpeBRepDS_InterferenceTool::Parameter(Ifound,PIfound);
//-----------------------------------------------------------------------
Standard_EXPORT Standard_Boolean FUN_newtransEdge
-(const Handle(TopOpeBRepDS_HDataStructure) HDS,
+(const Handle(TopOpeBRepDS_HDataStructure)& HDS,
const TopOpeBRep_FacesFiller& FF,
const TopOpeBRep_LineInter& L,
const Standard_Boolean& Lonrest,
{
T.Before(TopAbs_UNKNOWN); T.After(TopAbs_UNKNOWN);
const TopoDS_Face& OOface = FF.Face(OOShapeIndex);
- TopoDS_Face FIE = OOface;
+ const TopoDS_Face& FIE = OOface;
{
TopAbs_Orientation oFIE = FIE.Orientation();
if (oFIE == TopAbs_INTERNAL || oFIE == TopAbs_EXTERNAL) {
} // FUN_newtransEdge
//-----------------------------------------------------------------------
-static void FUN_ScanInterfList(const TopOpeBRepDS_Point& PDS, const Handle(TopOpeBRepDS_HDataStructure) HDS,
+static void FUN_ScanInterfList(const TopOpeBRepDS_Point& PDS, const Handle(TopOpeBRepDS_HDataStructure)& HDS,
const TopOpeBRepDS_ListOfInterference& loI, TopOpeBRepDS_ListOfInterference& loIfound)
//-----------------------------------------------------------------------
{
// geometry <G>, and support <S>
TopOpeBRepDS_PointIterator PI(loI);
for (; PI.More(); PI.Next()) {
- Handle(TopOpeBRepDS_Interference) EPI = PI.Value();
+ const Handle(TopOpeBRepDS_Interference)& EPI = PI.Value();
Standard_Integer GEPI = EPI->Geometry(); Standard_Integer SEPI = EPI->Support();
if (GEPI == G && SEPI == S) loIfound.Append(EPI);
}
TopOpeBRepTool_ShapeExplorer exFace;
- TopoDS_Shape SH1 = SH;// SH1.Orientation(TopAbs_FORWARD);
+ const TopoDS_Shape& SH1 = SH;// SH1.Orientation(TopAbs_FORWARD);
//1) process firstly same domain faces and non-interference faces
for (exFace.Init(SH1,TopAbs_FACE); exFace.More(); exFace.Next()) {
//2 Process all other faces
for (exFace.Init(SH1,TopAbs_FACE); exFace.More(); exFace.Next()) {
- TopoDS_Shape FOR = exFace.Current();
+ const TopoDS_Shape& FOR = exFace.Current();
if(!myDataStructure -> HasShape(FOR)
||
myDataStructure->HasSameDomain(FOR))
TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2);
Standard_Boolean RevOri1 = G1.IsToReverse1();
- TopoDS_Shape WW = W; //WW.Orientation(TopAbs_FORWARD);
+ const TopoDS_Shape& WW = W; //WW.Orientation(TopAbs_FORWARD);
TopOpeBRepTool_ShapeExplorer exEdge(WW,TopAbs_EDGE);
for (; exEdge.More(); exEdge.Next()) {
if(myDataStructure -> DS().AncestorRank(FOR) != 1)
return;
- TopOpeBRepBuild_GTopo G1 = Gin;
+ const TopOpeBRepBuild_GTopo& G1 = Gin;
TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2);
{
TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2);
- TopoDS_Shape WW = W; //WW.Orientation(TopAbs_FORWARD);
+ const TopoDS_Shape& WW = W; //WW.Orientation(TopAbs_FORWARD);
Standard_Integer iref = myDataStructure -> DS().AncestorRank(W);
////// aSplFacesState in order to propagate the state for faces.
nE=anEdgesToRestMap.Extent();
for (k=1; k<=nE; k++) {
- const TopoDS_Shape anEdge=anEdgesToRestMap(k);
+ const TopoDS_Shape& anEdge=anEdgesToRestMap(k);
if (aMapOfShapeWithState.Contains (anEdge)) {
const TopOpeBRepDS_ShapeWithState& aSWS=aMapOfShapeWithState.FindFromKey(anEdge);
TopAbs_State aState=aSWS.State();
anEdgeExists=0;
aWExp.Init(aWire, TopAbs_EDGE);
for (; aWExp.More(); aWExp.Next()) {
- TopoDS_Shape anEdge=aWExp.Current();
+ const TopoDS_Shape& anEdge=aWExp.Current();
if (myCopyAvoidMap.Contains(anEdge)) {
anEdgeExists=1;
break;
aWExp.Init(myCurrentWire, TopAbs_EDGE);
for (; aWExp.More(); aWExp.Next(), aNbEdges++) {
- TopoDS_Shape anEdge=aWExp.Current();
+ const TopoDS_Shape& anEdge=aWExp.Current();
if (aCopyAvoidMap.Contains(anEdge))
anAvoidMap.Add(anEdge);
}
if(tSPS) debfille(iE);
#endif
- TopOpeBRepBuild_GTopo GME = G1;
+ const TopOpeBRepBuild_GTopo& GME = G1;
GMergeEdgeWES(EOR,GME,WES);
TopOpeBRepBuild_GTopo GSE = G1;
//(const TopoDS_Face& fF,const TopoDS_Edge& E,Standard_Real& splitpar);
//---------------------------------------------
-static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure) HDS,Standard_Integer& iEinterf)
+static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,Standard_Integer& iEinterf)
//---------------------------------------------
{
TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI);
#define DECREASEPERIOD (-1)
static Standard_Boolean FUN_EPIforEvisoONperiodicF
-(const TopoDS_Edge& E,const TopoDS_Face& F,const TopOpeBRepDS_ListOfInterference& EPIlist,const Handle(TopOpeBRepDS_HDataStructure) HDS,TopOpeBRepDS_ListOfInterference& loCPI)
+(const TopoDS_Edge& E,const TopoDS_Face& F,const TopOpeBRepDS_ListOfInterference& EPIlist,const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopOpeBRepDS_ListOfInterference& loCPI)
{
Standard_Real parone=-1.e7;
TopOpeBRepTool_CORRISO CORRISO(F); CORRISO.Init(F);
for(i = 1; i <= nbVer; i++) {
const TopTools_ListOfShape& Elist = VElists.FindFromIndex(i);
if(Elist.Extent() == 1) {
- TopoDS_Shape anEdge = Elist.First();
+ const TopoDS_Shape& anEdge = Elist.First();
// std::cout << "Remove redundant edge" << std::endl;
BB.Remove(aWire, anEdge);
}
else {
myBuildTool.MakeShell(newShell);
for (SOBU.InitFace(); SOBU.MoreFace(); SOBU.NextFace()) {
- TopoDS_Shape F = SOBU.Face();
+ const TopoDS_Shape& F = SOBU.Face();
myBuildTool.AddShellFace(newShell,F);
}
}
else {
myBuildTool.MakeShell(newShell);
for (SOBU.InitFace(); SOBU.MoreFace(); SOBU.NextFace()) {
- TopoDS_Shape F = SOBU.Face();
+ const TopoDS_Shape& F = SOBU.Face();
myBuildTool.AddShellFace(newShell,F);
}
}
else {
myBuildTool.MakeWire(newWire);
for(FABU.InitEdge(); FABU.MoreEdge(); FABU.NextEdge()) {
- TopoDS_Shape E = FABU.Edge();
+ const TopoDS_Shape& E = FABU.Edge();
if (hns) myBuildTool.UpdateSurface(E,aFace,newFace);
myBuildTool.AddWireEdge(newWire,E);
}
const TopoDS_Edge& anEdgeObj,
gp_Vec& aNormal)
{
- TopoDS_Edge aEd=anEdgeObj;
- TopoDS_Face aFS=aFObj;
+ const TopoDS_Edge& aEd=anEdgeObj;
+ const TopoDS_Face& aFS=aFObj;
Standard_Real f2 = 0., l2 = 0., tolpc = 0., f = 0., l = 0., par = 0.;
Handle(Geom2d_Curve) C2D=FC2D_CurveOnSurface(aEd,aFS,f2,l2,tolpc, Standard_True);
Standard_Boolean TopOpeBRepBuild_Tools::GetTangentToEdge (const TopoDS_Edge& anEdgeObj,
gp_Vec& aTangent)
{
- TopoDS_Edge aEd=anEdgeObj;
+ const TopoDS_Edge& aEd=anEdgeObj;
Standard_Real f = 0., l = 0., par = 0.;
Standard_Boolean DiffOriented = Standard_False;
BRep_Builder BB;
TopoDS_Edge newE = aEdgeToUpdate; //newE.Orientation(TopAbs_FORWARD);
- TopoDS_Face fFace = fromFace; //fFace.Orientation(TopAbs_FORWARD);
- TopoDS_Face tFace = toFace; //tFace.Orientation(TopAbs_FORWARD);
+ const TopoDS_Face& fFace = fromFace; //fFace.Orientation(TopAbs_FORWARD);
+ const TopoDS_Face& tFace = toFace; //tFace.Orientation(TopAbs_FORWARD);
Standard_Real fc = 0., lc = 0.;
Handle(Geom2d_Curve) cc = BRep_Tool::CurveOnSurface(newE, tFace, fc, lc);
myBuildTool.MakeShell(newShell);
nfa = SOBU.InitFace();
for (; SOBU.MoreFace(); SOBU.NextFace()) {
- TopoDS_Shape F = SOBU.Face();
+ const TopoDS_Shape& F = SOBU.Face();
myBuildTool.AddShellFace(newShell,F);
}
}
// Creation d'une arete avec PCurve connectee a la BDS Curve
// JYL 22-09-94
- Handle(TopOpeBRepDS_Interference) I = C.GetSCI1();
+ const Handle(TopOpeBRepDS_Interference)& I = C.GetSCI1();
Handle(TopOpeBRepDS_SurfaceCurveInterference) SCI;
SCI=Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast(I);
Standard_Integer iS = SCI->Support();
//purpose :
//=======================================================================
Standard_Boolean FUN_getUV
-(const Handle(Geom_Surface) surf,
- const Handle(Geom_Curve) C3D,
+(const Handle(Geom_Surface)& surf,
+ const Handle(Geom_Curve)& C3D,
const Standard_Real par3d,
Standard_Real& u0,
Standard_Real& v0)
}
Standard_Boolean FUN_makeUisoLineOnSphe
(const TopoDS_Face& F, // with geometry the spherical surface
- const Handle(Geom_Curve) C3D,
+ const Handle(Geom_Curve)& C3D,
Handle(Geom2d_Curve) PCnew,
const Standard_Real tol3d)
{
{
TopoDS_Face& F1 = *((TopoDS_Face*)(void*)&(TopoDS::Face(newC.Shape1())));
- Handle(Geom2d_Curve) PC1 = newC.Curve1();
+ const Handle(Geom2d_Curve)& PC1 = newC.Curve1();
if (!PC1.IsNull() && comppc1) {
PCurve(F1,E,PC1);
}
TopoDS_Face& F2 = *((TopoDS_Face*)(void*)&(TopoDS::Face(newC.Shape2())));
- Handle(Geom2d_Curve) PC2 = newC.Curve2();
+ const Handle(Geom2d_Curve)& PC2 = newC.Curve2();
if (!PC2.IsNull() && comppc2) {
PCurve(F2,E,PC2);
}
TopoDS_Face FF = TopoDS::Face(F);
TopoDS_Edge EE = TopoDS::Edge(E);
- Handle(Geom2d_Curve) PCT = PC;
+ const Handle(Geom2d_Curve)& PCT = PC;
Standard_Real CDSmin,CDSmax;
Standard_Boolean rangedef = CDS.Range(CDSmin,CDSmax);
// to determine transition relatively solid rather then face
// if possible (see pb. in CFE002 C2, when SIX==13)
Standard_Integer rankFS = BDS.AncestorRank(S1);
- TopoDS_Shape aSRef = BDS.Shape(rankFS);
+ const TopoDS_Shape& aSRef = BDS.Shape(rankFS);
TopExp_Explorer ex(aSRef,TopAbs_SOLID);
if (ex.More()) {
pClass = pClassif;
-static void FUN_tool_sortVonE(TopTools_ListOfShape& lov, const TopoDS_Edge E)
+static void FUN_tool_sortVonE(TopTools_ListOfShape& lov, const TopoDS_Edge& E)
{
TopTools_DataMapOfIntegerShape mapiv;// mapiv.Find(iV) = V
TColStd_IndexedMapOfReal mappar; // mappar.FindIndex(parV) = iV
DEFINE_STANDARD_ALLOC
//! Creates an empty Iterator.
- TopoDS_Iterator() {}
+ TopoDS_Iterator() : myOrientation(TopAbs_FORWARD) {}
//! Creates an Iterator on <S> sub-shapes.
//! Note:
#define Nbpt 23
static Handle(StepGeom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_Curve) &C,
- const Handle(StepGeom_CartesianPoint) P1,
- const Handle(StepGeom_CartesianPoint) P2,
+ const Handle(StepGeom_CartesianPoint)& P1,
+ const Handle(StepGeom_CartesianPoint)& P2,
Standard_Real trim1,
Standard_Real trim2,
Standard_Boolean sense)
{
return Standard_False;
}
- Handle(StepGeom_Curve) aPMSC = aGTSMC.Value();
+ const Handle(StepGeom_Curve)& aPMSC = aGTSMC.Value();
// trim the curve
Standard_Real aTrim1 = aCA.FirstParameter();
NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>::Iterator iter(list);
for (; iter.More(); iter.Next()) {
- TCollection_AsciiString name = iter.Key();
+ const TCollection_AsciiString& name = iter.Key();
if (!name.StartsWith(fromname)) continue;
- Handle(Standard_Transient) atr = iter.Value();
+ const Handle(Standard_Transient)& atr = iter.Value();
Handle(Standard_Transient) newatr = atr;
// Copy ? according type
{
Interface_EntityIterator iter;
for (list.Start(); list.More(); list.Next()) {
- Handle(Transfer_Binder) binder = list.Value();
+ const Handle(Transfer_Binder)& binder = list.Value();
if (binder.IsNull()) continue;
if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder))) continue;
Interface_EntityIterator list = tool.RootEntities();
Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
for (list.Start(); list.More() && aPS.More(); list.Next()) {
- Handle(Standard_Transient) ent = list.Value();
+ const Handle(Standard_Transient)& ent = list.Value();
// Standard_Integer scope = 0;
// if (thescope) scope = theproc->NewScope (ent);
if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
Interface_EntityIterator list = tool.RootEntities();
Message_ProgressScope aPS(theProgress, NULL, list.NbEntities());
for (list.Start(); list.More() && aPS.More(); list.Next()) {
- Handle(Standard_Transient) ent = list.Value();
+ const Handle(Standard_Transient)& ent = list.Value();
// Standard_Integer scope = 0;
// if (thescope) scope = theproc->NewScope (ent);
if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent);
(roots ? TP->RootResult() : TP->CompleteResult());
for (list.Start(); list.More(); list.Next()) {
- Handle(Transfer_Binder) binder = list.Value();
+ const Handle(Transfer_Binder)& binder = list.Value();
ShapeAppend (binder,shapes);
}
return shapes;
nchl.SetModel(model);
for (chl.Start(); chl.More(); chl.Next()) {
Standard_Integer num = 0;
- Handle(Interface_Check) ach = chl.Value();
+ const Handle(Interface_Check)& ach = chl.Value();
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
DeclareAndCast(Transfer_Finder,starting,ach->Entity());
Handle(Standard_Transient) ent;
{
Handle(TColStd_HSequenceOfTransient) ls = new TColStd_HSequenceOfTransient();
for (chl.Start(); chl.More(); chl.Next()) {
- const Handle(Interface_Check) ach = chl.Value();
+ const Handle(Interface_Check)& ach = chl.Value();
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
Handle(Standard_Transient) ent = ach->Entity();
if (ent.IsNull()) continue;
{
Handle(TopTools_HSequenceOfShape) ls = new TopTools_HSequenceOfShape();
for (chl.Start(); chl.More(); chl.Next()) {
- const Handle(Interface_Check) ach = chl.Value();
+ const Handle(Interface_Check)& ach = chl.Value();
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
Handle(Standard_Transient) ent = ach->Entity();
if (ent.IsNull()) continue;
Interface_CheckIterator nchl;
for (chl.Start(); chl.More(); chl.Next()) {
- const Handle(Interface_Check) ach = chl.Value();
+ const Handle(Interface_Check)& ach = chl.Value();
if (ach->NbFails() + ach->NbWarnings() == 0) continue;
Handle(Standard_Transient) ent = ach->Entity();
if (ent.IsNull()) continue;
if (S.IsNull()) {
if (ent == obj) {
- Handle(Interface_Check) bch(ach); bch->SetEntity(ent);
+ const Handle(Interface_Check)& bch(ach); bch->SetEntity(ent);
nchl.Add (bch,0);
}
} else {
if (!sbs.IsNull()) sh = sbs->Result();
if (!smp.IsNull()) sh = smp->Value();
if (sh == S) {
- Handle(Interface_Check) bch(ach); bch->SetEntity(ent);
+ const Handle(Interface_Check)& bch(ach); bch->SetEntity(ent);
nchl.Add (bch,0);
}
}
Handle(Units_Unit) unit;
TCollection_AsciiString symbol;
- Handle(Units_QuantitiesSequence) quantitiessequence = aquantitiessequence;
-
- for(index=1; index<=quantitiessequence->Length(); index++) {
- quantity = quantitiessequence->Value(index);
+ for(index=1; index<=aquantitiessequence->Length(); index++)
+ {
+ quantity = aquantitiessequence->Value(index);
unitssequence=quantity->Sequence();
for(jindex=1; jindex<=unitssequence->Length(); jindex++) {
unit = unitssequence->Value(jindex);
NCollection_Sequence<Handle(AIS_InteractiveObject)> aListRemoved;
for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anObjIter (GetMapOfAIS()); anObjIter.More(); anObjIter.Next())
{
- const Handle(AIS_InteractiveObject) anObj = anObjIter.Key1();
+ const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key1();
if (anObj->GetContext() != TheAISContext())
{
continue;
// redisplay all objects in context
for (ViewTest_PrsIter aPrsIter (aNames); aPrsIter.More(); aPrsIter.Next())
{
- Handle(AIS_InteractiveObject) aPrs = aPrsIter.Current();
+ const Handle(AIS_InteractiveObject)& aPrs = aPrsIter.Current();
if (!aPrs.IsNull())
{
aCtx->Redisplay (aPrs, Standard_False);
continue;
}
- if (Handle(AIS_InteractiveObject) aShape = anIter.Key1())
+ if (const Handle(AIS_InteractiveObject)& aShape = anIter.Key1())
{
aCtx->Erase (aShape, Standard_False);
}
for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
anIter.More(); anIter.Next())
{
- const Handle(AIS_InteractiveObject) anIO = anIter.Key1();
+ const Handle(AIS_InteractiveObject)& anIO = anIter.Key1();
if (!anIO.IsNull()
&& aCtx->IsSelected (anIO))
{
for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
anIter.More(); anIter.Next())
{
- Handle(AIS_InteractiveObject) anIO = anIter.Key1();
+ const Handle(AIS_InteractiveObject)& anIO = anIter.Key1();
if (!anIO.IsNull())
{
if (toEraseInView)
for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS());
anIter.More(); anIter.Next())
{
- Handle(AIS_InteractiveObject) anIO = anIter.Key1();
+ const Handle(AIS_InteractiveObject)& anIO = anIter.Key1();
aHighlightedMode = checkMode (aCtx, anIO, aMode);
if (aHighlightedMode != -1)
{
// Construction of AIS_Plane
GC_MakePlane MkPlane (A,B,C);
- Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+ const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane, aName);
if (argc == 6)
gp_Pnt aBa = BRep_Tool::Pnt(aVBa);
gp_Pnt aBb = BRep_Tool::Pnt(aVBb);
GC_MakePlane MkPlane (A, aBa, aBb);
- Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+ const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane, aName);
TheAISContext()->Display (anAISPlane, Standard_True);
gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(aShapeB));
gp_Pnt C = BRep_Tool::Pnt(TopoDS::Vertex(aShapeC));
GC_MakePlane MkPlane(A, B, C);
- Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+ const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane, aName);
TheAISContext()->Display (anAISPlane, Standard_True);
gp_Pnt Aa = BRep_Tool::Pnt(aVAa);
gp_Pnt Ab = BRep_Tool::Pnt(aVAb);
GC_MakePlane MkPlane (B,Aa,Ab);
- Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
+ const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane ,aName);
TheAISContext()->Display (anAISPlane, Standard_True);
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) Standard_OVERRIDE;
- bool CheckInputCommand (const TCollection_AsciiString theCommand,
+ bool CheckInputCommand (const TCollection_AsciiString& theCommand,
const Handle(TColStd_HArray1OfAsciiString)& theArgsArray,
Standard_Integer &theArgIndex,
Standard_Integer theArgCount,
}
}
-bool MyPArrayObject::CheckInputCommand (const TCollection_AsciiString theCommand,
+bool MyPArrayObject::CheckInputCommand (const TCollection_AsciiString& theCommand,
const Handle(TColStd_HArray1OfAsciiString)& theArgsArray,
Standard_Integer &theArgIndex,
Standard_Integer theArgCount,
for (NCollection_Sequence<Graphic3d_NameOfMaterial>::Iterator aMatIter (aMatList); aMatIter.More(); aMatIter.Next(), ++aMatIndex)
{
Graphic3d_MaterialAspect aMat (aMatIter.Value());
- const TCollection_AsciiString aMatName = aMat.StringName();
+ const TCollection_AsciiString& aMatName = aMat.StringName();
const Graphic3d_Vec3 anAmbient = (Graphic3d_Vec3 )aMat.AmbientColor();
const Graphic3d_Vec3 aDiffuse = (Graphic3d_Vec3 )aMat.DiffuseColor();
const Graphic3d_Vec3 aSpecular = (Graphic3d_Vec3 )aMat.SpecularColor();
void ActivateView (const TCollection_AsciiString& theViewName,
Standard_Boolean theToUpdate = Standard_True)
{
- if (const Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName))
+ if (const Handle(V3d_View)& aView = ViewerTest_myViews.Find1(theViewName))
{
ViewerTest::ActivateView (aView, theToUpdate);
}
void ViewerTest::ActivateView (const Handle(V3d_View)& theView,
Standard_Boolean theToUpdate)
{
- Handle(V3d_View) aView = theView;
+ const Handle(V3d_View)& aView = theView;
const TCollection_AsciiString* aViewName = ViewerTest_myViews.Seek2 (aView);
if (aViewName == nullptr)
{
return;
}
- const TCollection_AsciiString aViewName = ViewerTest_myViews.Find2 (theView);
+ const TCollection_AsciiString& aViewName = ViewerTest_myViews.Find2 (theView);
RemoveView (aViewName, theToRemoveContext);
}
&& anArgCase == "-name")
{
ViewerTest_Names aViewNames (theArgVec[++anArgIt]);
- TCollection_AsciiString aViewName = aViewNames.GetViewName();
+ const TCollection_AsciiString& aViewName = aViewNames.GetViewName();
if (!ViewerTest_myViews.IsBound1 (aViewName))
{
Message::SendFail() << "Syntax error: unknown view '" << theArgVec[anArgIt - 1] << "'";
else if (!toOverrideGlobal
&& ViewerTest_myViews.IsBound1 (anEntityName))
{
- Handle(V3d_View) aView = ViewerTest_myViews.Find1 (anEntityName);
+ const Handle(V3d_View)& aView = ViewerTest_myViews.Find1 (anEntityName);
if (toSet)
{
aView->AddClipPlane (aClipPlane);
{
return VrmlData_UnrecoverableError;
}
- theBuffer.Input.seekg(-(aNbChars - anInd - 1), std::ios::cur);
+ theBuffer.Input.seekg(-static_cast<std::streamoff>((aNbChars - anInd - 1)), std::ios::cur);
}
// Check the reading status.
//purpose :
//=======================================================================
-TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const
+TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const
{
TDF_Label aLabel;
TDF_LabelSequence aClippingPlanes;
//purpose :
//=======================================================================
-TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const
+TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const
{
TDF_Label aLabel = AddClippingPlane(thePlane, theName);
Standard_Integer aCappingVal = (theCapping) ? 1 : 0;
//=======================================================================
void XCAFDoc_ClippingPlaneTool::UpdateClippingPlane(const TDF_Label& theLabel,
- const gp_Pln& thePlane, const TCollection_ExtendedString theName) const
+ const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const
{
if (theLabel.Father() != Label())
return;
//! Adds a clipping plane definition to a ClippingPlane table and returns
//! its label (returns existing label if the same clipping plane
//! is already defined)
- Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const;
+ Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const;
//! Adds a clipping plane definition to a ClippingPlane table and returns
//! its label (returns existing label if the same clipping plane
//! Adds a clipping plane definition to a ClippingPlane table and returns
//! its label (returns existing label if the same clipping plane
//! is already defined)
- Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const;
+ Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const;
//! Adds a clipping plane definition to a ClippingPlane table and returns
//! its label (returns existing label if the same clipping plane
//! Sets new value of plane and name to the given clipping plane label
//! or do nothing, if the given label is not a clipping plane label
- Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString theName) const;
+ Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const;
//! Set new value of capping for given clipping plane label
Standard_EXPORT void SetCapping(const TDF_Label& theClippingPlaneL, const Standard_Boolean theCapping);
for (; Iterator.More(); Iterator.Next())
aSubShapeSeq.Append(Iterator.Value());
for (Standard_Integer i = 1; i <= aSubShapeSeq.Length(); i++) {
- TopoDS_Shape Scomp = aSubShapeSeq.Value(i);
+ const TopoDS_Shape& Scomp = aSubShapeSeq.Value(i);
TopoDS_Shape aNewScomp;
B.Remove(theOUTShape, Scomp);
prepareAssembly( Scomp, aNewScomp );
TDF_LabelSequence aShapeLSeq;
for (TopoDS_Iterator it(GetShape(shapeL)); it.More() && !isDefined; it.Next())
{
- TopoDS_Shape aShape = it.Value();
+ const TopoDS_Shape& aShape = it.Value();
if (sub.IsSame(aShape.Located(TopLoc_Location())))
{
isDefined = Standard_True;
TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID());
for(Standard_Integer i=1; i<=SHAS.Length(); i++) {
TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True);
- Handle(TCollection_HAsciiString) str = SHAS(i);
+ const Handle(TCollection_HAsciiString)& str = SHAS(i);
TCollection_ExtendedString extstr(str->String());
TDataStd_Name::Set(tmplbl,extstr);
}
TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID());
for(Standard_Integer i=1; i<=SHAS.Length(); i++) {
TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True);
- Handle(TCollection_HAsciiString) str = SHAS(i);
+ const Handle(TCollection_HAsciiString)& str = SHAS(i);
TCollection_ExtendedString extstr(str->String());
TDataStd_Name::Set(tmplbl,extstr);
}
for (XCAFDoc_DataMapOfShapeLabel::Iterator aShapeLabelIt (myShapeLabels); aShapeLabelIt.More(); aShapeLabelIt.Next())
{
- const TopoDS_Shape aShape = aShapeLabelIt.Key();
+ const TopoDS_Shape& aShape = aShapeLabelIt.Key();
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aShape)
TCollection_AsciiString aShapeLabel;
for (XCAFDoc_DataMapOfShapeLabel::Iterator aSubShapeIt (mySubShapes); aSubShapeIt.More(); aSubShapeIt.Next())
{
- const TopoDS_Shape aSubShape = aSubShapeIt.Key();
+ const TopoDS_Shape& aSubShape = aSubShapeIt.Key();
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSubShape)
TCollection_AsciiString aSubShapeLabel;
for (XCAFDoc_DataMapOfShapeLabel::Iterator aSimpleShapeIt (mySimpleShapes); aSimpleShapeIt.More(); aSimpleShapeIt.Next())
{
- const TopoDS_Shape aSimpleShape = aSimpleShapeIt.Key();
+ const TopoDS_Shape& aSimpleShape = aSimpleShapeIt.Key();
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSimpleShape)
TCollection_AsciiString aSimpleShapeLabel;
return Standard_True;
}
-static void AddWS(TCollection_AsciiString filename,
+static void AddWS(const TCollection_AsciiString& filename,
const Handle(XSControl_WorkSession)& WS)
{
WS->SetVars(new XSDRAW_Vars); // support of DRAW variables
NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>::Iterator DicEFIt(dicFile);
for (; DicEFIt.More(); DicEFIt.Next())
{
- TCollection_AsciiString filename = DicEFIt.Key();
+ const TCollection_AsciiString& filename = DicEFIt.Key();
EF = DicEFIt.Value();
AddWS(filename, EF->GetWS());
}
return Standard_True;
}
-static Standard_Boolean SetCurrentWS(TCollection_AsciiString filename)
+static Standard_Boolean SetCurrentWS(const TCollection_AsciiString& filename)
{
if (!thedictws.IsBound(filename)) return Standard_False;
Handle(XSControl_WorkSession) CurrentWS =
Standard_Integer num = 0;
for (; DicIt.More(); DicIt.Next(), num++)
{
- TCollection_AsciiString strng(DicIt.Key());
+ const TCollection_AsciiString& strng(DicIt.Key());
if (num) di << "\n";
di << "\"" << strng.ToCString() << "\"";
}
BRep_Builder B;
B.MakeCompound(aShape);
for (Standard_Integer jj = 1; jj <= aShapes.Length(); jj++) {
- TopoDS_Shape aCurShape = aShapes.Value(jj);
+ const TopoDS_Shape& aCurShape = aShapes.Value(jj);
B.Add( aShape, aCurShape );
}
DBRep::Set ( argv[2], aShape );
// Purpose : for CheckPCurve
// ============================================================================
-static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge edge)
+static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge& edge)
{
TopoDS_Edge result;
//BRep_Builder B; // B not used - see below (skl)
if (sh.IsNull()) continue;
if (sh.ShapeType() != type) continue;
for (TopExp_Explorer vsh(sh,TopAbs_VERTEX); vsh.More(); vsh.Next()) {
- TopoDS_Shape avtx = vsh.Current();
+ const TopoDS_Shape& avtx = vsh.Current();
if (vtx.Contains(avtx)) {
li->Append (TP->Mapped(i));
break; // break de ce for interieur, entite suivante
sout<<std::endl<<"Subshapes imported from entities:";
TopoDS_Iterator Iter(Shape);
for (; Iter.More(); Iter.Next()) {
- TopoDS_Shape subsh = Iter.Value();
+ const TopoDS_Shape& subsh = Iter.Value();
Standard_Integer submodrec = 1;
Handle(Standard_Transient) subent = TR->EntityFromShapeResult(subsh,submodrec);
if (subent.IsNull()) {
nbMapped = nbWithFail = nbWithResult = 0;
for (itrp.Start(); itrp.More(); itrp.Next()) {
- Handle(Transfer_Binder) binder = itrp.Value();
- Handle(Standard_Transient) ent = itrp.Starting();
+ const Handle(Transfer_Binder)& binder = itrp.Value();
nbMapped++;
if (binder.IsNull()) nbWithFail++;
else
// seule difference entre TransferRoots et TransferOne
Standard_Integer res = 0;
- Handle(Standard_Transient) obj = ent;
+ const Handle(Standard_Transient)& obj = ent;
TP.Transfer (obj, theProgress);
if (theProgress.UserBreak())
return res;
for (itrp.Start(); itrp.More(); itrp.Next()) {
nbi ++;
- Handle(Transfer_Binder) binder = itrp.Value();
- Handle(Standard_Transient) ent = itrp.Starting();
+ const Handle(Transfer_Binder)& binder = itrp.Value();
+ const Handle(Standard_Transient)& ent = itrp.Starting();
if (binder.IsNull()) {
nbnr ++;
if (notrec) counter->Add(ent,"(not recorded)");
if (!compound || res != TopAbs_COMPOUND) return res;
res = TopAbs_SHAPE;
for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) {
- TopoDS_Shape sh = iter.Value();
+ const TopoDS_Shape& sh = iter.Value();
if (sh.IsNull()) continue;
TopAbs_ShapeEnum typ = sh.ShapeType();
if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound);
return 0;
}
for (itrp.Start(); itrp.More(); itrp.Next()) {
- Handle(Standard_Transient) ent = itrp.Starting();
+ const Handle(Standard_Transient)& ent = itrp.Starting();
Handle(TColStd_HSequenceOfTransient) super = WS->Sharings (ent);
if (!super.IsNull()) {
Standard_Integer nb = super->Length();
tol1d /= 3;
//JR/Hp :
- math_Vector PP0 = P0 ;
- math_Vector PP1 = P1 ;
+ const math_Vector& PP0 = P0 ;
+ const math_Vector& PP1 = P1 ;
Delta = PP1 - PP0;
// Delta = P1 - P0;
invnorme = Delta.Norm();