OpenLexocad  27.1
Topo::FaceTool Class Reference

Tools for creating, manipulating and querying Faces. More...

#include <FaceTool.h>

Public Member Functions

 FaceTool (void)
 
virtual ~FaceTool (void)
 

Static Public Member Functions

static pFace copy (pConstFace face)
 Copies a face. More...
 
static pFace makeFace (pWire outer, double precision=Geom::Precision::linear_Resolution())
 Makes a face from a wire. The wire describes the outer boundary of the face. More...
 
static pFace makeFace (const Geom::Pnt &p1, const Geom::Pnt &p2, const Geom::Pnt &p3)
 Makes a face from three points. More...
 
static pFace makeFace (const Geom::Pnt &p1, const Geom::Pnt &p2, const Geom::Pnt &p3, const Geom::Pnt &p4)
 Makes a face from four points. More...
 
static pFace makeCylindricalFace (const Geom::Circ &aCircle, double aParam1, double aParam2, double aHeight)
 Makes a cylindrical face. More...
 
static pFace makePlanarFace (pWire outerWire, const std::vector< pWire > &innerWires, double precision=Geom::Precision::linear_Resolution())
 
static pFace makePlanarFaceWithoutVoids (const std::vector< pWire > &wires, double precision=Geom::Precision::linear_Resolution())
 Makes a planar face from the given wires. Each closed region on each wire is covered and all of the covered regions are united. More...
 
static std::vector< pFacemakePlanarFaces (pConstBrepData data)
 Makes planar faces from BrepData. More...
 
static pFace makeFace (pWire outerWire, const std::vector< pWire > &innerWires, double precision=Geom::Precision::linear_Resolution())
 
static pFace makePolygon (const std::vector< Geom::Pnt > &points)
 Makes a polygonal face from a vector of points. More...
 
static bool isValidPointForFace (const Geom::Pnt &p, pConstFace face, double precision=Geom::Precision::linear_Resolution())
 Checks if p is a valid point on face within the given tolerance. More...
 
static pFace transformed (pConstFace face, const Geom::Trsf &transform)
 Returns a copy of 'face' transformed by 'transform'. More...
 
static bool getGeomSurfaceType (pConstFace face, Geom::SurfaceType &type)
 Returns the surface type of the underlying geometry of the face. More...
 
static bool getGeomSurfaceType (FACE *face, Geom::SurfaceType &type)
 Returns the surface type of the underlying geometry of the face. More...
 
static double getArea (pConstFace face)
 Returns the area of the face. More...
 
static pConstWire getOuterBoundary (pConstFace face)
 Returns the outer boundary of the face. More...
 
static std::vector< pConstWiregetInnerBoundaries (pConstFace face)
 Returns the inner boundaries of the face. More...
 
static pShape makeConnectedFaceSet (const std::vector< int > &model, const std::vector< Geom::Pnt > &vertices)
 Makes a connected face set from a model description and a vector of points. Returns an empty shell on failure. More...
 
static bool isNurbs (pConstFace face)
 Returns true if surface type is BEZIERSURFACE or BSPLINESURFACE. More...
 
static pShape extrudedFace (pConstFace face, const Geom::Dir &extrudedDirection, double depth)
 Extrudes a face in the given extrudedDirection with the given depth. It returns nullptr on failure. More...
 
static bool extendFace (pFace face, const std::vector< pConstEdge > &edges, double offset)
 
static bool getCircularSurfaceParams (pConstFace face, Geom::Circ &circle)
 Get parameters of circular face. More...
 
static bool getCylinderSurfaceParams (pConstFace face, Geom::Ax2 &position, double &radius)
 Get parameters of cylinder face. More...
 
static bool getCylinderSurfaceParams (FACE *face, Geom::Ax2 &position, double &radius)
 Get parameters of cylinder face. More...
 
static bool getConeSurfaceParams (pConstFace face, Geom::Ax2 &position, double &angle, double &radius)
 Get parameters of cone face. More...
 
static bool getConeSurfaceParams (FACE *face, Geom::Ax2 &position, double &angle, double &radius)
 Get parameters of cone face. More...
 
static Geom::Pnt getCentre (pConstFace face)
 Returns centre of mass (centre of gravity) of the face. More...
 
static bool projectPointOnFace (const Geom::Pnt &p, pConstFace face, Geom::Pnt &nearest)
 Projects point 'p' on 'face'. Returns the nearest solution point. More...
 
static bool projectPointOnFace (const Geom::Pnt &p, pConstFace face, double &u, double &v)
 Projects point 'p' on 'face'. Returns the parameter 'u' and 'v' at that point. Only the nearest solution is returned. More...
 
static bool isSelfIntersecting (pConstFace face)
 Returns true if the face is self-intersecting. More...
 
static void getOuterBoundaryPoints (pConstFace face, std::vector< Geom::Pnt > &pnts)
 Return the points of the outer boundary. More...
 
static void getOuterBoundaryPointsFast (pConstFace face, std::vector< Geom::Pnt > &pnts)
 Return the points of the outer boundary. More...
 
static bool getPointFaceDistance (const Geom::Pnt &p, pConstFace face, Geom::Pnt &nearest, double &distance)
 Computes the minimum distances and the closest positions between an entity and a point. More...
 
static bool containsFace (pConstFace outerface, pConstFace innerFace)
 Contains Face. More...
 
static std::shared_ptr< Topo::SpecialFaceInfogetSpecialFaceInfo (pConstFace face)
 Special Info for Face, Cone, Cylinder. More...
 
static Topo::ToolOutcome clash (pConstFace face1, pConstFace face2, bool &hasClash)
 Performs a clash of two faces and reports if they touch one another. More...
 
static Topo::ToolOutcome clashFaces (pConstFace face1, pConstFace face2, Topo::FaceClashType &clashType)
 Perform a real clash of two faces and report the way in which these shapes clash. More...
 
static bool isRectangular (pConstFace face, Geom::Ax2 &position, double &width, double &height)
 Checks if a face is rectangular and returns its parameters. More...
 
static void getOuterBoundaryPointsFast (FACE *, std::vector< Geom::Pnt > &pnt)
 

Friends

class MesherAcis::ShapeTesselator_Acis
 
class MesherAcis::TriangleData_Acis
 

Detailed Description

Tools for creating, manipulating and querying Faces.

Constructor & Destructor Documentation

◆ FaceTool()

Topo::FaceTool::FaceTool ( void  )

◆ ~FaceTool()

virtual Topo::FaceTool::~FaceTool ( void  )
virtual

Member Function Documentation

◆ clash()

static Topo::ToolOutcome Topo::FaceTool::clash ( pConstFace  face1,
pConstFace  face2,
bool &  hasClash 
)
static

Performs a clash of two faces and reports if they touch one another.

◆ clashFaces()

static Topo::ToolOutcome Topo::FaceTool::clashFaces ( pConstFace  face1,
pConstFace  face2,
Topo::FaceClashType clashType 
)
static

Perform a real clash of two faces and report the way in which these shapes clash.

◆ containsFace()

static bool Topo::FaceTool::containsFace ( pConstFace  outerface,
pConstFace  innerFace 
)
static

Contains Face.

◆ copy()

static pFace Topo::FaceTool::copy ( pConstFace  face)
static

Copies a face.

◆ extendFace()

static bool Topo::FaceTool::extendFace ( pFace  face,
const std::vector< pConstEdge > &  edges,
double  offset 
)
static

Extends the input list of edges from the given face by offsetting those along the surfaces by the given distance. The face must belong to a shape. It must be the only face in the shape.

◆ extrudedFace()

static pShape Topo::FaceTool::extrudedFace ( pConstFace  face,
const Geom::Dir extrudedDirection,
double  depth 
)
static

Extrudes a face in the given extrudedDirection with the given depth. It returns nullptr on failure.

◆ getArea()

