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 PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Static Public Member Functions | |
static std::unique_ptr< FaceMaker > | ConstructFromType (Base::Type type) |
static std::unique_ptr< FaceMaker > | ConstructFromType (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 |
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.
Part::FaceMaker::FaceMaker | ( | ) |
|
virtual |
|
virtual |
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.
sh |
References myCompounds, mySourceShapes, and myWires.
|
virtual |
Referenced by Part::TopoShape::makeOffset2D(), and Path::Area::makeSections().
|
virtual |
Reimplemented in Part::FaceMakerExtrusion.
References ConstructFromType().
Referenced by Part::TopoShape::makeOffset2D(), and Path::Area::makeSections().
|
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.
|
static |
References Base::BaseClass::getClassTypeId().
|
static |
References ConstructFromType(), Base::Type::fromName(), and Base::Type::isBad().
Referenced by Build(), ConstructFromType(), Part::Face::execute(), Part::Revolution::execute(), Part::Extrusion::extrudeShape(), and Part::TopoShape::makeFace().
|
virtual |
Face: returns the face (result).
If result is not a single face, throws Base::TypeError. (hint: use .Shape() instead)
|
staticprotected |
|
virtual |
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.
comp |
|
protected |
Referenced by addShape().
|
protected |
|
protected |
Referenced by addShape(), and Part::FaceMakerExtrusion::Build().
|
protected |
Referenced by addShape(), Part::FaceMakerBullseye::Build_Essence(), and Part::FaceMakerCheese::Build_Essence().