mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
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.
This commit is contained in:
@@ -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 :
|
||||
|
@@ -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()) {
|
||||
//
|
||||
|
Reference in New Issue
Block a user