Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Static Public Member Functions
PrsDim Class Reference

Auxiliary methods for computing dimensions. More...

#include <PrsDim.hxx>

Static Public Member Functions

static gp_Pnt Nearest (const TopoDS_Shape &aShape, const gp_Pnt &aPoint)
 Returns the nearest point in a shape. This is used by several classes in calculation of dimensions.
 
static gp_Pnt Nearest (const gp_Lin &theLine, const gp_Pnt &thePoint)
 
static bool Nearest (const occ::handle< Geom_Curve > &theCurve, const gp_Pnt &thePoint, const gp_Pnt &theFirstPoint, const gp_Pnt &theLastPoint, gp_Pnt &theNearestPoint)
 For the given point finds nearest point on the curve,.
 
static gp_Pnt Farest (const TopoDS_Shape &aShape, const gp_Pnt &aPoint)
 
static bool ComputeGeometry (const TopoDS_Edge &theEdge, occ::handle< Geom_Curve > &theCurve, gp_Pnt &theFirstPnt, gp_Pnt &theLastPnt)
 Used by 2d Relation only Computes the 3d geometry of <anEdge> in the current WorkingPlane and the extremities if any Return TRUE if ok.
 
static bool ComputeGeometry (const TopoDS_Edge &theEdge, occ::handle< Geom_Curve > &theCurve, gp_Pnt &theFirstPnt, gp_Pnt &theLastPnt, bool &theIsInfinite)
 Used by dimensions only. Computes the 3d geometry of <anEdge>. Return TRUE if ok.
 
static bool ComputeGeometry (const TopoDS_Edge &theEdge, occ::handle< Geom_Curve > &theCurve, gp_Pnt &theFirstPnt, gp_Pnt &theLastPnt, occ::handle< Geom_Curve > &theExtCurve, bool &theIsInfinite, bool &theIsOnPlane, const occ::handle< Geom_Plane > &thePlane)
 Used by 2d Relation only Computes the 3d geometry of <anEdge> in the current WorkingPlane and the extremities if any. If <aCurve> is not in the current plane, <extCurve> contains the not projected curve associated to <anEdge>. If <anEdge> is infinite, <isinfinite> = true and the 2 parameters <FirstPnt> and <LastPnt> have no signification. Return TRUE if ok.
 
static bool ComputeGeometry (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, occ::handle< Geom_Curve > &theFirstCurve, occ::handle< Geom_Curve > &theSecondCurve, gp_Pnt &theFirstPnt1, gp_Pnt &theLastPnt1, gp_Pnt &theFirstPnt2, gp_Pnt &theLastPnt2, const occ::handle< Geom_Plane > &thePlane)
 Used by 2d Relation only Computes the 3d geometry of <anEdge> in the current WorkingPlane and the extremities if any Return TRUE if ok.
 
static bool ComputeGeometry (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, occ::handle< Geom_Curve > &theFirstCurve, occ::handle< Geom_Curve > &theSecondCurve, gp_Pnt &theFirstPnt1, gp_Pnt &theLastPnt1, gp_Pnt &theFirstPnt2, gp_Pnt &theLastPnt2, bool &theIsinfinite1, bool &theIsinfinite2)
 Used by dimensions only.Computes the 3d geometry of<anEdge1> and <anEdge2> and checks if they are infinite.
 
static bool ComputeGeometry (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, int &theExtIndex, occ::handle< Geom_Curve > &theFirstCurve, occ::handle< Geom_Curve > &theSecondCurve, gp_Pnt &theFirstPnt1, gp_Pnt &theLastPnt1, gp_Pnt &theFirstPnt2, gp_Pnt &theLastPnt2, occ::handle< Geom_Curve > &theExtCurve, bool &theIsinfinite1, bool &theIsinfinite2, const occ::handle< Geom_Plane > &thePlane)
 Used by 2d Relation only Computes the 3d geometry of<anEdge1> and <anEdge2> in the current Plane and the extremities if any. Return in ExtCurve the 3d curve (not projected in the plane) of the first edge if <indexExt> =1 or of the 2nd edge if <indexExt> = 2. If <indexExt> = 0, ExtCurve is Null. if there is an edge external to the plane, <isinfinite> is true if this edge is infinite. So, the extremities of it are not significant. Return TRUE if ok.
 
