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

Compare commits

...

1 Commits

Author SHA1 Message Date
msv
13ea5df08a 0028765: Get rid of creation of trimmed curve in IntTools_Context::Hatcher to avoid exception
In the method IntTools_Context::Hatcher 2D curve adaptor is created to pass to Geom2dHatch_Hatcher::AddElement().
An extra step of creation of the trimmed curve is excessive here, because the bounding parameters of the curve are also passed to the curve adaptor.
2017-09-29 16:53:29 +03:00
2 changed files with 3 additions and 5 deletions

View File

@@ -751,7 +751,7 @@ Standard_Boolean Geom2dHatch_Hatcher::GlobalTransition (HatchGen_PointOnHatching
const Geom2dAdaptor_Curve& CurveH = HatchingCurve (Point.Index()) ;
myIntersector.LocalGeometry(CurveH.Curve(), Point.Parameter(), Tangente2d, Normale2d, Courbure);
myIntersector.LocalGeometry(CurveH, Point.Parameter(), Tangente2d, Normale2d, Courbure);
Tangente.SetCoord (Tangente2d.X(), Tangente2d.Y(), 0.0) ;
if (Courbure < Precision::Confusion()) {
@@ -805,7 +805,7 @@ Standard_Boolean Geom2dHatch_Hatcher::GlobalTransition (HatchGen_PointOnHatching
#endif
Param = PntE.Parameter();
myIntersector.LocalGeometry(CurveE.Curve(), Param, Tangente2d, Normale2d, Courbure);
myIntersector.LocalGeometry(CurveE, Param, Tangente2d, Normale2d, Courbure);
//-----------------------------------------------------------------------
// Calcul de la transition locale. On suppose les relations suivantes :

View File

@@ -421,7 +421,6 @@ Geom2dHatch_Hatcher& IntTools_Context::Hatcher(const TopoDS_Face& aF)
TopAbs_Orientation aOrE;
Handle(Geom_Surface) aS;
Handle(Geom2d_Curve) aC2D;
Handle(Geom2d_TrimmedCurve) aCT2D;
TopoDS_Face aFF;
TopExp_Explorer aExp;
//
@@ -455,8 +454,7 @@ Geom2dHatch_Hatcher& IntTools_Context::Hatcher(const TopoDS_Face& aF)
continue;
}
//
aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2);
Geom2dAdaptor_Curve aGAC (aCT2D);
Geom2dAdaptor_Curve aGAC (aC2D, aU1, aU2);
pHatcher->AddElement(aGAC, aOrE);
}// for (; aExp.More() ; aExp.Next()) {
//