Part::FaceMaker Class Referenceabstract

FaceMaker class is the base class for implementing various "smart" face making routines. More...

#include <FaceMaker.h>

Public Member Functions

virtual void addShape (const TopoDS_Shape &sh)
 addShape: add another wire, edge, or compound. More...
virtual void addWire (const TopoDS_Wire &w)
virtual void Build ()
virtual const TopoDS_Face & Face ()
 Face: returns the face (result). More...
 FaceMaker ()
virtual void useCompound (const TopoDS_Compound &comp)
 useCompound: add children of compound to the FaceMaker. More...
virtual ~FaceMaker ()
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 BaseClass (const BaseClass &)=default
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
virtual Type getTypeId () const
bool isDerivedFrom (const Type type) const
BaseClassoperator= (const BaseClass &)=default
virtual void setPyObject (PyObject *)
virtual ~BaseClass ()
 Destruction. More...

Static Public Member Functions

static std::unique_ptr< FaceMakerConstructFromType (Base::Type type)
static std::unique_ptr< FaceMakerConstructFromType (const char *className)
- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
static Type getClassTypeId ()
static void init ()

Protected Member Functions

virtual void Build_Essence ()=0
 Build_Essence: build routine that can assume there is no nesting. More...

Static Protected Member Functions

static void throwNotImplemented ()
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)

Protected Attributes

std::vector< TopoDS_Compound > myCompounds
std::vector< TopoDS_Shape > myShapesToReturn
std::vector< TopoDS_Shape > mySourceShapes
std::vector< TopoDS_Wire > myWires

Detailed Description

FaceMaker class is the base class for implementing various "smart" face making routines.

This was created to address the problem of multiple private implementations of making faces with holes, which are quite complex. The two most important facemaking routines then was: one in Part Extrude, and one in PartDesign (there, it is used in every sketch-based feature). Plus, another one (new) was needed for filling 2D offset.

Constructor & Destructor Documentation

◆ FaceMaker()

Part::FaceMaker::FaceMaker ( )

◆ ~FaceMaker()

virtual Part::FaceMaker::~FaceMaker ( )

Member Function Documentation

◆ addShape()

void Part::FaceMaker::addShape ( const TopoDS_Shape &  sh)

addShape: add another wire, edge, or compound.

If compound is added, its internals will be treated as isolated from the rest, and the compounding structure of result will follow.


References myCompounds, mySourceShapes, and myWires.

◆ addWire()

void Part::FaceMaker::addWire ( const TopoDS_Wire &  w)

◆ Build()

void Part::FaceMaker::Build ( )

◆ Build_Essence()

virtual void Part::FaceMaker::Build_Essence ( )
protectedpure virtual

Build_Essence: build routine that can assume there is no nesting.

Implementing instructions: Add new faces (or whatever) to myShapesToReturn. The rest is done by base class's Build(). Please ignore contents of myCompounds in implementation. If special handling of nesting is required, override whole Build().

Implemented in Part::FaceMakerSimple, Part::FaceMakerBullseye, Part::FaceMakerCheese, and Part::FaceMakerExtrusion.

◆ ConstructFromType() [1/2]

std::unique_ptr< Part::FaceMaker > Part::FaceMaker::ConstructFromType ( Base::Type  type)

◆ ConstructFromType() [2/2]

std::unique_ptr< Part::FaceMaker > Part::FaceMaker::ConstructFromType ( const char *  className)

◆ Face()

const TopoDS_Face & Part::FaceMaker::Face ( )

Face: returns the face (result).

If result is not a single face, throws Base::TypeError. (hint: use .Shape() instead)


◆ throwNotImplemented()

void Part::FaceMaker::throwNotImplemented ( )

◆ useCompound()

void Part::FaceMaker::useCompound ( const TopoDS_Compound &  comp)

useCompound: add children of compound to the FaceMaker.

Note that this is different from addShape(comp) - structure is lost. The compound is NOT expanded recursively.


Member Data Documentation

◆ myCompounds

std::vector<TopoDS_Compound> Part::FaceMaker::myCompounds

Referenced by addShape().

◆ myShapesToReturn

std::vector<TopoDS_Shape> Part::FaceMaker::myShapesToReturn

◆ mySourceShapes

std::vector<TopoDS_Shape> Part::FaceMaker::mySourceShapes

◆ myWires

std::vector<TopoDS_Wire> Part::FaceMaker::myWires

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