static bool ComputeGeomCurve (occ::handle< Geom_Curve > &aCurve, const double first1, const double last1, gp_Pnt &FirstPnt1, gp_Pnt &LastPnt1, const occ::handle< Geom_Plane > &aPlane, bool &isOnPlane)
 Checks if aCurve belongs to aPlane; if not, projects aCurve in aPlane and returns aCurve; Return TRUE if ok.
 
static bool ComputeGeometry (const TopoDS_Vertex &aVertex, gp_Pnt &point, const occ::handle< Geom_Plane > &aPlane, bool &isOnPlane)
 
static bool GetPlaneFromFace (const TopoDS_Face &aFace, gp_Pln &aPlane, occ::handle< Geom_Surface > &aSurf, PrsDim_KindOfSurface &aSurfType, double &Offset)
 Tries to get Plane from Face. Returns Surface of Face in aSurf. Returns true and Plane of Face in aPlane in following cases: Face is Plane, Offset of Plane, Extrusion of Line and Offset of Extrusion of Line Returns pure type of Surface which can be: Plane, Cylinder, Cone, Sphere, Torus, SurfaceOfRevolution, SurfaceOfExtrusion.
 
static void InitFaceLength (const TopoDS_Face &aFace, gp_Pln &aPlane, occ::handle< Geom_Surface > &aSurface, PrsDim_KindOfSurface &aSurfaceType, double &anOffset)
 
static void InitLengthBetweenCurvilinearFaces (const TopoDS_Face &theFirstFace, const TopoDS_Face &theSecondFace, occ::handle< Geom_Surface > &theFirstSurf, occ::handle< Geom_Surface > &theSecondSurf, gp_Pnt &theFirstAttach, gp_Pnt &theSecondAttach, gp_Dir &theDirOnPlane)
 Finds attachment points on two curvilinear faces for length dimension.
 
static bool InitAngleBetweenPlanarFaces (const TopoDS_Face &theFirstFace, const TopoDS_Face &theSecondFace, gp_Pnt &theCenter, gp_Pnt &theFirstAttach, gp_Pnt &theSecondAttach, const bool theIsFirstPointSet=false)
 Finds three points for the angle dimension between two planes.
 
static bool InitAngleBetweenCurvilinearFaces (const TopoDS_Face &theFirstFace, const TopoDS_Face &theSecondFace, const PrsDim_KindOfSurface theFirstSurfType, const PrsDim_KindOfSurface theSecondSurfType, gp_Pnt &theCenter, gp_Pnt &theFirstAttach, gp_Pnt &theSecondAttach, const bool theIsFirstPointSet=false)
 Finds three points for the angle dimension between two curvilinear surfaces.
 
static gp_Pnt ProjectPointOnPlane (const gp_Pnt &aPoint, const gp_Pln &aPlane)
 
static gp_Pnt ProjectPointOnLine (const gp_Pnt &aPoint, const gp_Lin &aLine)
 
static gp_Pnt TranslatePointToBound (const gp_Pnt &aPoint, const gp_Dir &aDir, const Bnd_Box &aBndBox)
 
static bool InDomain (const double aFirstPar, const double aLastPar, const double anAttachPar)
 returns True if point with anAttachPar is in domain of arc
 
static gp_Pnt NearestApex (const gp_Elips &elips, const gp_Pnt &pApex, const gp_Pnt &nApex, const double fpara, const double lpara, bool &IsInDomain)
 computes nearest to ellipse arc apex
 
static double DistanceFromApex (const gp_Elips &elips, const gp_Pnt &Apex, const double par)
 computes length of ellipse arc in parametric units
 
