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... | |
virtual PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId (void) const |
bool | isDerivedFrom (const Type type) const |
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 (void) |
static Type | getClassTypeId (void) |
static void | init (void) |
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 |
Member Function Documentation
◆ addShape()
|
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.
- Parameters
-
sh
References myCompounds, mySourceShapes, and myWires.
Referenced by Part::Face::execute(), Part::Revolution::execute(), Part::Extrusion::extrudeShape(), Part::TopoShape::makEFace(), and Part::TopoShapeFacePy::PyInit().
◆ addWire()
|
virtual |
Referenced by Part::TopoShape::makeOffset2D(), and Path::Area::makeSections().
◆ Build()
|
virtual |
Reimplemented in Part::FaceMakerExtrusion.
References Build(), ConstructFromType(), and useCompound().
Referenced by Build(), Part::Face::execute(), Part::Revolution::execute(), Part::Extrusion::extrudeShape(), Part::TopoShape::makEFace(), Part::TopoShape::makeOffset2D(), Path::Area::makeSections(), and Part::TopoShapeFacePy::PyInit().
◆ 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::FaceMakerExtrusion, Part::FaceMakerSimple, Part::FaceMakerCheese, and Part::FaceMakerBullseye.
◆ ConstructFromType() [1/2]
|
static |
References Base::BaseClass::getClassTypeId().
◆ ConstructFromType() [2/2]
|
static |
References Base::Type::fromName(), and Base::Type::isBad().
Referenced by Build(), Part::Face::execute(), Part::Revolution::execute(), Part::Extrusion::extrudeShape(), Part::TopoShape::makEFace(), and Part::TopoShapeFacePy::PyInit().
◆ Face()
|
virtual |
Face: returns the face (result).
If result is not a single face, throws Base::TypeError. (hint: use .Shape() instead)
- Returns
Referenced by Part::TopoShapeFacePy::PyInit().
◆ throwNotImplemented()
|
staticprotected |
◆ useCompound()
|
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.
- Parameters
-
comp
Referenced by Build(), Part::Face::execute(), Part::Revolution::execute(), Part::Extrusion::extrudeShape(), Part::TopoShape::makEFace(), and Part::TopoShapeFacePy::PyInit().
Member Data Documentation
◆ myCompounds
|
protected |
Referenced by addShape().
◆ myShapesToReturn
|
protected |
◆ mySourceShapes
|
protected |
Referenced by addShape(), and Part::FaceMakerExtrusion::Build().
◆ myWires
|
protected |
Referenced by addShape(), Part::FaceMakerBullseye::Build_Essence(), and Part::FaceMakerCheese::Build_Essence().
The documentation for this class was generated from the following files:
- src/Mod/Part/App/FaceMaker.h
- src/Mod/Part/App/FaceMaker.cpp