PartDesignGui Namespace Reference

Classes

class  CombineSelectionFilterGates
 
class  ComboLinks
 The ComboLinks class is a helper class that binds to a combo box and provides an interface to add links, retrieve links and select items by link value. More...
 
class  Module
 
class  NoDependentsSelection
 
class  ReferenceSelection
 
class  TaskBooleanParameters
 
class  TaskBoxPrimitives
 
class  TaskChamferParameters
 
class  TaskDatumParameters
 
class  TaskDlgBooleanParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgChamferParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgDatumParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgDraftParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgDressUpParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgFeatureParameters
 A common base for sketch based, dressup and other solid parameters dialogs. More...
 
class  TaskDlgFeaturePick
 simulation dialog for the TaskView More...
 
class  TaskDlgFilletParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgHoleParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgLinearPatternParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgLoftParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgMirroredParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgMultiTransformParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgPadParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgPipeParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgPocketParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgPolarPatternParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgRevolutionParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgScaledParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgShapeBinder
 simulation dialog for the TaskView More...
 
class  TaskDlgSketchBasedParameters
 
class  TaskDlgThicknessParameters
 simulation dialog for the TaskView More...
 
class  TaskDlgTransformedParameters
 simulation dialog for the TaskView More...
 
class  TaskDraftParameters
 
class  TaskDressUpParameters
 
class  TaskFeatureParameters
 Convenience class to collect common methods for all SketchBased features. More...
 
class  TaskFeaturePick
 
class  TaskFilletParameters
 
class  TaskHoleParameters
 
class  TaskLinearPatternParameters
 
class  TaskLoftParameters
 
class  TaskMirroredParameters
 
class  TaskMultiTransformParameters
 
class  TaskPadParameters
 
class  TaskPipeOrientation
 
class  TaskPipeParameters
 
class  TaskPipeScaling
 
class  TaskPocketParameters
 
class  TaskPolarPatternParameters
 
class  TaskPrimitiveParameters
 
class  TaskRevolutionParameters
 
class  TaskScaledParameters
 
class  TaskShapeBinder
 
class  TaskSketchBasedParameters
 Convenience class to collect common methods for all SketchBased features. More...
 
class  TaskThicknessParameters
 
class  TaskTransformedMessages
 
class  TaskTransformedParameters
 The transformed subclasses will be used in two different modes: More...
 
class  ViewProvider
 A common base class for all part design features view providers. More...
 
class  ViewProviderAddSub
 
class  ViewProviderBase
 
class  ViewProviderBody
 ViewProvider of the Body feature This class manages the visual appearance of the features in the Body feature. More...
 
class  ViewProviderBoolean
 
class  ViewProviderChamfer
 
class  ViewProviderDatum
 
class  ViewProviderDatumCoordinateSystem
 
class  ViewProviderDatumLine
 
class  ViewProviderDatumPlane
 
class  ViewProviderDatumPoint
 
class  ViewProviderDraft
 
class  ViewProviderDressUp
 
class  ViewProviderFillet
 
class  ViewProviderGroove
 
class  ViewProviderHole
 
class  ViewProviderLinearPattern
 
class  ViewProviderLoft
 
class  ViewProviderMainPart
 
class  ViewProviderMirrored
 
class  ViewProviderMultiTransform
 
class  ViewProviderPad
 
class  ViewProviderPipe
 
class  ViewProviderPocket
 
class  ViewProviderPolarPattern
 
class  ViewProviderPrimitive
 
class  ViewProviderPy
 The python export class for ViewProvider. More...
 
class  ViewProviderRevolution
 
class  ViewProviderScaled
 
class  ViewProviderShapeBinder
 
class  ViewProviderSketchBased
 A common base class for Sketch based view providers. More...
 
class  ViewProviderSubShapeBinder
 
class  ViewProviderThickness
 
class  ViewProviderTransformed
 
class  Workbench
 
class  WorkflowManager
 This class controls the workflow of each file. More...
 

Typedefs

typedef Gui::ViewProviderPythonFeatureT< ViewProviderViewProviderPython
 

Enumerations

enum  Workflow { Workflow::Undetermined = 0, Workflow::Legacy = 1<<0, Workflow::Modern = 1<<1 }
 Defines allowded tool set provided by the workbench Legacy mode provides a free PartDesign features but forbids bodies and parts. More...
 

Functions

App::PartassertActivePart ()
 Returns active part, if there is no such, creates a new part, if it fails, shows a message. More...
 
bool assureLegacyWorkflow (App::Document *doc)
 Assures that workflow of the given document is determined and returns true if it is Workflow::Legacy. More...
 
bool assureModernWorkflow (App::Document *doc)
 Assures that workflow of the given document is determined and returns true if it is Workflow::Modern. More...
 