static void ComputeProjEdgePresentation (const occ::handle< Prs3d_Presentation > &aPres, const occ::handle< Prs3d_Drawer > &aDrawer, const TopoDS_Edge &anEdge, const occ::handle< Geom_Curve > &ProjCurve, const gp_Pnt &FirstP, const gp_Pnt &LastP, const Quantity_NameOfColor aColor=Quantity_NOC_PURPLE, const double aWidth=2, const Aspect_TypeOfLine aProjTOL=Aspect_TOL_DASH, const Aspect_TypeOfLine aCallTOL=Aspect_TOL_DOT)
 
static void ComputeProjVertexPresentation (const occ::handle< Prs3d_Presentation > &aPres, const occ::handle< Prs3d_Drawer > &aDrawer, const TopoDS_Vertex &aVertex, const gp_Pnt &ProjPoint, const Quantity_NameOfColor aColor=Quantity_NOC_PURPLE, const double aWidth=2, const Aspect_TypeOfMarker aProjTOM=Aspect_TOM_PLUS, const Aspect_TypeOfLine aCallTOL=Aspect_TOL_DOT)
 

Detailed Description

Auxiliary methods for computing dimensions.

Member Function Documentation

◆ ComputeGeomCurve()

static bool PrsDim::ComputeGeomCurve ( occ::handle< Geom_Curve > & aCurve,
const double first1,
const double last1,
gp_Pnt & FirstPnt1,
gp_Pnt & LastPnt1,
const occ::handle< Geom_Plane > & aPlane,
bool & isOnPlane )
static

Checks if aCurve belongs to aPlane; if not, projects aCurve in aPlane and returns aCurve; Return TRUE if ok.

◆ ComputeGeometry() [1/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Edge & theEdge,
occ::handle< Geom_Curve > & theCurve,
gp_Pnt & theFirstPnt,
gp_Pnt & theLastPnt )
static

Used by 2d Relation only Computes the 3d geometry of <anEdge> in the current WorkingPlane and the extremities if any Return TRUE if ok.

◆ ComputeGeometry() [2/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Edge & theEdge,
occ::handle< Geom_Curve > & theCurve,
gp_Pnt & theFirstPnt,
gp_Pnt & theLastPnt,
bool & theIsInfinite )
static

Used by dimensions only. Computes the 3d geometry of <anEdge>. Return TRUE if ok.

◆ ComputeGeometry() [3/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Edge & theEdge,
occ::handle< Geom_Curve > & theCurve,
gp_Pnt & theFirstPnt,
gp_Pnt & theLastPnt,
occ::handle< Geom_Curve > & theExtCurve,
bool & theIsInfinite,
bool & theIsOnPlane,
const occ::handle< Geom_Plane > & thePlane )
static

Used by 2d Relation only Computes the 3d geometry of <anEdge> in the current WorkingPlane and the extremities if any. If <aCurve> is not in the current plane, <extCurve> contains the not projected curve associated to <anEdge>. If <anEdge> is infinite, <isinfinite> = true and the 2 parameters <FirstPnt> and <LastPnt> have no signification. Return TRUE if ok.

◆ ComputeGeometry() [4/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Edge & theFirstEdge,
const TopoDS_Edge & theSecondEdge,
int & theExtIndex,
occ::handle< Geom_Curve > & theFirstCurve,
occ::handle< Geom_Curve > & theSecondCurve,
gp_Pnt & theFirstPnt1,
gp_Pnt & theLastPnt1,
gp_Pnt & theFirstPnt2,
gp_Pnt & theLastPnt2,
occ::handle< Geom_Curve > & theExtCurve,
bool & theIsinfinite1,
bool & theIsinfinite2,
const occ::handle< Geom_Plane > & thePlane )
static