static double Topo::FaceTool::getArea ( pConstFace  face)
static

Returns the area of the face.

◆ getCentre()

static Geom::Pnt Topo::FaceTool::getCentre ( pConstFace  face)
static

Returns centre of mass (centre of gravity) of the face.

◆ getCircularSurfaceParams()

static bool Topo::FaceTool::getCircularSurfaceParams ( pConstFace  face,
Geom::Circ circle 
)
static

Get parameters of circular face.

◆ getConeSurfaceParams() [1/2]

static bool Topo::FaceTool::getConeSurfaceParams ( pConstFace  face,
Geom::Ax2 position,
double &  angle,
double &  radius 
)
static

Get parameters of cone face.

◆ getConeSurfaceParams() [2/2]

static bool Topo::FaceTool::getConeSurfaceParams ( FACE face,
Geom::Ax2 position,
double &  angle,
double &  radius 
)
static

Get parameters of cone face.

◆ getCylinderSurfaceParams() [1/2]

static bool Topo::FaceTool::getCylinderSurfaceParams ( pConstFace  face,
Geom::Ax2 position,
double &  radius 
)
static

Get parameters of cylinder face.

◆ getCylinderSurfaceParams() [2/2]

static bool Topo::FaceTool::getCylinderSurfaceParams ( FACE face,
Geom::Ax2 position,
double &  radius 
)
static

Get parameters of cylinder face.

◆ getGeomSurfaceType() [1/2]

static bool Topo::FaceTool::getGeomSurfaceType ( pConstFace  face,
Geom::SurfaceType type 
)
static

Returns the surface type of the underlying geometry of the face.

◆ getGeomSurfaceType() [2/2]

static bool Topo::FaceTool::getGeomSurfaceType ( FACE face,
Geom::SurfaceType type 
)
static

Returns the surface type of the underlying geometry of the face.

◆ getInnerBoundaries()

static std::vector<pConstWire> Topo::FaceTool::getInnerBoundaries ( pConstFace  face)
static

Returns the inner boundaries of the face.

◆ getOuterBoundary()

static pConstWire Topo::FaceTool::getOuterBoundary ( pConstFace  face)
static

Returns the outer boundary of the face.

◆ getOuterBoundaryPoints()

static void Topo::FaceTool::getOuterBoundaryPoints ( pConstFace  face,
std::vector< Geom::Pnt > &  pnts 
)
static

Return the points of the outer boundary.

◆ getOuterBoundaryPointsFast() [1/2]

static void Topo::FaceTool::getOuterBoundaryPointsFast ( pConstFace  face,
std::vector< Geom::Pnt > &  pnts 
)
static

Return the points of the outer boundary.

◆ getOuterBoundaryPointsFast() [2/2]

static void Topo::FaceTool::getOuterBoundaryPointsFast ( FACE ,
std::vector< Geom::Pnt > &  pnt 
)
static

◆ getPointFaceDistance()

static bool Topo::FaceTool::getPointFaceDistance ( const Geom::Pnt p,
pConstFace  face,
Geom::Pnt nearest,
double &  distance 
)
static

Computes the minimum distances and the closest positions between an entity and a point.

◆ getSpecialFaceInfo()

static std::shared_ptr<Topo::SpecialFaceInfo> Topo::FaceTool::getSpecialFaceInfo ( pConstFace  face)
static

Special Info for Face, Cone, Cylinder.

◆ isNurbs()

static bool Topo::FaceTool::isNurbs ( pConstFace  face)
static

Returns true if surface type is BEZIERSURFACE or BSPLINESURFACE.

◆ isRectangular()

static bool Topo::FaceTool::isRectangular ( pConstFace  face,
Geom::Ax2 position,
double &  width,
double &  height 
)
static

Checks if a face is rectangular and returns its parameters.

◆ isSelfIntersecting()

static bool Topo::FaceTool::isSelfIntersecting ( pConstFace  face)
static

Returns true if the face is self-intersecting.