std::string buildLinkListPythonStr (const std::vector< App::DocumentObject * > &objs)
 Return reference as string for python in the format [obj1, obj2, ...,]. More...
 
std::string buildLinkSingleSubPythonStr (const App::DocumentObject *obj, const std::vector< std::string > &subs)
 Return reference as string for python in the format (<obj> ["sub"?]) More...
 
std::string buildLinkSubListPythonStr (const std::vector< App::DocumentObject * > &objs, const std::vector< std::string > &subs)
 Returns sub reference list as a python string in the format [(obj1,"sub1"),(obj2,"sub2"),...]. More...
 
std::string buildLinkSubPythonStr (const App::DocumentObject *obj, const std::vector< std::string > &subs)
 Return reference as string for python in the format (<obj> ["sub1", "sub2", ...]) More...
 
std::vector< App::DocumentObject * > collectMovableDependencies (std::vector< App::DocumentObject * > &features)
 Collect dependencies of the features during the move. Dependencies should only be dependent on origin. More...
 
void fixSketchSupport (Sketcher::SketchObject *sketch)
 Fix sketch support after moving a free sketch into a body. More...
 
App::PartgetActivePart ()
 
PartDesign::BodygetBody (bool messageIfNot, bool autoActivate, bool assertModern, App::DocumentObject **topParent, std::string *subname)
 Return active body or show a warning message. If autoActivate is true (the default) then if there is only single body in the document it will be activated. More...
 
PartDesign::BodygetBodyFor (const App::DocumentObject *, bool messageIfNot, bool autoActivate=true, bool assertModern=true, App::DocumentObject **topParent=0, std::string *subname=0)
 Finds a body for the given feature. More...
 
App::PartgetPartFor (const App::DocumentObject *obj, bool messageIfNot)
 
void getReferencedSelection (const App::DocumentObject *thisObj, const Gui::SelectionChanges &msg, App::DocumentObject *&selObj, std::vector< std::string > &selSub)
 Extract reference from Selection. More...
 