Used by 2d Relation only Computes the 3d geometry of<anEdge1> and <anEdge2> in the current Plane and the extremities if any. Return in ExtCurve the 3d curve (not projected in the plane) of the first edge if <indexExt> =1 or of the 2nd edge if <indexExt> = 2. If <indexExt> = 0, ExtCurve is Null. if there is an edge external to the plane, <isinfinite> is true if this edge is infinite. So, the extremities of it are not significant. Return TRUE if ok.

◆ ComputeGeometry() [5/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Edge & theFirstEdge,
const TopoDS_Edge & theSecondEdge,
occ::handle< Geom_Curve > & theFirstCurve,
occ::handle< Geom_Curve > & theSecondCurve,
gp_Pnt & theFirstPnt1,
gp_Pnt & theLastPnt1,
gp_Pnt & theFirstPnt2,
gp_Pnt & theLastPnt2,
bool & theIsinfinite1,
bool & theIsinfinite2 )
static

Used by dimensions only.Computes the 3d geometry of<anEdge1> and <anEdge2> and checks if they are infinite.

◆ ComputeGeometry() [6/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Edge & theFirstEdge,
const TopoDS_Edge & theSecondEdge,
occ::handle< Geom_Curve > & theFirstCurve,
occ::handle< Geom_Curve > & theSecondCurve,
gp_Pnt & theFirstPnt1,
gp_Pnt & theLastPnt1,
gp_Pnt & theFirstPnt2,
gp_Pnt & theLastPnt2,
const occ::handle< Geom_Plane > & thePlane )
static

Used by 2d Relation only Computes the 3d geometry of <anEdge> in the current WorkingPlane and the extremities if any Return TRUE if ok.

◆ ComputeGeometry() [7/7]

static bool PrsDim::ComputeGeometry ( const TopoDS_Vertex & aVertex,
gp_Pnt & point,
const occ::handle< Geom_Plane > & aPlane,
bool & isOnPlane )
static

◆ ComputeProjEdgePresentation()

static void PrsDim::ComputeProjEdgePresentation ( const occ::handle< Prs3d_Presentation > & aPres,
const occ::handle< Prs3d_Drawer > & aDrawer,
const TopoDS_Edge & anEdge,
const occ::handle< Geom_Curve > & ProjCurve,
const gp_Pnt & FirstP,
const gp_Pnt & LastP,
const Quantity_NameOfColor aColor = Quantity_NOC_PURPLE,
const double aWidth = 2,
const Aspect_TypeOfLine aProjTOL = Aspect_TOL_DASH,
const Aspect_TypeOfLine aCallTOL = Aspect_TOL_DOT )
static

◆ ComputeProjVertexPresentation()

static void PrsDim::ComputeProjVertexPresentation ( const occ::handle< Prs3d_Presentation > & aPres,
const occ::handle< Prs3d_Drawer > & aDrawer,
const TopoDS_Vertex & aVertex,
const gp_Pnt & ProjPoint,
const Quantity_NameOfColor aColor = Quantity_NOC_PURPLE,
const double aWidth = 2,
const Aspect_TypeOfMarker aProjTOM = Aspect_TOM_PLUS,
const Aspect_TypeOfLine aCallTOL = Aspect_TOL_DOT )
static

◆ DistanceFromApex()

static double PrsDim::DistanceFromApex ( const gp_Elips & elips,
const gp_Pnt & Apex,
const double par )
static

computes length of ellipse arc in parametric units

◆ Farest()

static gp_Pnt PrsDim::Farest ( const TopoDS_Shape & aShape,
const gp_Pnt & aPoint )
static

◆ GetPlaneFromFace()

static bool PrsDim::GetPlaneFromFace ( const TopoDS_Face & aFace,
gp_Pln & aPlane,
occ::handle< Geom_Surface > & aSurf,
PrsDim_KindOfSurface & aSurfType,
double & Offset )
static

Tries to get Plane from Face. Returns Surface of Face in aSurf. Returns true and Plane of Face in aPlane in following cases: Face is Plane, Offset of Plane, Extrusion of Line and Offset of Extrusion of Line Returns pure type of Surface which can be: Plane, Cylinder, Cone, Sphere, Torus, SurfaceOfRevolution, SurfaceOfExtrusion.