◆ isValidPointForFace()

static bool Topo::FaceTool::isValidPointForFace ( const Geom::Pnt p,
pConstFace  face,
double  precision = Geom::Precision::linear_Resolution() 
)
static

Checks if p is a valid point on face within the given tolerance.

◆ makeConnectedFaceSet()

static pShape Topo::FaceTool::makeConnectedFaceSet ( const std::vector< int > &  model,
const std::vector< Geom::Pnt > &  vertices 
)
static

Makes a connected face set from a model description and a vector of points. Returns an empty shell on failure.

◆ makeCylindricalFace()

static pFace Topo::FaceTool::makeCylindricalFace ( const Geom::Circ aCircle,
double  aParam1,
double  aParam2,
double  aHeight 
)
static

Makes a cylindrical face.

◆ makeFace() [1/4]

static pFace Topo::FaceTool::makeFace ( pWire  outer,
double  precision = Geom::Precision::linear_Resolution() 
)
static

Makes a face from a wire. The wire describes the outer boundary of the face.

◆ makeFace() [2/4]

static pFace Topo::FaceTool::makeFace ( const Geom::Pnt p1,
const Geom::Pnt p2,
const Geom::Pnt p3 
)
static

Makes a face from three points.

◆ makeFace() [3/4]

static pFace Topo::FaceTool::makeFace ( const Geom::Pnt p1,
const Geom::Pnt p2,
const Geom::Pnt p3,
const Geom::Pnt p4 
)
static

Makes a face from four points.

◆ makeFace() [4/4]

static pFace Topo::FaceTool::makeFace ( pWire  outerWire,
const std::vector< pWire > &  innerWires,
double  precision = Geom::Precision::linear_Resolution() 
)
static

Makes a face from an outer wire describing the outer boundary and inner wires describing the holes in the face. The wires must not overlap. Inner and outer wires must have opposite orientations.

◆ makePlanarFace()

static pFace Topo::FaceTool::makePlanarFace ( pWire  outerWire,
const std::vector< pWire > &  innerWires,
double  precision = Geom::Precision::linear_Resolution() 
)
static

Makes a planar face from an outer wire describing the outer boundary and inner wires describing the holes in the face. The wires must not overlap. Inner and outer wires must have opposite orientations.

◆ makePlanarFaces()

static std::vector<pFace> Topo::FaceTool::makePlanarFaces ( pConstBrepData  data)
static

Makes planar faces from BrepData.

◆ makePlanarFaceWithoutVoids()

static pFace Topo::FaceTool::makePlanarFaceWithoutVoids ( const std::vector< pWire > &  wires,
double  precision = Geom::Precision::linear_Resolution() 
)
static

Makes a planar face from the given wires. Each closed region on each wire is covered and all of the covered regions are united.

◆ makePolygon()

static pFace Topo::FaceTool::makePolygon ( const std::vector< Geom::Pnt > &  points)
static

Makes a polygonal face from a vector of points.

◆ projectPointOnFace() [1/2]

static bool Topo::FaceTool::projectPointOnFace ( const Geom::Pnt p,
pConstFace  face,
Geom::Pnt nearest 
)
static

Projects point 'p' on 'face'. Returns the nearest solution point.

◆ projectPointOnFace() [2/2]

static bool Topo::FaceTool::projectPointOnFace ( const Geom::Pnt p,
pConstFace  face,
double &  u,
double &  v 
)
static

Projects point 'p' on 'face'. Returns the parameter 'u' and 'v' at that point. Only the nearest solution is returned.

◆ transformed()

static pFace Topo::FaceTool::transformed ( pConstFace  face,
const Geom::Trsf transform 
)
static

Returns a copy of 'face' transformed by 'transform'.

Friends And Related Function Documentation

◆ MesherAcis::ShapeTesselator_Acis

friend class MesherAcis::ShapeTesselator_Acis
friend

◆ MesherAcis::TriangleData_Acis

friend class MesherAcis::TriangleData_Acis
friend

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