QString getRefStr (const App::DocumentObject *obj, const std::vector< std::string > &sub)
 Return reference as string for UI elements (format <obj>:<subelement> More...
 
PyObjectinitModule ()
 
bool isAnyNonPartDesignLinksTo (PartDesign::Feature *feature, bool respectGroups=false)
 Returns true if document has any non-PartDesign objects that links to the given object. More...
 
bool isFeatureMovable (App::DocumentObject *feature)
 Check if feature is dependent on anything except movable sketches and datums. More...
 
bool isLegacyWorkflow (App::Document *doc)
 Returns true if the workflow of the given document is Workflow::Legacy. More...
 
bool isModernWorkflow (App::Document *doc)
 Returns true if the workflow of the given document is Workflow::Modern. More...
 
bool isPartDesignAwareObjecta (App::DocumentObject *obj, bool respectGroups=false)
 
PartDesign::BodymakeBody (App::Document *doc)
 Create a Body object in doc, set it active, and return pointer to it. More...
 
void needActiveBodyError (void)
 Display error when there are existing Body objects, but none are active. More...
 
void relinkToBody (PartDesign::Feature *feature)
 Relink all nonPartDesign features to the body instead of the given partDesign Feature. More...
 
void relinkToOrigin (App::DocumentObject *feature, PartDesign::Body *body)
 Relink sketches and datums to target body's origin. More...
 
bool setEdit (App::DocumentObject *obj, PartDesign::Body *body=0)
 Activate edit mode of the given object. More...
 

Typedef Documentation

◆ ViewProviderPython

Enumeration Type Documentation

◆ Workflow

Defines allowded tool set provided by the workbench Legacy mode provides a free PartDesign features but forbids bodies and parts.

Enumerator
Undetermined 

No workflow was chosen yet.

Legacy 

Old-style workflow with free features and no bodies.

Modern 

New-style workflow with bodies, parts etc.

Function Documentation

◆ assertActivePart()

App::Part* PartDesignGui::assertActivePart ( )

Returns active part, if there is no such, creates a new part, if it fails, shows a message.

◆ assureLegacyWorkflow()

bool PartDesignGui::assureLegacyWorkflow ( App::Document doc)

Assures that workflow of the given document is determined and returns true if it is Workflow::Legacy.

References PartDesignGui::WorkflowManager::determineWorkflow(), PartDesignGui::WorkflowManager::instance(), and Legacy.

◆ assureModernWorkflow()

bool PartDesignGui::assureModernWorkflow ( App::Document doc)

Assures that workflow of the given document is determined and returns true if it is Workflow::Modern.

References PartDesignGui::WorkflowManager::determineWorkflow(), PartDesignGui::WorkflowManager::instance(), and Modern.

Referenced by getBody().

◆ buildLinkListPythonStr()

std::string PartDesignGui::buildLinkListPythonStr ( const std::vector< App::DocumentObject * > &  objs)

Return reference as string for python in the format [obj1, obj2, ...,].

References Gui::Command::getObjectCmd().

Referenced by relinkToBody().

◆ buildLinkSingleSubPythonStr()

std::string PartDesignGui::buildLinkSingleSubPythonStr ( const App::DocumentObject obj,
const std::vector< std::string > &  subs 
)

◆ buildLinkSubListPythonStr()

std::string PartDesignGui::buildLinkSubListPythonStr ( const std::vector< App::DocumentObject * > &  objs,
const std::vector< std::string > &  subs 
)

Returns sub reference list as a python string in the format [(obj1,"sub1"),(obj2,"sub2"),...].

References Gui::Command::getObjectCmd().

Referenced by relinkToBody().

◆ buildLinkSubPythonStr()

std::string PartDesignGui::buildLinkSubPythonStr ( const App::DocumentObject obj,
const std::vector< std::string > &  subs 
)

Return reference as string for python in the format (<obj> ["sub1", "sub2", ...])

Referenced by relinkToBody().

◆ collectMovableDependencies()

std::vector< App::DocumentObject * > PartDesignGui::collectMovableDependencies ( std::vector< App::DocumentObject * > &  features)

Collect dependencies of the features during the move. Dependencies should only be dependent on origin.

References collectMovableDependencies(), Base::Persistence::getClassTypeId(), Base::Persistence::getTypeId(), and Base::Type::isDerivedFrom().

Referenced by collectMovableDependencies(), and PartDesignGui::ViewProviderBody::dropObject().

◆ fixSketchSupport()

◆ getActivePart()

◆ getBody()

PartDesign::Body * PartDesignGui::getBody ( bool  messageIfNot,
bool  autoActivate,
bool  assertModern,
App::DocumentObject **  topParent,
std::string *  subname 
)

Return active body or show a warning message. If autoActivate is true (the default) then if there is only single body in the document it will be activated.

Return active body or show a warning message.

Parameters
messageIfNot
autoActivate
Returns
Body

References Gui::Application::activeView(), assureModernWorkflow(), Gui::MDIView::getActiveObject(), Gui::BaseView::getAppDocument(), getBody(), Base::Persistence::getClassTypeId(), App::DocumentObject::getDocument(), Gui::getMainWindow(), Gui::Command::getObjectCmd(), App::DocumentObject::getParents(), and Gui::Application::Instance.

Referenced by PartDesignGui::ReferenceSelection::allow(), PartDesignGui::TaskFeaturePick::buildFeatures(), getBody(), and getBodyFor().

◆ getBodyFor()

PartDesign::Body * PartDesignGui::getBodyFor ( const App::DocumentObject ,
bool  messageIfNot,
bool  autoActivate = true,
bool  assertModern = true,
App::DocumentObject **  topParent = 0,
std::string *  subname = 0 
)

◆ getPartFor()

◆ getReferencedSelection()

◆ getRefStr()

QString PartDesignGui::getRefStr ( const App::DocumentObject obj,
const std::vector< std::string > &  sub 
)

◆ initModule()

PyObject* PartDesignGui::initModule ( )

◆ isAnyNonPartDesignLinksTo()

bool PartDesignGui::isAnyNonPartDesignLinksTo ( PartDesign::Feature feature,
bool  respectGroups = false 
)

Returns true if document has any non-PartDesign objects that links to the given object.

If respectGroups is true don't count links from App::GeoFeatureGroup-derived objects (default is false)

References DraftVecUtils::find(), Base::Persistence::getClassTypeId(), App::DocumentObject::getDocument(), App::PropertyContainer::getPropertyList(), isAnyNonPartDesignLinksTo(), and isPartDesignAwareObjecta().

Referenced by isAnyNonPartDesignLinksTo().

◆ isFeatureMovable()

◆ isLegacyWorkflow()

bool PartDesignGui::isLegacyWorkflow ( App::Document doc)

◆ isModernWorkflow()

bool PartDesignGui::isModernWorkflow ( App::Document doc)

◆ isPartDesignAwareObjecta()

bool PartDesignGui::isPartDesignAwareObjecta ( App::DocumentObject obj,
bool  respectGroups = false 
)

◆ makeBody()

PartDesign::Body * PartDesignGui::makeBody ( App::Document doc)

Create a Body object in doc, set it active, and return pointer to it.

References Gui::Command::Doc, Gui::ViewProvider::doubleClicked(), Gui::Application::getViewProvider(), Gui::Application::Instance, and makeBody().

Referenced by makeBody().

◆ needActiveBodyError()

void PartDesignGui::needActiveBodyError ( void  )

Display error when there are existing Body objects, but none are active.

References Gui::getMainWindow(), and needActiveBodyError().

Referenced by needActiveBodyError().

◆ relinkToBody()

◆ relinkToOrigin()

◆ setEdit()