Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
IntTools_Context Class Reference

The intersection Context contains geometrical and topological toolkit (classifiers, projectors, etc). The intersection Context is for caching the tools to increase the performance. More...

#include <IntTools_Context.hxx>

Inheritance diagram for IntTools_Context:
Inheritance graph
[legend]

Public Member Functions

 IntTools_Context ()
 
 ~IntTools_Context () override
 
 IntTools_Context (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 
IntTools_FClass2dFClass2d (const TopoDS_Face &aF)
 Returns a reference to point classifier for given face.
 
GeomAPI_ProjectPointOnSurfProjPS (const TopoDS_Face &aF)
 Returns a reference to point projector for given face.
 
GeomAPI_ProjectPointOnCurveProjPC (const TopoDS_Edge &aE)
 Returns a reference to point projector for given edge.
 
GeomAPI_ProjectPointOnCurveProjPT (const occ::handle< Geom_Curve > &aC)
 Returns a reference to point projector for given curve.
 
IntTools_SurfaceRangeLocalizeDataSurfaceData (const TopoDS_Face &aF)
 Returns a reference to surface localization data for given face.
 
BRepClass3d_SolidClassifierSolidClassifier (const TopoDS_Solid &aSolid)
 Returns a reference to solid classifier for given solid.
 
Geom2dHatch_HatcherHatcher (const TopoDS_Face &aF)
 Returns a reference to 2D hatcher for given face.
 
BRepAdaptor_SurfaceSurfaceAdaptor (const TopoDS_Face &theFace)
 Returns a reference to surface adaptor for given face.
 
Bnd_OBBOBB (const TopoDS_Shape &theShape, const double theFuzzyValue=Precision::Confusion())
 Builds and stores an Oriented Bounding Box for the shape. Returns a reference to OBB.
 
void UVBounds (const TopoDS_Face &theFace, double &UMin, double &UMax, double &VMin, double &VMax)
 Computes the boundaries of the face using surface adaptor.
 
int ComputePE (const gp_Pnt &theP, const double theTolP, const TopoDS_Edge &theE, double &theT, double &theDist)
 Computes parameter of the Point theP on the edge aE. Returns zero if the distance between point and edge is less than sum of tolerance value of edge and theTopP, otherwise and for following conditions returns negative value.
 
int ComputeVE (const TopoDS_Vertex &theV, const TopoDS_Edge &theE, double &theT, double &theTol, const double theFuzz=Precision::Confusion())
 Computes parameter of the vertex aV on the edge aE and correct tolerance value for the vertex on the edge. Returns zero if the distance between vertex and edge is less than sum of tolerances and the fuzzy value, otherwise and for following conditions returns negative value:
 
int ComputeVF (const TopoDS_Vertex &theVertex, const TopoDS_Face &theFace, double &theU, double &theV, double &theTol, const double theFuzz=Precision::Confusion())
 Computes UV parameters of the vertex aV on face aF and correct tolerance value for the vertex on the face. Returns zero if the distance between vertex and face is less than or equal the sum of tolerances and the fuzzy value and the projection point lays inside boundaries of the face. For following conditions returns negative value.
 
TopAbs_State StatePointFace (const TopoDS_Face &aF, const gp_Pnt2d &aP2D)
 Returns the state of the point aP2D relative to face aF.
 
bool IsPointInFace (const TopoDS_Face &aF, const gp_Pnt2d &aP2D)
 Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false.
 
bool IsPointInFace (const gp_Pnt &aP3D, const TopoDS_Face &aF, const double aTol)
 Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false.
 
bool IsPointInOnFace (const TopoDS_Face &aF, const gp_Pnt2d &aP2D)
 Returns true if the point aP2D is inside or on the boundaries of aF.
 
bool IsValidPointForFace (const gp_Pnt &aP3D, const TopoDS_Face &aF, const double aTol)
 Returns true if the distance between point aP3D and face aF is less or equal to tolerance aTol and projection point is inside or on the boundaries of the face aF.
 
bool IsValidPointForFaces (const gp_Pnt &aP3D, const TopoDS_Face &aF1, const TopoDS_Face &aF2, const double aTol)
 Returns true if IsValidPointForFace returns true for both face aF1 and aF2.
 
bool IsValidBlockForFace (const double aT1, const double aT2, const IntTools_Curve &aIC, const TopoDS_Face &aF, const double aTol)
 Returns true if IsValidPointForFace returns true for some 3d point that lay on the curve aIC bounded by parameters aT1 and aT2.
 
bool IsValidBlockForFaces (const double aT1, const double aT2, const IntTools_Curve &aIC, const TopoDS_Face &aF1, const TopoDS_Face &aF2, const double aTol)
 Returns true if IsValidBlockForFace returns true for both faces aF1 and aF2.
 
bool IsVertexOnLine (const TopoDS_Vertex &aV, const IntTools_Curve &aIC, const double aTolC, double &aT)
 Computes parameter of the vertex aV on the curve aIC. Returns true if the distance between vertex and curve is less than sum of tolerance of aV and aTolC, otherwise or if projection algorithm failed returns false (in this case aT isn't significant)
 
bool IsVertexOnLine (const TopoDS_Vertex &aV, const double aTolV, const IntTools_Curve &aIC, const double aTolC, double &aT)
 Computes parameter of the vertex aV on the curve aIC. Returns true if the distance between vertex and curve is less than sum of tolerance of aV and aTolC, otherwise or if projection algorithm failed returns false (in this case aT isn't significant)
 
bool ProjectPointOnEdge (const gp_Pnt &aP, const TopoDS_Edge &aE, double &aT)
 Computes parameter of the point aP on the edge aE. Returns false if projection algorithm failed other wiese returns true.
 
Bnd_BoxBndBox (const TopoDS_Shape &theS)
 
bool IsInfiniteFace (const TopoDS_Face &theFace)
 Returns true if the solid <theFace> has infinite bounds.
 
void SetPOnSProjectionTolerance (const double theValue)
 Sets tolerance to be used for projection of point on surface. Clears map of already cached projectors in order to maintain correct value for all projectors.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Attributes

occ::handle< NCollection_BaseAllocatormyAllocator
 
NCollection_DataMap< TopoDS_Shape, IntTools_FClass2d *, TopTools_ShapeMapHashermyFClass2dMap
 
NCollection_DataMap< TopoDS_Shape, GeomAPI_ProjectPointOnSurf *, TopTools_ShapeMapHashermyProjPSMap
 
NCollection_DataMap< TopoDS_Shape, GeomAPI_ProjectPointOnCurve *, TopTools_ShapeMapHashermyProjPCMap
 
NCollection_DataMap< TopoDS_Shape, BRepClass3d_SolidClassifier *, TopTools_ShapeMapHashermySClassMap
 
NCollection_DataMap< occ::handle< Geom_Curve >, GeomAPI_ProjectPointOnCurve * > myProjPTMap
 
NCollection_DataMap< TopoDS_Shape, Geom2dHatch_Hatcher *, TopTools_ShapeMapHashermyHatcherMap
 
NCollection_DataMap< TopoDS_Shape, IntTools_SurfaceRangeLocalizeData *, TopTools_ShapeMapHashermyProjSDataMap
 
NCollection_DataMap< TopoDS_Shape, Bnd_Box *, TopTools_ShapeMapHashermyBndBoxDataMap
 
NCollection_DataMap< TopoDS_Shape, BRepAdaptor_Surface *, TopTools_ShapeMapHashermySurfAdaptorMap
 
NCollection_DataMap< TopoDS_Shape, Bnd_OBB *, TopTools_ShapeMapHashermyOBBMap
 
int myCreateFlag
 
double myPOnSTolerance
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

The intersection Context contains geometrical and topological toolkit (classifiers, projectors, etc). The intersection Context is for caching the tools to increase the performance.

Constructor & Destructor Documentation

◆ IntTools_Context() [1/2]

IntTools_Context::IntTools_Context ( )

◆ ~IntTools_Context()

IntTools_Context::~IntTools_Context ( )
override

◆ IntTools_Context() [2/2]

IntTools_Context::IntTools_Context ( const occ::handle< NCollection_BaseAllocator > & theAllocator)

Member Function Documentation

◆ BndBox()

Bnd_Box & IntTools_Context::BndBox ( const TopoDS_Shape & theS)

◆ ComputePE()

int IntTools_Context::ComputePE ( const gp_Pnt & theP,
const double theTolP,
const TopoDS_Edge & theE,
double & theT,
double & theDist )

Computes parameter of the Point theP on the edge aE. Returns zero if the distance between point and edge is less than sum of tolerance value of edge and theTopP, otherwise and for following conditions returns negative value.

  1. the edge is degenerated (-1)
  2. the edge does not contain 3d curve and pcurves (-2)
  3. projection algorithm failed (-3)

◆ ComputeVE()

int IntTools_Context::ComputeVE ( const TopoDS_Vertex & theV,
const TopoDS_Edge & theE,
double & theT,
double & theTol,
const double theFuzz = Precision::Confusion() )

Computes parameter of the vertex aV on the edge aE and correct tolerance value for the vertex on the edge. Returns zero if the distance between vertex and edge is less than sum of tolerances and the fuzzy value, otherwise and for following conditions returns negative value:

  1. the edge is degenerated (-1)
  2. the edge does not contain 3d curve and pcurves (-2)
  3. projection algorithm failed (-3)

◆ ComputeVF()

int IntTools_Context::ComputeVF ( const TopoDS_Vertex & theVertex,
const TopoDS_Face & theFace,
double & theU,
double & theV,
double & theTol,
const double theFuzz = Precision::Confusion() )

Computes UV parameters of the vertex aV on face aF and correct tolerance value for the vertex on the face. Returns zero if the distance between vertex and face is less than or equal the sum of tolerances and the fuzzy value and the projection point lays inside boundaries of the face. For following conditions returns negative value.

  1. projection algorithm failed (-1)
  2. distance is more than sum of tolerances (-2)
  3. projection point out or on the boundaries of face (-3)

◆ FClass2d()

IntTools_FClass2d & IntTools_Context::FClass2d ( const TopoDS_Face & aF)

Returns a reference to point classifier for given face.

◆ Hatcher()

Geom2dHatch_Hatcher & IntTools_Context::Hatcher ( const TopoDS_Face & aF)

Returns a reference to 2D hatcher for given face.

◆ IsInfiniteFace()

bool IntTools_Context::IsInfiniteFace ( const TopoDS_Face & theFace)

Returns true if the solid <theFace> has infinite bounds.

◆ IsPointInFace() [1/2]

bool IntTools_Context::IsPointInFace ( const gp_Pnt & aP3D,
const TopoDS_Face & aF,
const double aTol )

Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false.

◆ IsPointInFace() [2/2]

bool IntTools_Context::IsPointInFace ( const TopoDS_Face & aF,
const gp_Pnt2d & aP2D )

Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false.

◆ IsPointInOnFace()

bool IntTools_Context::IsPointInOnFace ( const TopoDS_Face & aF,
const gp_Pnt2d & aP2D )

Returns true if the point aP2D is inside or on the boundaries of aF.

◆ IsValidBlockForFace()

bool IntTools_Context::IsValidBlockForFace ( const double aT1,
const double aT2,
const IntTools_Curve & aIC,
const TopoDS_Face & aF,
const double aTol )

Returns true if IsValidPointForFace returns true for some 3d point that lay on the curve aIC bounded by parameters aT1 and aT2.

◆ IsValidBlockForFaces()

bool IntTools_Context::IsValidBlockForFaces ( const double aT1,
const double aT2,
const IntTools_Curve & aIC,
const TopoDS_Face & aF1,
const TopoDS_Face & aF2,
const double aTol )

Returns true if IsValidBlockForFace returns true for both faces aF1 and aF2.

◆ IsValidPointForFace()

bool IntTools_Context::IsValidPointForFace ( const gp_Pnt & aP3D,
const TopoDS_Face & aF,
const double aTol )

Returns true if the distance between point aP3D and face aF is less or equal to tolerance aTol and projection point is inside or on the boundaries of the face aF.

◆ IsValidPointForFaces()

bool IntTools_Context::IsValidPointForFaces ( const gp_Pnt & aP3D,
const TopoDS_Face & aF1,
const TopoDS_Face & aF2,
const double aTol )

Returns true if IsValidPointForFace returns true for both face aF1 and aF2.

◆ IsVertexOnLine() [1/2]

bool IntTools_Context::IsVertexOnLine ( const TopoDS_Vertex & aV,
const double aTolV,
const IntTools_Curve & aIC,
const double aTolC,
double & aT )

Computes parameter of the vertex aV on the curve aIC. Returns true if the distance between vertex and curve is less than sum of tolerance of aV and aTolC, otherwise or if projection algorithm failed returns false (in this case aT isn't significant)

◆ IsVertexOnLine() [2/2]

bool IntTools_Context::IsVertexOnLine ( const TopoDS_Vertex & aV,
const IntTools_Curve & aIC,
const double aTolC,
double & aT )

Computes parameter of the vertex aV on the curve aIC. Returns true if the distance between vertex and curve is less than sum of tolerance of aV and aTolC, otherwise or if projection algorithm failed returns false (in this case aT isn't significant)

◆ OBB()

Bnd_OBB & IntTools_Context::OBB ( const TopoDS_Shape & theShape,
const double theFuzzyValue = Precision::Confusion() )

Builds and stores an Oriented Bounding Box for the shape. Returns a reference to OBB.

◆ ProjectPointOnEdge()

bool IntTools_Context::ProjectPointOnEdge ( const gp_Pnt & aP,
const TopoDS_Edge & aE,
double & aT )

Computes parameter of the point aP on the edge aE. Returns false if projection algorithm failed other wiese returns true.

◆ ProjPC()

GeomAPI_ProjectPointOnCurve & IntTools_Context::ProjPC ( const TopoDS_Edge & aE)

Returns a reference to point projector for given edge.

◆ ProjPS()

GeomAPI_ProjectPointOnSurf & IntTools_Context::ProjPS ( const TopoDS_Face & aF)

Returns a reference to point projector for given face.

◆ ProjPT()

GeomAPI_ProjectPointOnCurve & IntTools_Context::ProjPT ( const occ::handle< Geom_Curve > & aC)

Returns a reference to point projector for given curve.

◆ SetPOnSProjectionTolerance()

void IntTools_Context::SetPOnSProjectionTolerance ( const double theValue)

Sets tolerance to be used for projection of point on surface. Clears map of already cached projectors in order to maintain correct value for all projectors.

◆ SolidClassifier()

BRepClass3d_SolidClassifier & IntTools_Context::SolidClassifier ( const TopoDS_Solid & aSolid)

Returns a reference to solid classifier for given solid.

◆ StatePointFace()

TopAbs_State IntTools_Context::StatePointFace ( const TopoDS_Face & aF,
const gp_Pnt2d & aP2D )

Returns the state of the point aP2D relative to face aF.

◆ SurfaceAdaptor()

BRepAdaptor_Surface & IntTools_Context::SurfaceAdaptor ( const TopoDS_Face & theFace)

Returns a reference to surface adaptor for given face.

◆ SurfaceData()

IntTools_SurfaceRangeLocalizeData & IntTools_Context::SurfaceData ( const TopoDS_Face & aF)

Returns a reference to surface localization data for given face.

◆ UVBounds()

void IntTools_Context::UVBounds ( const TopoDS_Face & theFace,
double & UMin,
double & UMax,
double & VMin,
double & VMax )

Computes the boundaries of the face using surface adaptor.

Field Documentation

◆ myAllocator

occ::handle<NCollection_BaseAllocator> IntTools_Context::myAllocator
protected

◆ myBndBoxDataMap

NCollection_DataMap<TopoDS_Shape, Bnd_Box*, TopTools_ShapeMapHasher> IntTools_Context::myBndBoxDataMap
protected

◆ myCreateFlag

int IntTools_Context::myCreateFlag
protected

◆ myFClass2dMap

NCollection_DataMap<TopoDS_Shape, IntTools_FClass2d*, TopTools_ShapeMapHasher> IntTools_Context::myFClass2dMap
protected

◆ myHatcherMap

NCollection_DataMap<TopoDS_Shape, Geom2dHatch_Hatcher*, TopTools_ShapeMapHasher> IntTools_Context::myHatcherMap
protected

◆ myOBBMap

NCollection_DataMap<TopoDS_Shape, Bnd_OBB*, TopTools_ShapeMapHasher> IntTools_Context::myOBBMap
protected

◆ myPOnSTolerance

double IntTools_Context::myPOnSTolerance
protected

◆ myProjPCMap

◆ myProjPSMap

◆ myProjPTMap

NCollection_DataMap<occ::handle<Geom_Curve>, GeomAPI_ProjectPointOnCurve*> IntTools_Context::myProjPTMap
protected

◆ myProjSDataMap

◆ mySClassMap

◆ mySurfAdaptorMap

NCollection_DataMap<TopoDS_Shape, BRepAdaptor_Surface*, TopTools_ShapeMapHasher> IntTools_Context::mySurfAdaptorMap
protected

The documentation for this class was generated from the following file: