diff --git a/src/AIS/AIS_EqualDistanceRelation.cxx b/src/AIS/AIS_EqualDistanceRelation.cxx index f4d3628384..96f21f646d 100644 --- a/src/AIS/AIS_EqualDistanceRelation.cxx +++ b/src/AIS/AIS_EqualDistanceRelation.cxx @@ -639,8 +639,8 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr curpos.Translate(offset); Position = curpos; } - else { - const gp_Dir& aDir = Plane->Pln().Axis().Direction(); + else { + gp_Dir aDir = Plane->Pln().Axis().Direction(); gp_Vec aVec (aDir.XYZ()*10*ArrowSize); //Position = gp_Pnt(FirstAttach.XYZ()+gp_XYZ(1.,1.,1.)); // not correct Position = FirstAttach.Translated(aVec); diff --git a/src/BRepClass3d/BRepClass3d_SClassifier.cxx b/src/BRepClass3d/BRepClass3d_SClassifier.cxx index edc87e24d4..451336da09 100644 --- a/src/BRepClass3d/BRepClass3d_SClassifier.cxx +++ b/src/BRepClass3d/BRepClass3d_SClassifier.cxx @@ -47,9 +47,9 @@ static Standard_Real GetAddToParam(const gp_Lin& L,const Standard_Real P,const Bnd_Box& B); //gets transition of line passing through/near the edge of faces , . is -// a parameter on the edge where the minimum distance between and was found -static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e, - Standard_Real param, const Geom_Line& L, IntCurveSurface_TransitionOnCurve& trans); +// a parameter on the edge where the minimum distance between and was found +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); @@ -560,7 +560,7 @@ static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e, const Standard_Real param, - const Geom_Line& L, + const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans) { //return statuses: @@ -573,7 +573,7 @@ static Standard_Integer GetTransi(const TopoDS_Face& f1, if (!GetNormalOnFaceBound(e, f2, param, nf2)) return -1; - const gp_Dir& LDir = L.Lin().Direction(); + const gp_Dir& LDir = L.Direction(); if(Abs(LDir.Dot(nf1)) < Precision::Angular() || Abs(LDir.Dot(nf2)) < Precision::Angular()) { @@ -627,4 +627,4 @@ static void Trans(const Standard_Real parmin, state = 3; // IN else state = 4; // OUT -} \ No newline at end of file +} diff --git a/src/DrawDim/DrawDim_Distance.cxx b/src/DrawDim/DrawDim_Distance.cxx index 6f2ca45fbd..fa459d35ae 100644 --- a/src/DrawDim/DrawDim_Distance.cxx +++ b/src/DrawDim/DrawDim_Distance.cxx @@ -114,8 +114,8 @@ void DrawDim_Distance::DrawOn(Draw_Display& dis) const // today we process only planar faces if (surf1.GetType() != GeomAbs_Plane) return; - - const gp_Ax1& anAx1 = surf1.Plane().Axis(); + + gp_Ax1 anAx1 = surf1.Plane().Axis(); gp_Vec V = anAx1.Direction(); // output diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx index 45953e8b1e..ef4d4ee57f 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx @@ -119,9 +119,10 @@ Standard_EXPORT gp_Dir FUN_tool_ngS(const gp_Pnt2d& p2d,const Handle(Geom_Surfac Standard_Boolean nullx = (Abs(p2d.X()) < toluv); Standard_Boolean apex = nullx && (Abs(p2d.Y()) < toluv); if (apex) { - const gp_Dir& axis = GS.Cone().Axis().Direction(); - gp_Vec ng(axis); ng.Reverse(); - return ng; + gp_Dir axis = GS.Cone().Axis().Direction(); + gp_Vec ng(axis); + ng.Reverse(); + return ng; } else if (du < tol) { Standard_Real vf = GS.FirstVParameter(); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx index e3064263a3..90add9ca4d 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx @@ -1245,9 +1245,11 @@ static Standard_Boolean FUN_ngF(const gp_Pnt2d& uv, const TopoDS_Face& F, gp_Vec Standard_Boolean nullx = (Abs(uv.X()) < tolu); Standard_Boolean apex = nullx && (Abs(uv.Y()) < tolv); if (apex) { - const gp_Dir& axis = bs.Cone().Axis().Direction(); - gp_Vec ng(axis); ng.Reverse(); - ngF = ng; return Standard_True; + const gp_Dir axis = bs.Cone().Axis().Direction(); + gp_Vec ng(axis); + ng.Reverse(); + ngF = ng; + return Standard_True; } else if (du < tolu) { Standard_Real x = uv.X();