mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0026755: Use of reference to destroyed temporary object in Adaptor3d_SurfaceOfRevolution
Code corrected to make a copy of temporary object for its further use
This commit is contained in:
parent
a0258acdd2
commit
53dda4e944
@ -563,7 +563,7 @@ GeomAbs_SurfaceType Adaptor3d_SurfaceOfRevolution::GetType() const
|
||||
//
|
||||
switch ( myBasisCurve->GetType()) {
|
||||
case GeomAbs_Line: {
|
||||
const gp_Ax1& Axe = (myBasisCurve->Line()).Position();
|
||||
gp_Ax1 Axe = myBasisCurve->Line().Position();
|
||||
|
||||
if (myAxis.IsParallel(Axe, TolAng)) {
|
||||
bRet=GeomAbs_Cylinder;
|
||||
@ -614,8 +614,8 @@ GeomAbs_SurfaceType Adaptor3d_SurfaceOfRevolution::GetType() const
|
||||
Standard_Real MajorRadius, aR;
|
||||
gp_Lin aLin(myAxis);
|
||||
//
|
||||
const gp_Circ& C=myBasisCurve->Circle();
|
||||
const gp_Pnt& aLC=C.Location();
|
||||
gp_Circ C = myBasisCurve->Circle();
|
||||
const gp_Pnt& aLC = C.Location();
|
||||
aR=C.Radius();
|
||||
//
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user