//! Compute P-Curve for the edge <aE> on the face <aF>.<br>
//! Raises exception Standard_ConstructionError if projection algorithm fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+ Standard_EXPORT static void BuildPCurveForEdgeOnFace (const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+
//! Compute tangent for the edge <aE> [in 3D] at parameter <aT>
Standard_EXPORT static Standard_Boolean EdgeTangent(const TopoDS_Edge& anE,
const Standard_Real aT,
gp_Vec& Tau);
-
+
//! Compute surface parameters <U,V> of the face <aF>
//! for the point from the edge <aE> at parameter <aT>.<br>
//! If <aE> has't pcurve on surface, algorithm tries to get it by
//! projection and can
//! raise exception Standard_ConstructionError if projection algorithm fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void PointOnSurface(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Standard_Real aT,
- Standard_Real& U,
- Standard_Real& V,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+ Standard_EXPORT static void PointOnSurface (const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ const Standard_Real aT,
+ Standard_Real& U,
+ Standard_Real& V,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+
//! Get P-Curve <aC> for the edge <aE> on surface <aF> .<br>
//! If the P-Curve does not exist, build it using Make2D().<br>
//! [aToler] - reached tolerance
//! Raises exception Standard_ConstructionError if algorithm Make2D() fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void CurveOnSurface(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- Handle(Geom2d_Curve)& aC,
- Standard_Real& aToler,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+ Standard_EXPORT static void CurveOnSurface (const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ Handle(Geom2d_Curve)& aC,
+ Standard_Real& aToler,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
//! Get P-Curve <aC> for the edge <aE> on surface <aF> .<br>
//! If the P-Curve does not exist, build it using Make2D().<br>
//! [aToler] - reached tolerance<br>
//! Raises exception Standard_ConstructionError if algorithm Make2D() fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void CurveOnSurface(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- Handle(Geom2d_Curve)& aC,
- Standard_Real& aFirst,
- Standard_Real& aLast,
- Standard_Real& aToler,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+ Standard_EXPORT static void CurveOnSurface (const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ Handle(Geom2d_Curve)& aC,
+ Standard_Real& aFirst,
+ Standard_Real& aLast,
+ Standard_Real& aToler,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+
//! Returns TRUE if the edge <aE> has P-Curve <aC>
//! on surface <aF> .
//! [aFirst, aLast] - range of the P-Curve
Standard_Real& aFirst,
Standard_Real& aLast,
Standard_Real& aToler);
-
+
//! Returns TRUE if the edge <aE> has P-Curve <aC>
//! on surface <aF> .
//! If the P-Curve does not exist, aC.IsNull()=TRUE.
Standard_EXPORT static Standard_Boolean HasCurveOnSurface(const TopoDS_Edge& aE,
const TopoDS_Face& aF);
-
- //! Adjust P-Curve <theC2D> (3D-curve <theC3D>) on surface of the face <theF>.<br>
- //! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void AdjustPCurveOnFace(const TopoDS_Face& theF,
- const Handle(Geom_Curve)& theC3D,
- const Handle(Geom2d_Curve)& theC2D,
- Handle(Geom2d_Curve)& theC2DA,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .<br>
//! [aT1, aT2] - range to adjust<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void AdjustPCurveOnFace(const TopoDS_Face& theF,
- const Standard_Real theFirst,
- const Standard_Real theLast,
- const Handle(Geom2d_Curve)& theC2D,
- Handle(Geom2d_Curve)& theC2DA,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+ Standard_EXPORT static void AdjustPCurveOnFace (const TopoDS_Face& theF,
+ const Standard_Real theFirst,
+ const Standard_Real theLast,
+ const Handle(Geom2d_Curve)& theC2D,
+ Handle(Geom2d_Curve)& theC2DA,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
//! [aT1, aT2] - range to adjust
const Standard_Real aT2,
const Handle(Geom2d_Curve)& aC2D,
Handle(Geom2d_Curve)& aC2DA);
-
+
//! Compute intermediate value in between [aFirst, aLast] .
Standard_EXPORT static Standard_Real IntermediatePoint(const Standard_Real aFirst,
const Standard_Real aLast);
-
+
//! Compute intermediate value of parameter for the edge <anE>.
- Standard_EXPORT static Standard_Real IntermediatePoint(const TopoDS_Edge& anE);
+ Standard_EXPORT static Standard_Real IntermediatePoint (const TopoDS_Edge& anE);
//! Make P-Curve <aC> for the edge <aE> on surface <aF> .<br>
//! [aFirst, aLast] - range of the P-Curve<br>
//! [aToler] - reached tolerance<br>
//! Raises exception Standard_ConstructionError if algorithm fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void Make2D(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- Handle(Geom2d_Curve)& aC,
- Standard_Real& aFirst,
- Standard_Real& aLast,
- Standard_Real& aToler,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+ Standard_EXPORT static void Make2D (const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ Handle(Geom2d_Curve)& aC,
+ Standard_Real& aFirst,
+ Standard_Real& aLast,
+ Standard_Real& aToler,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+
//! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .<br>
//! [aToler] - reached tolerance<br>
//! Raises exception Standard_ConstructionError if projection algorithm fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void MakePCurveOnFace(const TopoDS_Face& aF,
- const Handle(Geom_Curve)& C3D,
- Handle(Geom2d_Curve)& aC,
- Standard_Real& aToler,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+ Standard_EXPORT static void MakePCurveOnFace (const TopoDS_Face& aF,
+ const Handle(Geom_Curve)& C3D,
+ Handle(Geom2d_Curve)& aC,
+ Standard_Real& aToler,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+
//! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .<br>
//! [aT1, aT2] - range to build<br>
//! [aToler] - reached tolerance<br>
//! Raises exception Standard_ConstructionError if projection algorithm fails.<br>
//! <theContext> - storage for caching the geometrical tools
- Standard_EXPORT static void MakePCurveOnFace(const TopoDS_Face& aF,
- const Handle(Geom_Curve)& C3D,
- const Standard_Real aT1,
- const Standard_Real aT2,
- Handle(Geom2d_Curve)& aC,
- Standard_Real& aToler,
- const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
-
+ Standard_EXPORT static void MakePCurveOnFace (const TopoDS_Face& aF,
+ const Handle(Geom_Curve)& C3D,
+ const Standard_Real aT1,
+ const Standard_Real aT2,
+ Handle(Geom2d_Curve)& aC,
+ Standard_Real& aToler,
+ const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)());
+
//! Attach P-Curve from the edge <aEold> on surface <aF>
//! to the edge <aEnew>
//! Returns 0 in case of success
continue;
Standard_Real f, l;
- const Handle(Geom_Curve)& aC3DE = BRep_Tool::Curve(anEdge, f, l);
- Handle(Geom_TrimmedCurve) aC3DETrim;
-
- if(!aC3DE.IsNull())
- aC3DETrim = new Geom_TrimmedCurve(aC3DE, f, l);
-
+ const Handle(Geom_Curve)& aC3DE = BRep_Tool::Curve(anEdge, f, l);
+
Standard_Real aTolEdge = BRep_Tool::Tolerance(anEdge);
if (!BOPTools_AlgoTools2D::HasCurveOnSurface(anEdge, F1)) {
Handle(Geom2d_Curve) aC2d = aBC.Curve().FirstCurve2d();
- if(!aC3DETrim.IsNull()) {
- Handle(Geom2d_Curve) aC2dNew;
-
- if(aC3DE->IsPeriodic111()) {
+ if (!aC3DE.IsNull())
+ {
+ Handle(Geom2d_Curve) aC2dNew;
BOPTools_AlgoTools2D::AdjustPCurveOnFace(F1, f, l, aC2d, aC2dNew, aContext);
- }
- else {
- BOPTools_AlgoTools2D::AdjustPCurveOnFace(F1, aC3DETrim, aC2d, aC2dNew, aContext);
- }
- aC2d = aC2dNew;
- }
+ aC2d = aC2dNew;
+ }
BB.UpdateEdge(anEdge, aC2d, F1, aTolEdge);
}
if (!BOPTools_AlgoTools2D::HasCurveOnSurface(anEdge, F2)) {
Handle(Geom2d_Curve) aC2d = aBC.Curve().SecondCurve2d();
- if(!aC3DETrim.IsNull()) {
- Handle(Geom2d_Curve) aC2dNew;
-
- if(aC3DE->IsPeriodic111()) {
+ if (!aC3DE.IsNull())
+ {
+ Handle(Geom2d_Curve) aC2dNew;
BOPTools_AlgoTools2D::AdjustPCurveOnFace(F2, f, l, aC2d, aC2dNew, aContext);
- }
- else {
- BOPTools_AlgoTools2D::AdjustPCurveOnFace(F2, aC3DETrim, aC2d, aC2dNew, aContext);
- }
- aC2d = aC2dNew;
- }
+ aC2d = aC2dNew;
+ }
BB.UpdateEdge(anEdge, aC2d, F2, aTolEdge);
}