mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028165: Improve performance of Boolean Operations
1. Unification of the usage of the BRepAdaptor_Surface in Boolean Operations algorithm. For each face when it is necessary the Adaptor is initialized only once and stored in Context. For that purpose the new IntTools_Context::SurfaceAdaptor(const TopoDS_Face&) method has been implemented. To provide possibility to take the Adaptor from the context, the context has been added as a parameter in following methods: BOPTools_AlgoTools::MakePCurve() BOPTools_AlgoTools::Sence() BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace() BOPTools_AlgoTools2D::PointOnSurface BOPTools_AlgoTools2D::CurveOnSurface BOPTools_AlgoTools2D::AdjustPCurveOnFace BOPTools_AlgoTools2D::Make2D BOPTools_AlgoTools2D::MakePCurveOnFace BOPTools_AlgoTools3D::GetNormalToFaceOnEdge It is also possible now to pass the context into BOPAlgo_WireSplitter algorithm. Also, the new IntTools_Context::UVBounds(const TopoDS_Face&) method has been implemented to get the UV bounds of a face. 2. Additional improvement is a calculation of reduced intersection range only for the intersection type VERTEX during computation of Edge/Face interference. 3. The methods IntTools_EdgeFace::Prepare() and IntTools_EdgeFace::FindProjectableRoot() and the fields IntTools_EdgeFace::myProjectableRanges and IntTools_EdgeFace::myFClass2d have been removed as obsolete. 4. Test cases for the issue.
This commit is contained in:
@@ -45,9 +45,12 @@ public:
|
||||
|
||||
|
||||
|
||||
//! Compute P-Curve for the edge <aE> on the face <aF>
|
||||
//! Raises exception Standard_ConstructionError if projection algorithm fails
|
||||
Standard_EXPORT static void BuildPCurveForEdgeOnFace (const TopoDS_Edge& aE, const TopoDS_Face& aF);
|
||||
//! 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)());
|
||||
|
||||
|
||||
//! Compute tangent for the edge <aE> [in 3D] at parameter <aT>
|
||||
@@ -55,26 +58,43 @@ public:
|
||||
|
||||
|
||||
//! Compute surface parameters <U,V> of the face <aF>
|
||||
//! for the point from the edge <aE> at parameter <aT>.
|
||||
//! 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
|
||||
Standard_EXPORT static void PointOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF, const Standard_Real aT, Standard_Real& U, Standard_Real& V);
|
||||
//! 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)());
|
||||
|
||||
|
||||
//! Get P-Curve <aC> for the edge <aE> on surface <aF> .
|
||||
//! If the P-Curve does not exist, build it using Make2D().
|
||||
//! 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
|
||||
Standard_EXPORT static void CurveOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC, Standard_Real& aToler);
|
||||
|
||||
//! 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)());
|
||||
|
||||
//! Get P-Curve <aC> for the edge <aE> on surface <aF> .
|
||||
//! If the P-Curve does not exist, build it using Make2D().
|
||||
//! [aFirst, aLast] - range of the P-Curve
|
||||
//! [aToler] - reached tolerance
|
||||
//! Raises exception Standard_ConstructionError if algorithm Make2D() fails
|
||||
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);
|
||||
//! Get P-Curve <aC> for the edge <aE> on surface <aF> .<br>
|
||||
//! If the P-Curve does not exist, build it using Make2D().<br>
|
||||
//! [aFirst, aLast] - range of the P-Curve<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)());
|
||||
|
||||
|
||||
//! Returns TRUE if the edge <aE> has P-Curve <aC>
|
||||
@@ -91,18 +111,28 @@ public:
|
||||
Standard_EXPORT static Standard_Boolean HasCurveOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF);
|
||||
|
||||
|
||||
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
|
||||
Standard_EXPORT static void AdjustPCurveOnFace (const TopoDS_Face& aF, const Handle(Geom_Curve)& C3D, const Handle(Geom2d_Curve)& aC2D, Handle(Geom2d_Curve)& aC2DA);
|
||||
//! 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)());
|
||||
|
||||
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
|
||||
//! [aT1, aT2] - range to adjust
|
||||
Standard_EXPORT static void AdjustPCurveOnFace (const TopoDS_Face& aF, const Standard_Real aT1, const Standard_Real aT2, const Handle(Geom2d_Curve)& aC2D, Handle(Geom2d_Curve)& aC2DA);
|
||||
|
||||
|
||||
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
|
||||
//! [aT1, aT2] - range to adjust
|
||||
Standard_EXPORT static void AdjustPCurveOnFace (const BRepAdaptor_Surface& aF, const Standard_Real aT1, const Standard_Real aT2, const Handle(Geom2d_Curve)& aC2D, Handle(Geom2d_Curve)& aC2DA);
|
||||
Standard_EXPORT static void AdjustPCurveOnSurf (const BRepAdaptor_Surface& aF, const Standard_Real aT1, const Standard_Real aT2, const Handle(Geom2d_Curve)& aC2D, Handle(Geom2d_Curve)& aC2DA);
|
||||
|
||||
|
||||
//! Compute intermediate value in between [aFirst, aLast] .
|
||||
@@ -123,24 +153,43 @@ public:
|
||||
Standard_EXPORT static void BuildPCurveForEdgesOnPlane (const BOPCol_ListOfShape& theLE, const TopoDS_Face& theF);
|
||||
|
||||
|
||||
//! Make P-Curve <aC> for the edge <aE> on surface <aF> .
|
||||
//! [aFirst, aLast] - range of the P-Curve
|
||||
//! [aToler] - reached tolerance
|
||||
//! Raises exception Standard_ConstructionError if algorithm fails
|
||||
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);
|
||||
//! 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)());
|
||||
|
||||
|
||||
//! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
|
||||
//! [aToler] - reached tolerance
|
||||
//! Raises exception Standard_ConstructionError if projection algorithm fails
|
||||
Standard_EXPORT static void MakePCurveOnFace (const TopoDS_Face& aF, const Handle(Geom_Curve)& C3D, Handle(Geom2d_Curve)& aC, Standard_Real& aToler);
|
||||
//! 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)());
|
||||
|
||||
|
||||
//! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
|
||||
//! [aT1, aT2] - range to build
|
||||
//! [aToler] - reached tolerance
|
||||
//! Raises exception Standard_ConstructionError if projection algorithm fails
|
||||
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);
|
||||
//! 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)());
|
||||
|
||||
|
||||
//! Make empty P-Curve <aC> of relevant to <PC> type
|
||||
|
Reference in New Issue
Block a user