1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Small modification

This commit is contained in:
jgv
2015-02-13 15:55:21 +03:00
committed by bugmaster
parent 978f27f1c6
commit e986dcf4c1

View File

@@ -278,19 +278,18 @@ static Standard_Boolean KPartCircle
IsOpenResult)
{
Standard_Real anOffset = myOffset;
if (E.Orientation() == TopAbs_REVERSED) anOffset *= -1;
Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(E, mySpine, f, l);
Handle(Geom2dAdaptor_HCurve) AHC = new Geom2dAdaptor_HCurve(aPCurve, f, l);
Handle(Geom2d_Curve) OC;
if (AHC->GetType() == GeomAbs_Line)
{
if (E.Orientation() == TopAbs_REVERSED) anOffset *= -1;
Adaptor3d_OffsetCurve Off(AHC,anOffset);
OC = new Geom2d_Line(Off.Line());
}
else if (AHC->GetType() == GeomAbs_Circle)
{
if (E.Orientation() == TopAbs_FORWARD) anOffset *= -1;
gp_Circ2d theCirc = AHC->Circle();
if (anOffset > 0. || Abs(anOffset) < theCirc.Radius())
OC = new Geom2d_Circle (theCirc.Position(), theCirc.Radius() + anOffset);
@@ -302,7 +301,6 @@ static Standard_Boolean KPartCircle
}
else
{
if (E.Orientation() == TopAbs_REVERSED) anOffset *= -1;
Handle(Geom2d_TrimmedCurve) G2dT = new Geom2d_TrimmedCurve(aPCurve, f, l);
OC = new Geom2d_OffsetCurve( G2dT, anOffset);
}