// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _BOPTools_Tools3D_HeaderFile #define _BOPTools_Tools3D_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _TopAbs_Orientation_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Handle_Geom_Surface_HeaderFile #include #endif #ifndef _TopAbs_State_HeaderFile #include #endif class TopoDS_Shape; class TopoDS_Wire; class TopoDS_Face; class IntTools_Context; class TopoDS_Edge; class gp_Dir; class TopTools_IndexedDataMapOfShapeListOfShape; class Geom_Surface; class gp_Pnt; class gp_Pln; class gp_Pnt2d; class TopoDS_Solid; //! The class contains handy static functions
//! dealing with the topology
class BOPTools_Tools3D { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Returns amount of sub-shapes of type
//! for the shape
Standard_EXPORT static Standard_Integer SubShapesAmount(const TopoDS_Shape& aS,const TopAbs_ShapeEnum aT) ; //! Returns TRUE if
//! amount of the vertices <= amount of the edges>
//! for the wire
Standard_EXPORT static Standard_Boolean IsConvexWire(const TopoDS_Wire& aW) ; //! Remove seam edges from face
Standard_EXPORT static void RemoveSims(const TopoDS_Face& aF,IntTools_Context& aContext) ; //! Remove seam edges from all faces of shape
Standard_EXPORT static void RemoveSims(const TopoDS_Shape& aS,IntTools_Context& aContext) ; //! For the draft section edge computes orientation
//! in accordance with vector product between normals to
//! the faces ,
Standard_EXPORT static TopAbs_Orientation EdgeOrientation(const TopoDS_Edge& aEx,const TopoDS_Face& aF1,const TopoDS_Face& aF2) ; //! Returns TRUE if direction of the edge is not
//! the same as for the edge
//! (using projection)
Standard_EXPORT static Standard_Boolean IsSplitToReverse1(const TopoDS_Edge& aE1,const TopoDS_Edge& aE2,IntTools_Context& aContext) ; //! Make the edge seam edge for the face
Standard_EXPORT static void DoSplitSEAMOnFace(const TopoDS_Edge& aSp,const TopoDS_Face& aF) ; //! Make the edge seam edge for the face
//! It uses pcurves of to make seam edge.
//! IsReversed is true if pcurves of and are
//! reversed according to each other.
//! Returns true if was made seam edge for
Standard_EXPORT static Standard_Boolean DoSplitSEAMOnFace(const TopoDS_Edge& theSplit,const TopoDS_Edge& theSeam,const TopoDS_Face& theFace,Standard_Boolean& IsReversed) ; //! Returns TRUE if the edge is section edge
//! between touching faces ,
Standard_EXPORT static Standard_Boolean IsTouchCase(const TopoDS_Edge& aEx,const TopoDS_Face& aF1,const TopoDS_Face& aF2) ; //! Computes tangent (3D) for the edge
//! at parameter
//! Returns TRUE if the edge is not degenerated.
Standard_EXPORT static Standard_Boolean GetTangentToEdge(const TopoDS_Edge& aE,const Standard_Real aT,gp_Dir& aD) ; //! Computes tangent (3D) for the edge
//! at arbitrary intermediate parameter
//! Returns TRUE if the edge is not degenerated.
Standard_EXPORT static Standard_Boolean GetTangentToEdge(const TopoDS_Edge& aE,gp_Dir& aD) ; //! Computes normal to the face for the point on the edge
//! at parameter
Standard_EXPORT static void GetNormalToFaceOnEdge(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aT,gp_Dir& aD) ; //! Computes normal to the face for the point on the edge
//! at arbitrary intermediate parameter
Standard_EXPORT static void GetNormalToFaceOnEdge(const TopoDS_Edge& aE,const TopoDS_Face& aF,gp_Dir& aD) ; //! Computes binormal to the face for the point on the edge
//! at parameter
Standard_EXPORT static void GetBiNormal(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aT,gp_Dir& aD) ; //! Computes binormal to the face for the point on the edge
//! at arbitrary intermediate parameter
Standard_EXPORT static void GetBiNormal(const TopoDS_Edge& aE,const TopoDS_Face& aF,gp_Dir& aD) ; //! Returns TRUE if direction of the edge is not
//! the same as for the edge
Standard_EXPORT static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& aE,const TopoDS_Edge& aSp) ; //! Get face that is adjacent to the face through
//! the edge (using map EF )
//! Returns FALSE if adjacent face is not found
Standard_EXPORT static Standard_Boolean GetAdjacentFace(const TopoDS_Face& aF,const TopoDS_Edge& aE,const TopTools_IndexedDataMapOfShapeListOfShape& aEFMap,TopoDS_Face& anAdjF) ; //! Returns TRUE if pair of faces and
//! that are adjacent faces through the edge
//! crosses the face by
Standard_EXPORT static Standard_Boolean IsKeepTwice(const TopoDS_Face& aF1,const TopoDS_Face& aF2,const TopoDS_Face& aF2Adj,const TopoDS_Edge& aSpEF2) ; //! Returns 1 if scalar product aNF1* aNF2>0.
//! Returns 0 if directions aNF1 aNF2 coinside
//! Returns -1 if scalar product aNF1* aNF2<0.
Standard_EXPORT static Standard_Integer SenseFlag(const gp_Dir& aNF1,const gp_Dir& aNF2) ; //! Compute normal to surface in point (U,V)
//! Returns TRUE if directions aD1U, aD1V coinside
Standard_EXPORT static Standard_Boolean GetNormalToSurface(const Handle(Geom_Surface)& aS,const Standard_Real U,const Standard_Real V,gp_Dir& aD) ; //! Internal usage
Standard_EXPORT static void GetPlanes(const TopoDS_Edge& aSp,const TopoDS_Edge& aE2,const TopTools_IndexedDataMapOfShapeListOfShape& aEFMap2,const TopoDS_Edge& aE1,const TopoDS_Face& aF1,TopAbs_State& aST1,IntTools_Context& aContext) ; //! Get the orientation for the edge on the face
//! Returns TopAbs_INTERNAL if the edge is not found
//! on the face
Standard_EXPORT static TopAbs_Orientation Orientation(const TopoDS_Edge& aE,const TopoDS_Face& aF) ; //! Computes signed distance between the 3D-point
//! and the plane .
Standard_EXPORT static Standard_Real SignDistance(const gp_Pnt& aP,const gp_Pln& aPL) ; //! Computes normal to the face for the 3D-point that
//! belonds to the edge at parameter .
//! Output:
//! aPx - the 3D-point where the normal computed
//! aD - the normal;
Standard_EXPORT static void GetApproxNormalToFaceOnEdge(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aT,gp_Pnt& aPx,gp_Dir& aD) ; //! Compute the point , () that is near to
//! the edge at parameter towards to the
//! material of the face . The value of shifting in
//! 2D is
Standard_EXPORT static void PointNearEdge(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aT,const Standard_Real aDt2D,gp_Pnt2d& aP2D,gp_Pnt& aPx) ; //! Computes the point , () that is near to
//! the edge at parameter towards to the
//! material of the face . The value of shifting in
//! 2D is dt2D=BOPTools_Tools3D::MinStepIn2d()
Standard_EXPORT static void PointNearEdge(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aT,gp_Pnt2d& aP2D,gp_Pnt& aPx) ; //! Compute the point , () that is near to
//! the edge at arbitrary parameter towards to the
//! material of the face . The value of shifting in
//! 2D is dt2D=BOPTools_Tools3D::MinStepIn2d()
Standard_EXPORT static void PointNearEdge(const TopoDS_Edge& aE,const TopoDS_Face& aF,gp_Pnt2d& aP2D,gp_Pnt& aPx) ; //! For 3D-point find projection point on the face .
//! If the distance (, ) > TolF =>
//! For 3D-point find projection point on the face .
//! If the distance (, ) > TolF => returns
Standard_EXPORT static void PointToCompare(const gp_Pnt& aP1,const gp_Pnt& aP2,const TopoDS_Face& aF,gp_Pnt& aPx,IntTools_Context& aContext) ; //! Compute 3D-state for the point on the split edge
//! (with base edge and the face ) comparing with
//! the face
Standard_EXPORT static void GetPlane(const TopoDS_Edge& aSp,const TopoDS_Edge& aE1,const TopoDS_Face& aF1,const TopoDS_Face& aF2,TopAbs_State& aST,IntTools_Context& aContext) ; //! Compute 3D-state for the point on the split edge
//! (with base edge and the adjacent face ) comparing with
//! the face
Standard_EXPORT static void GetPointState(const TopoDS_Edge& aSp,const TopoDS_Edge& aEF2,const TopoDS_Face& aF2Adj,const TopoDS_Face& aF1,TopAbs_State& aST) ; //! Get the edge from the face that is the same as
//! the edge
Standard_EXPORT static void OrientEdgeOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,TopoDS_Edge& aER) ; //! Computes orientation for the split edge
//! [with base edge and face ] on the
//! face
Standard_EXPORT static TopAbs_Orientation OrientTouchEdgeOnF1(const TopoDS_Edge& aSp,const TopoDS_Edge& aEx,const TopoDS_Face& aF1,const TopoDS_Face& aF2) ; //! Get seam edges , for the face
Standard_EXPORT static void GetSeams(const TopoDS_Face& aF,TopoDS_Edge& aSimm1,TopoDS_Edge& aSimm2) ; //! Get opposite seam edge for the face with
//! known seam edge
Standard_EXPORT static void GetSeam(const TopoDS_Face& aF,const TopoDS_Edge& aS1,TopoDS_Edge& aS2) ; //! Check validity of the area of face .
//! Returns TRUE if the Abs. value of the area
//! is greater than 1.e-16
Standard_EXPORT static Standard_Boolean IsValidArea(const TopoDS_Face& aF,Standard_Boolean& aNegativeFlag) ; //! Returns simple step value that is used in 2D-computations
//! = 1.e-5
Standard_EXPORT static Standard_Real MinStepIn2d() ; //! Returns TRUE if the shape does not contain
//! geometry information (e.g. empty compound)
Standard_EXPORT static Standard_Boolean IsEmptyShape(const TopoDS_Shape& aS) ; //! Change orientations to opposite for the shape
//! and all its sub-shapes. Returns
Standard_EXPORT static void InvertShape(const TopoDS_Shape& aS,TopoDS_Shape& aSInv) ; //! Used in touch case
//! Compute the 3D-state for the point on the split
//! edge (with base edge on face )
//! comparing with .
//! Used in touch case /
Standard_EXPORT static TopAbs_State GetStatePartIN2D(const TopoDS_Edge& aSp,const TopoDS_Edge& aEF1,const TopoDS_Face& aF1,const TopoDS_Face& aF2,IntTools_Context& aContext) ; Standard_EXPORT static Standard_Boolean CheckSameDomainFaceInside(const TopoDS_Face& theFace1,const TopoDS_Face& theFace2,IntTools_Context& theContext) ; Standard_EXPORT static Standard_Boolean ComputeFaceState(const TopoDS_Face& theFace,const TopoDS_Solid& theRef,IntTools_Context& theContext,TopAbs_State& theState) ; Standard_EXPORT static Standard_Boolean TreatedAsAnalytic(const Standard_Real aTx,const gp_Pnt& aPx,const TopoDS_Edge& aEx,const TopoDS_Face& aFx,const TopoDS_Edge& aE1,const TopoDS_Face& aF1,const Standard_Real aTolTangent,const Standard_Real aTolRadius,TopAbs_State& aState,IntTools_Context& aContext) ; Standard_EXPORT static Standard_Boolean TreatedAsAnalytic(const TopoDS_Face& aFx,const TopoDS_Edge& aSpE1,const TopoDS_Face& aF1,const Standard_Real aTolTangent,const Standard_Real aTolRadius,TopAbs_State& aState,IntTools_Context& aContext) ; Standard_EXPORT static Standard_Boolean HasAnalyticSurfaceType(const TopoDS_Face& aF) ; protected: private: }; // other Inline functions and methods (like "C++: function call" methods) #endif