mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51: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()) {
|
switch ( myBasisCurve->GetType()) {
|
||||||
case GeomAbs_Line: {
|
case GeomAbs_Line: {
|
||||||
const gp_Ax1& Axe = (myBasisCurve->Line()).Position();
|
gp_Ax1 Axe = myBasisCurve->Line().Position();
|
||||||
|
|
||||||
if (myAxis.IsParallel(Axe, TolAng)) {
|
if (myAxis.IsParallel(Axe, TolAng)) {
|
||||||
bRet=GeomAbs_Cylinder;
|
bRet=GeomAbs_Cylinder;
|
||||||
@ -614,8 +614,8 @@ GeomAbs_SurfaceType Adaptor3d_SurfaceOfRevolution::GetType() const
|
|||||||
Standard_Real MajorRadius, aR;
|
Standard_Real MajorRadius, aR;
|
||||||
gp_Lin aLin(myAxis);
|
gp_Lin aLin(myAxis);
|
||||||
//
|
//
|
||||||
const gp_Circ& C=myBasisCurve->Circle();
|
gp_Circ C = myBasisCurve->Circle();
|
||||||
const gp_Pnt& aLC=C.Location();
|
const gp_Pnt& aLC = C.Location();
|
||||||
aR=C.Radius();
|
aR=C.Radius();
|
||||||
//
|
//
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user