SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Create a face given a set of point coordinates or edges (but not both). More...
#include <CreateFaces.h>
Public Member Functions | |
smtkTypeMacro (smtk::session::polygon::CreateFaces) | |
smtkCreateMacro (CreateFaces) | |
smtkSharedFromThisMacro (smtk::operation::Operation) | |
smtkSuperclassMacro (Operation) | |
Public Member Functions inherited from smtk::operation::XMLOperation | |
smtkTypeMacro (XMLOperation) | |
smtkSharedFromThisMacro (smtk::operation::Operation) | |
Public Member Functions inherited from smtk::operation::Operation | |
smtkTypeMacroBase (smtk::operation::Operation) | |
virtual Index | index () const |
virtual bool | configure (const smtk::attribute::AttributePtr &changedAttribute=smtk::attribute::AttributePtr(), const smtk::attribute::ItemPtr &changedItem=smtk::attribute::ItemPtr()) |
Update the operation's specification and operations to be consistent. More... | |
virtual bool | ableToOperate () |
Check if the operation's attribute resource is valid. More... | |
Result | operate () |
Execute the operation, log its outcome and return its results. More... | |
Outcome | safeOperate () |
Execute the operation in an asynchronous environment. More... | |
Outcome | safeOperate (Handler handler) |
virtual bool | releaseResult (Result &result) |
Release the operation result returned by operate() . More... | |
virtual smtk::io::Logger & | log () const |
Retrieve the operation's logger. More... | |
Specification | specification () |
This accessor facilitates the lazy construction of the specification, allowing for derived implementations of its creation. More... | |
Parameters | parameters () |
Access the operation's input parameters, constructing them if necessary. More... | |
Parameters | parameters () const |
Result | createResult (Outcome) |
Create an attribute representing this operation's result type. More... | |
ManagerPtr | manager () const |
Operations that are managed have a non-null pointer to their manager. | |
bool | restoreTrace (const std::string &trace) |
restore operation parameters from the trace of a previously run operation. | |
void | setManagers (const std::shared_ptr< smtk::common::Managers > &m) |
Operations may be passed application state in the form of a Managers type-container. | |
std::shared_ptr< smtk::common::Managers > | managers () const |
virtual bool | threadSafe () const |
Is this type of operation safe to launch in a thread? | |
smtk::resource::ManagerPtr | resourceManager () |
retrieve the resource manager, if available. | |
Result | operate (Key) |
Protected Member Functions | |
virtual bool | populateEdgeMap () |
Populate the list of edges we should use to generate faces. More... | |
Result | operateInternal () override |
Perform the actual operation and construct the result. | |
const char * | xmlDescription () const override |
void | evaluateLoop (RegionId faceNumber, OrientedEdges &loop, std::set< RegionId > &borders) |
void | updateLoopVertices (const smtk::model::Loop &loop, const smtk::model::Face &brd, bool isCCW) |
Visit each edge of the loop and update its vertices' polygon-storage. More... | |
void | removeFacesFromResult (const smtk::model::EntityRefs &faces) |
void | addTessellations () |
Protected Member Functions inherited from smtk::session::polygon::Operation | |
template<typename T , typename U , typename V > | |
void | pointsForLoop (T &polypts, int numPtsToUse, U &start, U finish, int numCoordsPerPoint, V pmodel) |
template<typename T , typename U , typename V , typename W > | |
void | pointsForLoop (T &polypts, int numEdgesToUse, U &curEdge, U edgesFinish, V &curEdgeDir, V edgeDirFinish, W &outerLoopEdges) |
template<typename T , typename U > | |
void | pointsInLoopOrderFromOrientedEdges (T &polypts, U begin, U end, smtk::shared_ptr< internal::pmodel > pmodel) |
Protected Member Functions inherited from smtk::operation::XMLOperation | |
Specification | createSpecification () override |
Protected Member Functions inherited from smtk::operation::Operation | |
virtual ResourceAccessMap | identifyLocksRequired () |
Identify resources to lock, and whether to lock them for reading or writing. More... | |
virtual void | postProcessResult (Result &) |
virtual void | markModifiedResources (Result &) |
virtual bool | unmanageResources (Result &) |
virtual void | generateSummary (Result &) |
Specification | createBaseSpecification () const |
Protected Attributes | |
std::map< RegionId, smtk::model::Face > | m_regionFaces |
std::map< RegionId, std::vector< OrientedEdges > > | m_regionLoops |
Result | m_result |
smtk::model::Model | m_model |
smtk::session::polygon::Resource::Ptr | m_resource |
Outcome | m_status |
ModelEdgeMap | m_edgeMap |
internal::Point | m_bdsLo |
internal::Point | m_bdsHi |
Protected Attributes inherited from smtk::operation::Operation | |
int | m_debugLevel { 0 } |
std::weak_ptr< Manager > | m_manager |
std::shared_ptr< smtk::common::Managers > | m_managers |
Friends | |
class | Neighborhood |
Additional Inherited Members | |
Public Types inherited from smtk::operation::Operation | |
enum | Outcome { Outcome::UNABLE_TO_OPERATE, Outcome::CANCELED, Outcome::FAILED, Outcome::SUCCEEDED, Outcome::UNKNOWN = -1 } |
typedef std::size_t | Index |
typedef std::shared_ptr< smtk::attribute::Attribute > | Parameters |
typedef std::shared_ptr< smtk::attribute::Attribute > | Result |
typedef std::shared_ptr< smtk::attribute::Resource > | Specification |
typedef std::shared_ptr< smtk::attribute::Definition > | Definition |
Public Attributes inherited from smtk::operation::Operation | |
friend | Manager |
friend | ImportPythonOperation |
Create a face given a set of point coordinates or edges (but not both).
|
protectedvirtual |
Populate the list of edges we should use to generate faces.
Subclasses may override this method.
We keep a set of model edges (m_edgeMap) marked by the directions in which they should be used to form faces. This will constrain what faces may be created without requiring users to pick a point interior to the face.
This way, when users specify oriented (CCW) point sequences or a preferred set of edges as outer loop + inner loops, we don't create faces that fill the holes. But when users specify that all possible faces should be created, they don't have to pick interior points.
-1 = use only negative orientation 0 = no preferred direction: use in either or both directions +1 = use only positive orientation
Reimplemented in smtk::session::polygon::CreateFacesFromEdges.
|
protected |
Visit each edge of the loop and update its vertices' polygon-storage.
This method does 2 things: (1) it ensures that the vertex has an incident-edge record for each edge of the loop and (2) it marks the proper indicent-edge record as adjacent to the bordant face (brd).
The question of which indicent-edge record should be marked is determined by the isCCW flag, which indicates to which side of the loop the face lies. When isCCW is true, brd lies to the left of the edges in the loop (looking from above the face in the direction of the model's normal vector). Otherwise, it lies to the right.