◆ InDomain()

static bool PrsDim::InDomain ( const double aFirstPar,
const double aLastPar,
const double anAttachPar )
static

returns True if point with anAttachPar is in domain of arc

◆ InitAngleBetweenCurvilinearFaces()

static bool PrsDim::InitAngleBetweenCurvilinearFaces ( const TopoDS_Face & theFirstFace,
const TopoDS_Face & theSecondFace,
const PrsDim_KindOfSurface theFirstSurfType,
const PrsDim_KindOfSurface theSecondSurfType,
gp_Pnt & theCenter,
gp_Pnt & theFirstAttach,
gp_Pnt & theSecondAttach,
const bool theIsFirstPointSet = false )
static

Finds three points for the angle dimension between two curvilinear surfaces.

◆ InitAngleBetweenPlanarFaces()

static bool PrsDim::InitAngleBetweenPlanarFaces ( const TopoDS_Face & theFirstFace,
const TopoDS_Face & theSecondFace,
gp_Pnt & theCenter,
gp_Pnt & theFirstAttach,
gp_Pnt & theSecondAttach,
const bool theIsFirstPointSet = false )
static

Finds three points for the angle dimension between two planes.

◆ InitFaceLength()

static void PrsDim::InitFaceLength ( const TopoDS_Face & aFace,
gp_Pln & aPlane,
occ::handle< Geom_Surface > & aSurface,
PrsDim_KindOfSurface & aSurfaceType,
double & anOffset )
static

◆ InitLengthBetweenCurvilinearFaces()

static void PrsDim::InitLengthBetweenCurvilinearFaces ( const TopoDS_Face & theFirstFace,
const TopoDS_Face & theSecondFace,
occ::handle< Geom_Surface > & theFirstSurf,
occ::handle< Geom_Surface > & theSecondSurf,
gp_Pnt & theFirstAttach,
gp_Pnt & theSecondAttach,
gp_Dir & theDirOnPlane )
static

Finds attachment points on two curvilinear faces for length dimension.

Parameters
[in]thePlaneDirthe direction on the dimension plane to compute the plane automatically. It will not be taken into account if plane is defined by user.

◆ Nearest() [1/3]

static gp_Pnt PrsDim::Nearest ( const gp_Lin & theLine,
const gp_Pnt & thePoint )
static
Returns
the nearest point on the line.

◆ Nearest() [2/3]

static bool PrsDim::Nearest ( const occ::handle< Geom_Curve > & theCurve,
const gp_Pnt & thePoint,
const gp_Pnt & theFirstPoint,
const gp_Pnt & theLastPoint,
gp_Pnt & theNearestPoint )
static

For the given point finds nearest point on the curve,.

Returns
TRUE if found point is belongs to the curve and FALSE otherwise.

◆ Nearest() [3/3]

static gp_Pnt PrsDim::Nearest ( const TopoDS_Shape & aShape,
const gp_Pnt & aPoint )
static

Returns the nearest point in a shape. This is used by several classes in calculation of dimensions.

◆ NearestApex()

static gp_Pnt PrsDim::NearestApex ( const gp_Elips & elips,
const gp_Pnt & pApex,
const gp_Pnt & nApex,
const double fpara,
const double lpara,
bool & IsInDomain )
static

computes nearest to ellipse arc apex

◆ ProjectPointOnLine()

static gp_Pnt PrsDim::ProjectPointOnLine ( const gp_Pnt & aPoint,
const gp_Lin & aLine )
static

◆ ProjectPointOnPlane()

static gp_Pnt PrsDim::ProjectPointOnPlane ( const gp_Pnt & aPoint,
const gp_Pln & aPlane )
static

◆ TranslatePointToBound()

static gp_Pnt PrsDim::TranslatePointToBound ( const gp_Pnt & aPoint,
const gp_Dir & aDir,
const Bnd_Box & aBndBox )
static

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