Open CASCADE Technology  7.0.0
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 ()
 
virtual ~IntTools_Context ()
 
 IntTools_Context (const BOPCol_BaseAllocator &theAllocator)
 
IntTools_FClass2dFClass2d (const TopoDS_Face &aF)
 Returns a reference to point classifier for given face. More...
 
GeomAPI_ProjectPointOnSurfProjPS (const TopoDS_Face &aF)
 Returns a reference to point projector for given face. More...
 
GeomAPI_ProjectPointOnCurveProjPC (const TopoDS_Edge &aE)
 Returns a reference to point projector for given edge. More...
 
GeomAPI_ProjectPointOnCurveProjPT (const Handle< Geom_Curve > &aC)
 Returns a reference to point projector for given curve. More...
 
IntTools_SurfaceRangeLocalizeDataSurfaceData (const TopoDS_Face &aF)
 Returns a reference to surface localization data for given face. More...
 
BRepClass3d_SolidClassifierSolidClassifier (const TopoDS_Solid &aSolid)
 Returns a reference to solid classifier for given solid. More...
 
Geom2dHatch_HatcherHatcher (const TopoDS_Face &aF)
 Returns a reference to 2D hatcher for given face. More...
 
Standard_Integer ComputePE (const gp_Pnt &theP, const Standard_Real theTolP, const TopoDS_Edge &theE, Standard_Real &theT, Standard_Real &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. More...
 
Standard_Integer ComputeVE (const TopoDS_Vertex &aV, const TopoDS_Edge &aE, Standard_Real &aParam, Standard_Real &aTolVnew)
 Computes parameter of the vertex aV on the edge aE and new increased value of vertex tolerance. Returns zero if the distance between vertex and edge is less than sum of tolerances, otherwise and for following conditions returns negative value:
More...
 
Standard_Integer ComputeVF (const TopoDS_Vertex &aV, const TopoDS_Face &aF, Standard_Real &U, Standard_Real &V, Standard_Real &aTolVnew)
 Computes UV parameters of the vertex aV on face aF and new increased value of vertex tolerance. Returns zero if the distance between vertex and face is less than or equal the sum of tolerances and the projection point lays inside boundaries of the face. For following conditions returns negative value
More...
 
TopAbs_State StatePointFace (const TopoDS_Face &aF, const gp_Pnt2d &aP2D)
 Returns the state of the point aP2D relative to face aF. More...
 
Standard_Boolean 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. More...
 
Standard_Boolean IsPointInFace (const gp_Pnt &aP3D, const TopoDS_Face &aF, const Standard_Real aTol)
 Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false. More...
 
Standard_Boolean IsPointInOnFace (const TopoDS_Face &aF, const gp_Pnt2d &aP2D)
 Returns true if the point aP2D is inside or on the boundaries of aF. More...
 
Standard_Boolean IsValidPointForFace (const gp_Pnt &aP3D, const TopoDS_Face &aF, const Standard_Real 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. More...
 
Standard_Boolean IsValidPointForFaces (const gp_Pnt &aP3D, const TopoDS_Face &aF1, const TopoDS_Face &aF2, const Standard_Real aTol)
 Returns true if IsValidPointForFace returns true for both face aF1 and aF2. More...
 
Standard_Boolean IsValidBlockForFace (const Standard_Real aT1, const Standard_Real aT2, const IntTools_Curve &aIC, const TopoDS_Face &aF, const Standard_Real aTol)
 Returns true if IsValidPointForFace returns true for some 3d point that lay on the curve aIC bounded by parameters aT1 and aT2. More...
 
Standard_Boolean IsValidBlockForFaces (const Standard_Real aT1, const Standard_Real aT2, const IntTools_Curve &aIC, const TopoDS_Face &aF1, const TopoDS_Face &aF2, const Standard_Real aTol)
 Returns true if IsValidBlockForFace returns true for both faces aF1 and aF2. More...
 
Standard_Boolean IsVertexOnLine (const TopoDS_Vertex &aV, const IntTools_Curve &aIC, const Standard_Real aTolC, Standard_Real &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) More...
 
Standard_Boolean IsVertexOnLine (const TopoDS_Vertex &aV, const Standard_Real aTolV, const IntTools_Curve &aIC, const Standard_Real aTolC, Standard_Real &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) More...
 
Standard_Boolean ProjectPointOnEdge (const gp_Pnt &aP, const TopoDS_Edge &aE, Standard_Real &aT)
 Computes parameter of the point aP on the edge aE. Returns false if projection algorithm failed other wiese returns true. More...
 
Bnd_BoxBndBox (const TopoDS_Shape &theS)
 
Standard_Boolean IsInfiniteFace (const TopoDS_Face &theFace)
 Returns true if the solid <theFace> has infinite bounds. More...
 
void SetPOnSProjectionTolerance (const Standard_Real 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. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const override
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean 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. More...
 
Standard_Boolean IsKind (const Standard_CString 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. More...
 
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. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Attributes

BOPCol_BaseAllocator myAllocator
 
BOPCol_DataMapOfShapeAddress myFClass2dMap
 
BOPCol_DataMapOfShapeAddress myProjPSMap
 
BOPCol_DataMapOfShapeAddress myProjPCMap
 
BOPCol_DataMapOfShapeAddress mySClassMap
 
BOPCol_DataMapOfTransientAddress myProjPTMap
 
BOPCol_DataMapOfShapeAddress myHatcherMap
 
BOPCol_DataMapOfShapeAddress myProjSDataMap
 
BOPCol_DataMapOfShapeAddress myBndBoxDataMap
 
Standard_Integer myCreateFlag
 
Standard_Real myPOnSTolerance
 

Additional Inherited Members

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

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::IntTools_Context ( )
virtual IntTools_Context::~IntTools_Context ( )
virtual
IntTools_Context::IntTools_Context ( const BOPCol_BaseAllocator theAllocator)

Member Function Documentation

Bnd_Box& IntTools_Context::BndBox ( const TopoDS_Shape theS)
Standard_Integer IntTools_Context::ComputePE ( const gp_Pnt theP,
const Standard_Real  theTolP,
const TopoDS_Edge theE,
Standard_Real theT,
Standard_Real 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)
Standard_Integer IntTools_Context::ComputeVE ( const TopoDS_Vertex aV,
const TopoDS_Edge aE,
Standard_Real aParam,
Standard_Real aTolVnew 
)

Computes parameter of the vertex aV on the edge aE and new increased value of vertex tolerance. Returns zero if the distance between vertex and edge is less than sum of tolerances, 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)
Standard_Integer IntTools_Context::ComputeVF ( const TopoDS_Vertex aV,
const TopoDS_Face aF,
Standard_Real U,
Standard_Real V,
Standard_Real aTolVnew 
)

Computes UV parameters of the vertex aV on face aF and new increased value of vertex tolerance. Returns zero if the distance between vertex and face is less than or equal the sum of tolerances 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)
IntTools_FClass2d& IntTools_Context::FClass2d ( const TopoDS_Face aF)

Returns a reference to point classifier for given face.

Geom2dHatch_Hatcher& IntTools_Context::Hatcher ( const TopoDS_Face aF)

Returns a reference to 2D hatcher for given face.

Standard_Boolean IntTools_Context::IsInfiniteFace ( const TopoDS_Face theFace)

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

Standard_Boolean 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.

Standard_Boolean IntTools_Context::IsPointInFace ( const gp_Pnt aP3D,
const TopoDS_Face aF,
const Standard_Real  aTol 
)

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

Standard_Boolean 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.

Standard_Boolean IntTools_Context::IsValidBlockForFace ( const Standard_Real  aT1,
const Standard_Real  aT2,
const IntTools_Curve aIC,
const TopoDS_Face aF,
const Standard_Real  aTol 
)

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

Standard_Boolean IntTools_Context::IsValidBlockForFaces ( const Standard_Real  aT1,
const Standard_Real  aT2,
const IntTools_Curve aIC,
const TopoDS_Face aF1,
const TopoDS_Face aF2,
const Standard_Real  aTol 
)

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

Standard_Boolean IntTools_Context::IsValidPointForFace ( const gp_Pnt aP3D,
const TopoDS_Face aF,
const Standard_Real  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.

Standard_Boolean IntTools_Context::IsValidPointForFaces ( const gp_Pnt aP3D,
const TopoDS_Face aF1,
const TopoDS_Face aF2,
const Standard_Real  aTol 
)

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

Standard_Boolean IntTools_Context::IsVertexOnLine ( const TopoDS_Vertex aV,
const IntTools_Curve aIC,
const Standard_Real  aTolC,
Standard_Real 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)

Standard_Boolean IntTools_Context::IsVertexOnLine ( const TopoDS_Vertex aV,
const Standard_Real  aTolV,
const IntTools_Curve aIC,
const Standard_Real  aTolC,
Standard_Real 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)

Standard_Boolean IntTools_Context::ProjectPointOnEdge ( const gp_Pnt aP,
const TopoDS_Edge aE,
Standard_Real aT 
)

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

GeomAPI_ProjectPointOnCurve& IntTools_Context::ProjPC ( const TopoDS_Edge aE)

Returns a reference to point projector for given edge.

GeomAPI_ProjectPointOnSurf& IntTools_Context::ProjPS ( const TopoDS_Face aF)

Returns a reference to point projector for given face.

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

Returns a reference to point projector for given curve.

void IntTools_Context::SetPOnSProjectionTolerance ( const Standard_Real  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.

BRepClass3d_SolidClassifier& IntTools_Context::SolidClassifier ( const TopoDS_Solid aSolid)

Returns a reference to solid classifier for given solid.

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

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

IntTools_SurfaceRangeLocalizeData& IntTools_Context::SurfaceData ( const TopoDS_Face aF)

Returns a reference to surface localization data for given face.

Field Documentation

BOPCol_BaseAllocator IntTools_Context::myAllocator
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::myBndBoxDataMap
protected
Standard_Integer IntTools_Context::myCreateFlag
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::myFClass2dMap
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::myHatcherMap
protected
Standard_Real IntTools_Context::myPOnSTolerance
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::myProjPCMap
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::myProjPSMap
protected
BOPCol_DataMapOfTransientAddress IntTools_Context::myProjPTMap
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::myProjSDataMap
protected
BOPCol_DataMapOfShapeAddress IntTools_Context::mySClassMap
protected

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