The Sketch ViewProvider This class handles mainly the drawing and editing of the sketch. More...
#include <ViewProviderSketch.h>
Classes | |
struct | constrIconQueueItem |
Internal type used for drawing constraint icons. More... | |
Public Member Functions | |
void | draw (bool temp=false, bool rebuildinformationlayer=true) |
draw the sketch in the inventor nodes temp => use temporary solver solution in SketchObject recreateinformationscenography => forces a rebuild of the information layer scenography More... | |
void | drawConstraintIcons () |
Draw all constraint icons. More... | |
void | drawEdit (const std::vector< Base::Vector2d > &EditCurve) |
draw the edit curve More... | |
bool | isSelectable (void) const override |
Is the view provider selectable. More... | |
virtual void | onSelectionChanged (const Gui::SelectionChanges &msg) override |
Observer message from the Selection. More... | |
void | showRestoreInformationLayer () |
Show/Hide nodes from information layer. More... | |
ViewProviderSketch () | |
constructor More... | |
virtual | ~ViewProviderSketch () |
destructor More... | |
handler control | |
void | activateHandler (DrawSketchHandler *newHandler) |
sets an DrawSketchHandler in control More... | |
void | purgeHandler (void) |
removes the active handler More... | |
void | setAxisPickStyle (bool on) |
set the pick style of the sketch coordinate axes More... | |
helper functions | |
void | getCoordsOnSketchPlane (double &u, double &v, const SbVec3f &point, const SbVec3f &normal) |
give the coordinates of a line on the sketch plane in sketcher (2D) coordinates More... | |
void | getProjectingLine (const SbVec2s &, const Gui::View3DInventorViewer *viewer, SbLine &) const |
give projecting line of position More... | |
bool | detectPreselection (const SoPickedPoint *Point, const Gui::View3DInventorViewer *viewer, const SbVec2s &cursorPos) |
helper to detect preselection More... | |
std::set< int > | detectPreselectionConstr (const SoPickedPoint *Point, const Gui::View3DInventorViewer *viewer, const SbVec2s &cursorPos) |
Helper for detectPreselection(), for constraints only. More... | |
void | centerSelection () |
void | doBoxSelection (const SbVec2s &startPos, const SbVec2s &endPos, const Gui::View3DInventorViewer *viewer) |
box selection method More... | |
void | updateColor (void) |
helper change the color of the sketch according to selection and solver status More... | |
Sketcher::SketchObject * | getSketchObject (void) const |
get the pointer to the sketch document object More... | |
const Sketcher::Sketch & | getSolvedSketch (void) const |
returns a const reference to the last solved sketch object. More... | |
void | snapToGrid (double &x, double &y) |
snap points x,y (mouse coordinates) onto grid if enabled More... | |
void | moveConstraint (int constNum, const Base::Vector2d &toPos) |
moves a selected constraint More... | |
Base::Vector3d | seekConstraintPosition (const Base::Vector3d &origPos, const Base::Vector3d &norm, const Base::Vector3d &dir, float step, const SoNode *constraint) |
finds a free position for placing a constraint icon More... | |
float | getScaleFactor () |
int | getPreselectPoint (void) const |
int | getPreselectCurve (void) const |
int | getPreselectCross (void) const |
![]() | |
SoSeparator * | createGrid (void) |
creates the grid More... | |
ViewProvider2DObjectGrid () | |
constructor More... | |
virtual | ~ViewProvider2DObjectGrid () |
destructor More... | |
![]() | |
virtual const char * | getDefaultDisplayMode () const |
get the default display mode More... | |
virtual std::vector< std::string > | getDisplayModes (void) const |
returns a list of all possible modes More... | |
ViewProvider2DObject () | |
constructor More... | |
virtual | ~ViewProvider2DObject () |
destructor More... | |
![]() | |
ViewProviderPart () | |
constructor More... | |
virtual | ~ViewProviderPart () |
destructor More... | |
![]() | |
bool | changeFaceColors () |
If no other task is pending it opens a dialog to allow to change face colors. More... | |
void | reload () |
Update the view representation. More... | |
virtual void | setDisplayMode (const char *ModeName) override |
set the display mode More... | |
ViewProviderPartExt () | |
constructor More... | |
virtual | ~ViewProviderPartExt () |
destructor More... | |
virtual bool | useNewSelectionModel (void) const override |
indicates if the ViewProvider use the new Selection model More... | |
virtual std::string | getElement (const SoDetail *) const override |
return a hit element to the selection path or 0 More... | |
virtual SoDetail * | getDetail (const char *) const override |
return the coin node detail of the subelement More... | |
virtual std::vector< Base::Vector3d > | getModelPoints (const SoPickedPoint *) const override |
virtual std::vector< Base::Vector3d > | getSelectionShape (const char *Element) const override |
return the highlight lines for a given element or the whole shape More... | |
void | setHighlightedFaces (const std::vector< App::Color > &colors) |
void | setHighlightedFaces (const std::vector< App::Material > &colors) |
void | unsetHighlightedFaces () |
void | setHighlightedEdges (const std::vector< App::Color > &colors) |
void | unsetHighlightedEdges () |
void | setHighlightedPoints (const std::vector< App::Color > &colors) |
void | unsetHighlightedPoints () |
virtual std::map< std::string, App::Color > | getElementColors (const char *element=0) const override |
virtual bool | isUpdateForced () const override |
virtual void | forceUpdate (bool enable=true) override |
virtual bool | allowOverride (const App::DocumentObject &) const override |
Allow this class to be used as an override for the original view provider of the given object. More... | |
![]() | |
SoPickedPoint * | getPickedPoint (const SbVec2s &pos, const View3DInventorViewer &viewer) const |
This method is provided for convenience and does basically the same as getPickedPoints() unless that only the closest point to the camera will be picked. More... | |
SoPickedPointList | getPickedPoints (const SbVec2s &pos, const View3DInventorViewer &viewer, bool pickAll=false) const |
Returns a list of picked points from the geometry under getRoot(). More... | |
ViewProviderGeometryObject () | |
constructor. More... | |
virtual | ~ViewProviderGeometryObject () |
destructor. More... | |
virtual void | showBoundingBox (bool) |
![]() | |
ViewProviderDragger () | |
constructor. More... | |
virtual | ~ViewProviderDragger () |
destructor. More... | |
virtual ViewProvider * | startEditing (int ModNum=0) override |
![]() | |
virtual bool | canDelete (App::DocumentObject *obj) const override |
Asks the view provider if the given object can be deleted. More... | |
virtual bool | canDropObjectEx (App::DocumentObject *, App::DocumentObject *, const char *, const std::vector< std::string > &) const override |
Query object dropping with full qualified name. More... | |
virtual bool | getDetailPath (const char *subname, SoFullPath *pPath, bool append, SoDetail *&det) const override |
return the coin node detail and path to the node of the subname More... | |
Gui::Document * | getDocument () const |
Get the GUI document to this ViewProvider object. More... | |
virtual bool | getElementPicked (const SoPickedPoint *, std::string &subname) const override |
return a hit element given the picked point which contains the full node path More... | |
App::DocumentObject * | getObject (void) const |
Get the object of this ViewProvider object. More... | |
PyObject * | getPyObject () override |
Get the python wrapper for that ViewProvider. More... | |
virtual void | getTaskViewContent (std::vector< Gui::TaskView::TaskContent * > &) const override |
Get a list of TaskBoxes associated with this object. More... | |
virtual void | hide (void) override |
Hide the object in the view. More... | |
virtual void | reattach (App::DocumentObject *) |
virtual int | replaceObject (App::DocumentObject *, App::DocumentObject *) override |
Replace an object to the view provider by drag and drop. More... | |
void | setActiveMode () |
Set the active mode, i.e. the first item of the 'Display' property. More... | |
virtual void | show (void) override |
Show the object in the view. More... | |
virtual bool | showInTree () const override |
Tell the tree view if this object should appear there. More... | |
virtual void | update (const App::Property *) override |
update the content of the ViewProvider this method have to implement the recalculation of the ViewProvider. More... | |
void | updateView () |
Run a redraw. More... | |
ViewProviderDocumentObject () | |
constructor. More... | |
virtual | ~ViewProviderDocumentObject () |
destructor. More... | |
virtual void | startRestoring () |
virtual void | finishRestoring () |
virtual bool | removeDynamicProperty (const char *prop) override |
virtual App::Property * | addDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false) override |
virtual ViewProviderDocumentObject * | getLinkedViewProvider (std::string *subname=0, bool recursive=false) const |
Return the linked view object. More... | |
virtual std::string | getFullName () const override |
void | setShowable (bool enable) |
bool | isShowable () const |
![]() | |
virtual bool | canAddToSceneGraph () const |
Indicate whether to be added to scene graph or not. More... | |
virtual std::vector< App::DocumentObject * > | claimChildren3D (void) const |
deliver the children belonging to this object this method is used to deliver the objects to the 3DView which should be grouped under its scene graph. More... | |
SoSeparator * | getAnnotation (void) |
virtual SoSeparator * | getBackRoot (void) const |
virtual SoGroup * | getChildRoot (void) const |
virtual SoSeparator * | getFrontRoot (void) const |
SoSwitch * | getModeSwitch (void) const |
virtual SoSeparator * | getRoot (void) const |
SoTransform * | getTransformNode () const |
ViewProvider () | |
constructor. More... | |
virtual | ~ViewProvider () |
destructor. More... | |
int | partialRender (const std::vector< std::string > &subelements, bool clear) |
partial rendering setup More... | |
Base::BoundBox3d | getBoundingBox (const char *subname=0, bool transform=true, MDIView *view=0) const |
Return the bound box of this view object. More... | |
virtual void | beforeDelete () |
Called before deletion. More... | |
virtual bool | canDragObjects () const |
Check whether children can be removed from the view provider by drag and drop. More... | |
virtual bool | canDragObject (App::DocumentObject *) const |
Check whether the object can be removed from the view provider by drag and drop. More... | |
virtual void | dragObject (App::DocumentObject *) |
Remove a child from the view provider by drag and drop. More... | |
virtual bool | canDropObjects () const |
Check whether objects can be added to the view provider by drag and drop or drop only. More... | |
virtual bool | canDropObject (App::DocumentObject *) const |
Check whether the object can be dropped to the view provider by drag and drop or drop only. More... | |
virtual bool | canDragAndDropObject (App::DocumentObject *) const |
Return false to force drop only operation for a given object. More... | |
virtual void | dropObject (App::DocumentObject *) |
Add an object to the view provider by drag and drop. More... | |
virtual std::string | getDropPrefix () const |
return a subname referencing the sub-object holding the dropped objects More... | |
virtual std::string | dropObjectEx (App::DocumentObject *obj, App::DocumentObject *owner, const char *subname, const std::vector< std::string > &elements) |
Add an object with full qualified name to the view provider by drag and drop. More... | |
virtual bool | canRemoveChildrenFromRoot () const |
Tell the tree view to remove children items from the tree root. More... | |
std::string | getActiveDisplayMode (void) const |
virtual bool | isShow (void) const |
checks whether the view provider is visible or not More... | |
void | setVisible (bool) |
bool | isVisible () const |
void | setLinkVisible (bool) |
bool | isLinkVisible () const |
virtual void | setOverrideMode (const std::string &mode) |
Overrides the display mode with mode. More... | |
const std::string | getOverrideMode () |
bool | isEditing () const |
void | finishEditing () |
bool | isUpdatesEnabled () const |
void | setUpdatesEnabled (bool enable) |
unsigned long | getStatus () const |
return the status bits More... | |
bool | testStatus (ViewStatus pos) const |
void | setStatus (ViewStatus pos, bool on) |
std::string | toString () const |
virtual QIcon | getIcon (void) const |
deliver the icon shown in the tree view More... | |
virtual std::vector< App::DocumentObject * > | claimChildren (void) const |
deliver the children belonging to this object this method is used to deliver the objects to the tree framework which should be grouped under its label. More... | |
virtual void | setElementColors (const std::map< std::string, App::Color > &colors) |
virtual void | setTransformation (const Base::Matrix4D &rcMatrix) |
set the viewing transformation of the provider More... | |
virtual void | setTransformation (const SbMatrix &rcMatrix) |
virtual MDIView * | getMDIView () const |
bool | isRestoring () |
void | addDisplayMaskMode (SoNode *node, const char *type) |
Adds a new display mask mode. More... | |
void | setDisplayMaskMode (const char *type) |
Activates the display mask mode type. More... | |
SoNode * | getDisplayMaskMode (const char *type) const |
Get the node to the display mask mode type. More... | |
std::vector< std::string > | getDisplayMaskModes () const |
Returns a list of added display mask modes. More... | |
void | setDefaultMode (int) |
int | getDefaultMode () const |
virtual void | setRenderCacheMode (int) |
![]() | |
TransactionalObject (void) | |
Constructor. More... | |
virtual | ~TransactionalObject () |
![]() | |
ExtensionIterator | extensionBegin () |
ExtensionContainer () | |
ExtensionIterator | extensionEnd () |
App::Extension * | getExtension (Base::Type, bool derived=true, bool no_except=false) const |
App::Extension * | getExtension (const std::string &name) const |
template<typename ExtensionT > | |
ExtensionT * | getExtensionByType (bool no_except=false, bool derived=true) const |
std::vector< Extension * > | getExtensionsDerivedFrom (Base::Type type) const |
template<typename ExtensionT > | |
std::vector< ExtensionT * > | getExtensionsDerivedFromType () const |
bool | hasExtension (Base::Type, bool derived=true) const |
bool | hasExtension (const std::string &name) const |
bool | hasExtensions () const |
void | registerExtension (Base::Type extension, App::Extension *ext) |
virtual | ~ExtensionContainer () |
virtual Property * | getPropertyByName (const char *name) const override |
find a property by its name More... | |
virtual const char * | getPropertyName (const Property *prop) const override |
get the name of a property More... | |
virtual void | getPropertyMap (std::map< std::string, Property * > &Map) const override |
get all properties of the class (including properties of the parent) More... | |
virtual void | getPropertyList (std::vector< Property * > &List) const override |
get all properties of the class (including properties of the parent) More... | |
virtual short | getPropertyType (const Property *prop) const override |
get the Type of a Property More... | |
virtual short | getPropertyType (const char *name) const override |
get the Type of a named Property More... | |
virtual const char * | getPropertyGroup (const Property *prop) const override |
get the Group of a Property More... | |
virtual const char * | getPropertyGroup (const char *name) const override |
get the Group of a named Property More... | |
virtual const char * | getPropertyDocumentation (const Property *prop) const override |
get the Group of a Property More... | |
virtual const char * | getPropertyDocumentation (const char *name) const override |
get the Group of a named Property More... | |
virtual void | Save (Base::Writer &writer) const override |
This method is used to save properties to an XML document. More... | |
void | saveExtensions (Base::Writer &writer) const |
void | restoreExtensions (Base::XMLReader &reader) |
![]() | |
virtual App::Property * | getDynamicPropertyByName (const char *name) const |
DynamicProperty::PropData | getDynamicPropertyData (const Property *prop) const |
virtual std::vector< std::string > | getDynamicPropertyNames () const |
virtual unsigned int | getMemSize (void) const |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
const char * | getPropertyPrefix () const |
bool | isHidden (const char *name) const |
check if the named property is hidden More... | |
bool | isHidden (const Property *prop) const |
check if the property is hidden More... | |
bool | isReadOnly (const char *name) const |
check if the named property is read-only More... | |
bool | isReadOnly (const Property *prop) const |
check if the property is read-only More... | |
PropertyContainer () | |
A constructor. More... | |
void | setPropertyPrefix (const char *prefix) |
void | setPropertyStatus (unsigned char bit, bool value) |
set the Status bit of all properties at once More... | |
virtual | ~PropertyContainer () |
A destructor. More... | |
![]() | |
void | dumpToStream (std::ostream &stream, int compression) |
virtual Base::Type | getTypeId (void) const |
virtual void | RestoreDocFile (Reader &) |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More... | |
void | restoreFromStream (std::istream &stream) |
virtual void | SaveDocFile (Writer &) const |
This method is used to save large amounts of data to a binary file. More... | |
![]() | |
BaseClass () | |
Construction. More... | |
bool | isDerivedFrom (const Type type) const |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
![]() | |
virtual QIcon | extensionMergeColorfullOverlayIcons (const QIcon &orig) const override |
virtual void | extensionSetupContextMenu (QMenu *, QObject *, const char *) override |
virtual void | extensionUpdateData (const App::Property *) override |
ViewProviderAttachExtension (void) | |
Constructor. More... | |
virtual | ~ViewProviderAttachExtension ()=default |
![]() | |
virtual void | extensionAttach (App::DocumentObject *) |
virtual void | extensionBeforeDelete () |
virtual bool | extensionCanDragAndDropObject (App::DocumentObject *) const |
virtual bool | extensionCanDragObject (App::DocumentObject *) const |
virtual bool | extensionCanDragObjects () const |
virtual bool | extensionCanDropObject (App::DocumentObject *) const |
virtual bool | extensionCanDropObjectEx (App::DocumentObject *, App::DocumentObject *, const char *, const std::vector< std::string > &) const |
virtual bool | extensionCanDropObjects () const |
virtual std::vector< App::DocumentObject * > | extensionClaimChildren (void) const |
virtual std::vector< App::DocumentObject * > | extensionClaimChildren3D (void) const |
virtual void | extensionDragObject (App::DocumentObject *) |
virtual void | extensionDropObject (App::DocumentObject *) |
virtual std::string | extensionDropObjectEx (App::DocumentObject *obj, App::DocumentObject *, const char *, const std::vector< std::string > &) |
virtual void | extensionFinishRestoring () |
virtual SoSeparator * | extensionGetBackRoot (void) const |
virtual SoGroup * | extensionGetChildRoot (void) const |
virtual bool | extensionGetDetailPath (const char *, SoFullPath *, SoDetail *&) const |
virtual std::vector< std::string > | extensionGetDisplayModes (void) const |
virtual bool | extensionGetElementPicked (const SoPickedPoint *, std::string &) const |
virtual SoSeparator * | extensionGetFrontRoot (void) const |
virtual void | extensionHide (void) |
Hides the view provider. More... | |
virtual QIcon | extensionMergeGreyableOverlayIcons (const QIcon &orig) const |
virtual void | extensionModeSwitchChange (void) |
virtual bool | extensionOnDelete (const std::vector< std::string > &) |
virtual void | extensionReattach (App::DocumentObject *) |
virtual int | extensionReplaceObject (App::DocumentObject *, App::DocumentObject *) |
virtual void | extensionSetDisplayMode (const char *) |
virtual void | extensionShow (void) |
Shows the view provider. More... | |
virtual void | extensionStartRestoring () |
Gui::ViewProviderDocumentObject * | getExtendedViewProvider () |
const Gui::ViewProviderDocumentObject * | getExtendedViewProvider () const |
virtual PyObject * | getExtensionPyObject () |
bool | ignoreOverlayIcon () const |
void | setIgnoreOverlayIcon (bool on) |
ViewProviderExtension () | |
virtual | ~ViewProviderExtension () |
![]() | |
Extension () | |
App::ExtensionContainer * | getExtendedContainer () |
const App::ExtensionContainer * | getExtendedContainer () const |
virtual void | initExtension (App::ExtensionContainer *obj) |
bool | isPythonExtension () |
std::string | name () const |
virtual | ~Extension () |
virtual Property * | extensionGetPropertyByName (const char *name) const |
find a property by its name More... | |
virtual const char * | extensionGetPropertyName (const Property *prop) const |
get the name of a property More... | |
virtual void | extensionGetPropertyMap (std::map< std::string, Property * > &Map) const |
get all properties of the class (including properties of the parent) More... | |
virtual void | extensionGetPropertyList (std::vector< Property * > &List) const |
get all properties of the class (including properties of the parent) More... | |
virtual short | extensionGetPropertyType (const Property *prop) const |
get the Type of a Property More... | |
virtual short | extensionGetPropertyType (const char *name) const |
get the Type of a named Property More... | |
virtual const char * | extensionGetPropertyGroup (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | extensionGetPropertyGroup (const char *name) const |
get the Group of a named Property More... | |
virtual const char * | extensionGetPropertyDocumentation (const Property *prop) const |
get the Group of a Property More... | |
virtual const char * | extensionGetPropertyDocumentation (const char *name) const |
get the Group of a named Property More... | |
virtual void | extensionSave (Base::Writer &) const |
virtual void | extensionRestore (Base::XMLReader &) |
bool | extensionIsDerivedFrom (const Base::Type type) const |
![]() | |
void | attachSelection () |
Attaches to the selection. More... | |
bool | blockConnection (bool block) |
void | detachSelection () |
Detaches from the selection. More... | |
bool | isConnectionAttached () const |
bool | isConnectionBlocked () const |
SelectionObserver (bool attach=true, int resolve=1) | |
Constructor. More... | |
SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, int resolve=1) | |
Constructor. More... | |
virtual | ~SelectionObserver () |
modus handling | |
enum | SketchMode { STATUS_NONE , STATUS_SELECT_Point , STATUS_SELECT_Edge , STATUS_SELECT_Constraint , STATUS_SELECT_Cross , STATUS_SKETCH_DragPoint , STATUS_SKETCH_DragCurve , STATUS_SKETCH_DragConstraint , STATUS_SKETCH_UseHandler , STATUS_SKETCH_StartRubberBand , STATUS_SKETCH_UseRubberBand } |
mode table More... | |
void | setSketchMode (SketchMode mode) |
is called by GuiCommands to set the drawing mode More... | |
SketchMode | getSketchMode (void) const |
get the sketch mode More... | |
Protected helpers for drawing constraint icons | |
typedef std::vector< constrIconQueueItem > | IconQueue |
Internal type used for drawing constraint icons. More... | |
typedef std::pair< QRect, std::set< int > > | ConstrIconBB |
For constraint icon bounding boxes. More... | |
typedef std::vector< ConstrIconBB > | ConstrIconBBVec |
For constraint icon bounding boxes. More... | |
SketchMode | Mode |
float | zCross |
float | zLowPoints |
float | zHighPoints |
float | zConstr |
float | zHighlight |
float | zText |
float | zEdit |
float | zHighLine |
float | zInfo |
float | zLowLines |
float | zMidLines |
float | zHighLines |
double | xInit |
double | yInit |
bool | relative |
Gui::Rubberband * | rubberband |
bool | visibleInformationChanged |
double | combrepscalehyst |
std::string | editDocName |
std::string | editObjName |
std::string | editSubName |
bool | isShownVirtualSpace |
ShortcutListener * | listener |
static SbColor | VertexColor |
static SbColor | CurveColor |
static SbColor | CreateCurveColor |
static SbColor | CurveDraftColor |
static SbColor | CurveExternalColor |
static SbColor | CrossColorV |
static SbColor | CrossColorH |
static SbColor | FullyConstrainedColor |
static SbColor | ConstrDimColor |
static SbColor | ConstrIcoColor |
static SbColor | NonDrivingConstrDimColor |
static SbColor | ExprBasedConstrDimColor |
static SbColor | PreselectColor |
static SbColor | SelectColor |
static SbColor | PreselectSelectedColor |
static SbColor | InformationColor |
static SbColor | DeactivatedConstrDimColor |
static SbColor | InternalAlignedGeoColor |
static SbColor | FullyConstraintElementColor |
static SbColor | FullyConstraintConstructionElementColor |
static SbColor | FullyConstraintInternalAlignmentColor |
static SbColor | FullyConstraintConstructionPointColor |
static SbColor | InvalidSketchColor |
static SbTime | prvClickTime |
static SbVec2s | prvClickPos |
static SbVec2s | prvCursorPos |
static SbVec2s | newCursorPos |
QString | iconTypeFromConstraint (Sketcher::Constraint *constraint) |
QColor | constrColor (int constraintId) |
Returns a QColor object appropriate for constraint with given id. More... | |
int | constrColorPriority (int constraintId) |
Used by drawMergedConstraintIcons to decide what color to make icons. More... | |
void | combineConstraintIcons (IconQueue iconQueue) |
void | drawTypicalConstraintIcon (const constrIconQueueItem &i) |
Renders an icon for a single constraint and sends it to Coin. More... | |
void | drawMergedConstraintIcons (IconQueue iconQueue) |
Combines multiple constraint icons and sends them to Coin. More... | |
QImage | renderConstrIcon (const QString &type, const QColor &iconColor, const QStringList &labels, const QList< QColor > &labelColors, double iconRotation, std::vector< QRect > *boundingBoxes=NULL, int *vPad=NULL) |
Helper for drawMergedConstraintIcons and drawTypicalConstraintIcon. More... | |
void | sendConstraintIconToCoin (const QImage &icon, SoImage *soImagePtr) |
Copies a QImage constraint icon into a SoImage*. More... | |
void | clearCoinImage (SoImage *soImagePtr) |
Essentially a version of sendConstraintIconToCoin, with a blank icon. More... | |
SbVec3s | getDisplayedSize (const SoImage *) const |
Returns the size that Coin should display the indicated image at. More... | |
void | setPositionText (const Base::Vector2d &Pos, const SbString &txt) |
void | setPositionText (const Base::Vector2d &Pos) |
void | resetPositionText (void) |
void | setPreselectPoint (int PreselectPoint) |
void | resetPreselectPoint (void) |
void | addSelectPoint (int SelectPoint) |
void | removeSelectPoint (int SelectPoint) |
void | clearSelectPoints (void) |
base class implementer | |
boost::signals2::signal< void()> | signalConstraintsChanged |
signals if the constraints list has changed More... | |
boost::signals2::signal< void(QString msg)> | signalSetUp |
signals if the sketch has been set up More... | |
boost::signals2::signal< void(QString msg)> | signalSolved |
signals if the sketch has been solved More... | |
boost::signals2::signal< void()> | signalElementsChanged |
signals if the elements list has changed More... | |
class | DrawSketchHandler |
struct | ::EditData |
EditData * | edit |
pointer to the edit data structure if the ViewProvider is in edit. More... | |
boost::signals2::connection | connectUndoDocument |
boost::signals2::connection | connectRedoDocument |
virtual void | attach (App::DocumentObject *) override |
Attaches the document object to this view provider. More... | |
virtual void | updateData (const App::Property *) override |
virtual void | setupContextMenu (QMenu *menu, QObject *receiver, const char *member) override |
set up the context-menu with the supported edit modes More... | |
virtual bool | onDelete (const std::vector< std::string > &) override |
is called when the Provider is in edit and a deletion request occurs More... | |
virtual const char * | getTransactionText () const override |
Is called by the tree if the user double clicks on the object. More... | |
virtual bool | doubleClicked (void) override |
is called by the tree if the user double clicks on the object More... | |
virtual bool | mouseMove (const SbVec2s &pos, Gui::View3DInventorViewer *viewer) override |
is called when the Provider is in edit and the mouse is moved More... | |
virtual bool | keyPressed (bool pressed, int key) override |
is called when the Provider is in edit and a key event ocours. Only ESC ends edit. More... | |
virtual bool | mouseButtonPressed (int Button, bool pressed, const SbVec2s &cursorPos, const Gui::View3DInventorViewer *viewer) override |
is called when the Provider is in edit and the mouse is clicked More... | |
void | deleteSelected () |
void | updateVirtualSpace (void) |
updates the visibility of the virtual space More... | |
void | setIsShownVirtualSpace (bool isshownvirtualspace) |
bool | getIsShownVirtualSpace (void) const |
virtual QIcon | mergeColorfulOverlayIcons (const QIcon &orig) const override |
Icons and Icon overlays. More... | |
void | OnChange (Base::Subject< const char * > &rCaller, const char *sReason) override |
Observer for parameter group. More... | |
Base::Placement | getEditingPlacement () const |
virtual bool | setEdit (int ModNum) override |
is called by the document when the provider goes in edit mode More... | |
virtual void | unsetEdit (int ModNum) override |
is called when you lose the edit mode More... | |
virtual void | setEditViewer (Gui::View3DInventorViewer *, int ModNum) override |
adjust viewer settings when editing a view provider More... | |
virtual void | unsetEditViewer (Gui::View3DInventorViewer *) override |
restores viewer settings when leaving editing mode More... | |
void | deactivateHandler () |
void | UpdateSolverInformation (void) |
update solver information based on last solving at SketchObject More... | |
bool | isPointOnSketch (const SoPickedPoint *pp) const |
helper to detect whether the picked point lies on the sketch More... | |
virtual void | onChanged (const App::Property *prop) override |
get called by the container whenever a property has been changed More... | |
void | editDoubleClicked (void) |
get called if a subelement is double clicked while editing More... | |
void | createEditInventorNodes (void) |
set up the edition data structure EditData More... | |
void | rebuildConstraintsVisual (void) |
build up the visual of the constraints More... | |
void | slotUndoDocument (const Gui::Document &) |
void | slotRedoDocument (const Gui::Document &) |
void | initItemsSizes () |
set icon & font sizes More... | |
void | subscribeToParameters () |
subscribe to parameter groups as an observer More... | |
void | unsubscribeToParameters () |
unsubscribe to parameter groups as an observer More... | |
void | updateInventorNodeSizes () |
updates the sizes of the edit mode inventor node More... | |
void | forceUpdateData () |
QString | getPresentationString (const Sketcher::Constraint *constraint) |
Return display string for constraint including hiding units if. More... | |
static QString | appendConstraintMsg (const QString &singularmsg, const QString &pluralmsg, const std::vector< int > &vector) |
Auxiliary function to generate messages about conflicting, redundant and malformed constraints. More... | |
Additional Inherited Members | |
![]() | |
enum | EditMode { Default = 0 , Transform , Cutting , Color } |
![]() | |
typedef std::map< Base::Type, App::Extension * >::iterator | ExtensionIterator |
![]() | |
static void | updateTransform (const Base::Placement &from, SoTransform *to) |
![]() | |
static const std::string & | hiddenMarker () |
static const char * | hasHiddenMarker (const char *subname) |
static SbMatrix | convert (const Base::Matrix4D &rcMatrix) |
static Base::Matrix4D | convert (const SbMatrix &sbMat) |
static void | eventCallback (void *ud, SoEventCallback *node) |
![]() | |
static void * | create (void) |
static std::string | encodeAttribute (const std::string &) |
Encodes an attribute upon saving. More... | |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
![]() | |
static void * | create (void) |
static Type | getClassTypeId (void) |
static void | init (void) |
![]() | |
virtual void | handleChangedPropertyType (Base::XMLReader &reader, const char *TypeName, App::Property *prop) |
PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container. More... | |
virtual void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. More... | |
void | updateGridExtent (float minx, float maxx, float miny, float maxy) |
![]() | |
void | applyColor (const Part::ShapeHistory &hist, const std::vector< App::Color > &colBase, std::vector< App::Color > &colBool) |
void | applyTransparency (const float &transparency, std::vector< App::Color > &colors) |
![]() | |
bool | loadParameter () |
void | updateVisual () |
void | getNormals (const TopoDS_Face &theFace, const Handle(Poly_Triangulation)&aPolyTri, TColgp_Array1OfDir &theNormals) |
![]() | |
void | setSelectable (bool Selectable=true) |
virtual unsigned long | getBoundColor () const |
![]() | |
![]() | |
virtual bool | isAttachedToDocument () const override |
virtual const char * | detachFromDocument () override |
virtual void | onPropertyStatusChanged (const App::Property &prop, unsigned long oldStatus) override |
get called when a property status has changed More... | |
virtual void | setModeSwitch () override |
Turn on mode switch. More... | |
Gui::MDIView * | getActiveView () const |
Gui::MDIView * | getEditingView () const |
Gui::MDIView * | getInventorView () const |
Gui::MDIView * | getViewOfNode (SoNode *node) const |
virtual void | onBeforeChange (const App::Property *prop) override |
get called before the value is changed More... | |
SoNode * | findFrontRootOfType (const SoType &type) const |
Searches in all view providers that are attached to an object that is part of the same document as the object this view provider is attached to for an front root of type. More... | |
![]() | |
int | getEditingMode () const |
return the edit mode or -1 if nothing is being edited More... | |
virtual QIcon | mergeGreyableOverlayIcons (const QIcon &orig) const |
bool | checkRecursion (SoNode *) |
Helper method to check that the node is valid, i.e. More... | |
SoPickedPoint * | getPointOnRay (const SbVec2s &pos, const View3DInventorViewer *viewer) const |
Helper method to get picked entities while editing. More... | |
SoPickedPoint * | getPointOnRay (const SbVec3f &pos, const SbVec3f &dir, const View3DInventorViewer *viewer) const |
Helper method to get picked entities while editing. More... | |
![]() | |
void | onBeforeChangeProperty (Document *doc, const Property *prop) |
![]() | |
virtual const PropertyData & | getPropertyData (void) const |
virtual void | handleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) |
PropertyContainer::handleChangedPropertyName is called during restore to possibly fix reading of older versions of this property container. More... | |
![]() | |
virtual void | extensionOnChanged (const Property *p) |
void | initExtensionType (Base::Type type) |
![]() | |
static const PropertyData * | getPropertyDataPtr (void) |
![]() | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
![]() | |
static void | initExtensionSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Base::Type::instantiationMethod method=0) |
![]() | |
SoSeparator * | GridRoot |
![]() | |
SoMaterialBinding * | pcFaceBind |
SoMaterialBinding * | pcLineBind |
SoMaterialBinding * | pcPointBind |
SoMaterial * | pcLineMaterial |
SoMaterial * | pcPointMaterial |
SoDrawStyle * | pcLineStyle |
SoDrawStyle * | pcPointStyle |
SoShapeHints * | pShapeHints |
SoCoordinate3 * | coords |
SoBrepFaceSet * | faceset |
SoNormal * | norm |
SoNormalBinding * | normb |
SoBrepEdgeSet * | lineset |
SoBrepPointSet * | nodeset |
bool | VisualTouched |
bool | NormalsFromUV |
![]() | |
SoMaterial * | pcShapeMaterial |
SoFCBoundingBox * | pcBoundingBox |
SoSwitch * | pcBoundSwitch |
SoBaseColor * | pcBoundColor |
![]() | |
SoFCCSysDragger * | csysDragger = nullptr |
![]() | |
App::DocumentObject * | pcObject |
Gui::Document * | pcDocument |
![]() | |
SoSeparator * | pcRoot |
The root Separator of the ViewProvider. More... | |
SoTransform * | pcTransform |
this is transformation for the provider More... | |
const char * | sPixmap |
SoSwitch * | pcModeSwitch |
this is the mode switch, all the different viewing modes are collected here More... | |
SoSeparator * | pcAnnotation |
The root separator for annotations. More... | |
ViewProviderPy * | pyViewObject |
std::string | overrideMode |
std::bitset< 32 > | StatusBits |
![]() | |
DynamicProperty | dynamicProps |
![]() | |
bool | m_isPythonExtension = false |
Py::Object | ExtensionPythonObject |
![]() | |
static App::PropertyQuantityConstraint::Constraints | GridSizeRange = {0.001,DBL_MAX,1.0} |
static const char * | GridStyleEnums [] = {"Dashed","Light",NULL} |
Detailed Description
The Sketch ViewProvider This class handles mainly the drawing and editing of the sketch.
It draws the geometry and the constraints applied to the sketch. It uses the class DrawSketchHandler to facilitate the creation of new geometry while editing.
Member Typedef Documentation
◆ ConstrIconBB
|
protected |
For constraint icon bounding boxes.
◆ ConstrIconBBVec
|
protected |
For constraint icon bounding boxes.
◆ IconQueue
|
protected |
Internal type used for drawing constraint icons.
Member Enumeration Documentation
◆ SketchMode
mode table
Enumerator | |
---|---|
STATUS_NONE | enum value View provider is in neutral. |
STATUS_SELECT_Point | enum value a point was selected. |
STATUS_SELECT_Edge | enum value an edge was selected. |
STATUS_SELECT_Constraint | enum value a constraint was selected. |
STATUS_SELECT_Cross | enum value the base coordinate system was selected. |
STATUS_SKETCH_DragPoint | enum value while dragging a point. |
STATUS_SKETCH_DragCurve | enum value while dragging a curve. |
STATUS_SKETCH_DragConstraint | enum value while dragging a compatible constraint. |
STATUS_SKETCH_UseHandler | enum value a DrawSketchHandler is in control. |
STATUS_SKETCH_StartRubberBand | enum value for initiating a rubber band selection |
STATUS_SKETCH_UseRubberBand | enum value when making a rubber band selection enum value a DrawSketchHandler is in control. |
Constructor & Destructor Documentation
◆ ViewProviderSketch()
ViewProviderSketch::ViewProviderSketch | ( | ) |
constructor
References App::GetApplication(), ParameterGrp::GetASCII(), ParameterGrp::GetBool(), ParameterGrp::GetGroup(), App::Color::getPackedValue(), App::Application::GetParameterGroupByPath(), ParameterGrp::GetUnsigned(), Base::Quantity::getValue(), App::Extension::initExtension(), Base::Quantity::parse(), App::Prop_None, App::Color::setPackedValue(), and App::Color::setValue().
◆ ~ViewProviderSketch()
|
virtual |
destructor
Member Function Documentation
◆ activateHandler()
void ViewProviderSketch::activateHandler | ( | DrawSketchHandler * | newHandler | ) |
sets an DrawSketchHandler in control
References Gui::Application::activeDocument(), Gui::Document::getActiveView(), Gui::Application::Instance, and SketcherGui::DrawSketchHandler::sketchgui.
◆ addSelectPoint()
|
protected |
◆ appendConstraintMsg()
|
staticprotected |
Auxiliary function to generate messages about conflicting, redundant and malformed constraints.
◆ attach()
|
overridevirtual |
Attaches the document object to this view provider.
Reimplemented from PartGui::ViewProvider2DObjectGrid.
Referenced by SketcherGui::ViewProviderCustom::updateData().
◆ centerSelection()
void ViewProviderSketch::centerSelection | ( | ) |
Look at the center of the bounding of all selected items
References OfflineRenderingUtils::viewer().
Referenced by SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_emitCenterSelectedItems().
◆ clearCoinImage()
|
protected |
Essentially a version of sendConstraintIconToCoin, with a blank icon.
◆ clearSelectPoints()
|
protected |
◆ combineConstraintIcons()
|
protected |
◆ constrColor()
|
protected |
Returns a QColor object appropriate for constraint with given id.
In the case of combined icons, the icon color is chosen based on the constraint with the highest priority from constrColorPriority()
◆ constrColorPriority()
|
protected |
Used by drawMergedConstraintIcons to decide what color to make icons.
See constrColor()
◆ createEditInventorNodes()
|
protected |
set up the edition data structure EditData
References App::GetApplication(), Gui::Inventor::MarkerBitmaps::getMarkerIndex(), App::Application::GetParameterGroupByPath(), and ParameterGrp::GetUnsigned().
◆ deactivateHandler()
|
protected |
◆ deleteSelected()
void ViewProviderSketch::deleteSelected | ( | ) |
◆ detectPreselection()
bool ViewProviderSketch::detectPreselection | ( | const SoPickedPoint * | Point, |
const Gui::View3DInventorViewer * | viewer, | ||
const SbVec2s & | cursorPos | ||
) |
helper to detect preselection
References Sketcher::PropertyConstraintList::getConstraintName(), Sketcher::GeoEnum::RefExt, Sketcher::GeoEnum::RtPnt, Gui::Selection(), Gui::SelectionSingleton::setPreselect(), Gui::SelectionSingleton::setPreselectCoord(), and OfflineRenderingUtils::viewer().
◆ detectPreselectionConstr()
std::set< int > ViewProviderSketch::detectPreselectionConstr | ( | const SoPickedPoint * | Point, |
const Gui::View3DInventorViewer * | viewer, | ||
const SbVec2s & | cursorPos | ||
) |
Helper for detectPreselection(), for constraints only.
References Base::Placement::getPosition(), Base::Placement::getRotation(), Base::Rotation::multVec(), OfflineRenderingUtils::viewer(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
◆ doBoxSelection()
void ViewProviderSketch::doBoxSelection | ( | const SbVec2s & | startPos, |
const SbVec2s & | endPos, | ||
const Gui::View3DInventorViewer * | viewer | ||
) |
box selection method
TODO: Make it impossible to miss the circle if it's big and the selection pretty thin.
References Base::Polygon2d::Add(), Gui::SelectionSingleton::addSelection2(), Part::GeomArcOfConic::getAngleXU(), Part::GeomArcOfConic::getCenter(), Base::Persistence::getClassTypeId(), Sketcher::SketchObject::getCompleteGeometry(), Part::GeomBoundedCurve::getEndPoint(), Part::GeomLineSegment::getEndPoint(), Part::GeomArcOfConic::getEndPoint(), Sketcher::SketchObject::getExternalGeometryCount(), Part::GeomArcOfParabola::getFocal(), Sketcher::SketchObject::getHighestCurveIndex(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), Base::Placement::getPosition(), Part::GeomArcOfCircle::getRadius(), Part::GeomArcOfCircle::getRange(), Part::GeomArcOfEllipse::getRange(), Part::GeomArcOfHyperbola::getRange(), Part::GeomArcOfParabola::getRange(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomLineSegment::getStartPoint(), Part::GeomArcOfConic::getStartPoint(), Base::Placement::multVec(), Gui::Selection(), OfflineRenderingUtils::viewer(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
◆ doubleClicked()
|
overridevirtual |
is called by the tree if the user double clicks on the object
Reimplemented from PartGui::ViewProviderPart.
References Gui::Application::activeDocument(), Gui::Application::Instance, and Gui::Document::setEdit().
◆ draw()
draw the sketch in the inventor nodes temp => use temporary solver solution in SketchObject recreateinformationscenography => forces a rebuild of the information layer scenography
References DraftVecUtils::angle(), SketcherGui::SoDatumLabel::ANGLE, Sketcher::Block, Sketcher::BSplineControlPoint, Sketcher::Coincident, Gui::coinRemoveAllChildren(), Base::Console(), Part::GeomCurve::curvatureAt(), SketcherGui::SoDatumLabel::datumtype, Sketcher::Diameter, SketcherGui::SoDatumLabel::DIAMETER, Sketcher::Distance, SketcherGui::SoDatumLabel::DISTANCE, Sketcher::DistanceX, SketcherGui::SoDatumLabel::DISTANCEX, Sketcher::DistanceY, SketcherGui::SoDatumLabel::DISTANCEY, Sketcher::Equal, Base::ConsoleSingleton::Error(), DraftVecUtils::find(), Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, App::GetApplication(), ParameterGrp::GetBool(), Part::GeomConic::getCenter(), Part::GeomArcOfConic::getCenter(), Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Base::UnitsApi::getDecimals(), Part::GeomBSplineCurve::getDegree(), Part::GeomBoundedCurve::getEndPoint(), Part::GeomLineSegment::getEndPoint(), Part::GeomArcOfConic::getEndPoint(), Part::GeomCurve::getFirstParameter(), Part::GeomArcOfParabola::getFocal(), Part::GeomArcOfParabola::getFocus(), ParameterGrp::GetInt(), Part::GeomBSplineCurve::getKnots(), Part::GeomCurve::getLastParameter(), Part::GeomArcOfEllipse::getMajorAxisDir(), Part::GeomArcOfHyperbola::getMajorAxisDir(), Part::GeomArcOfEllipse::getMajorRadius(), Part::GeomArcOfHyperbola::getMajorRadius(), Part::GeomArcOfEllipse::getMinorRadius(), Part::GeomArcOfHyperbola::getMinorRadius(), Part::GeomBSplineCurve::getMultiplicities(), App::Application::GetParameterGroupByPath(), Part::GeomBSplineCurve::getPoles(), Sketcher::Constraint::getPresentationValue(), Part::GeomCircle::getRadius(), Part::GeomArcOfCircle::getRadius(), Part::GeomArcOfEllipse::getRange(), Part::GeomArcOfHyperbola::getRange(), Part::GeomArcOfParabola::getRange(), Part::GeomBoundedCurve::getStartPoint(), Part::GeomLineSegment::getStartPoint(), Part::GeomArcOfConic::getStartPoint(), Base::Persistence::getTypeId(), Base::Quantity::getUserString(), Sketcher::Constraint::getValue(), Part::GeomBSplineCurve::getWeights(), Part::GeomArcOfConic::getXAxisDir(), Sketcher::Horizontal, Sketcher::InternalAlignment, Base::BaseClass::isDerivedFrom(), Part::GeomBSplineCurve::isPeriodic(), Sketcher::Constraint::LabelDistance, Sketcher::Constraint::LabelPosition, draftfunctions.move::move(), Sketcher::none, Part::GeomCurve::normalAt(), Base::Vector3< _Precision >::Normalize(), Sketcher::NumConstraintTypes, Sketcher::Parallel, draftguitools.gui_annotationstyleeditor::param, SketcherGui::SoDatumLabel::param1, SketcherGui::SoDatumLabel::param2, SketcherGui::SoDatumLabel::param3, Sketcher::Perpendicular, SketcherGui::SoDatumLabel::pnts, Part::GeomCurve::pointAtParameter(), Sketcher::PointOnObject, Base::Vector3< _Precision >::ProjectToLine(), Sketcher::Radius, SketcherGui::SoDatumLabel::RADIUS, Base::Vector3< _Precision >::RotateZ(), Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::SnellsLaw, SketcherGui::SoDatumLabel::string, Sketcher::Symmetric, SketcherGui::SoDatumLabel::SYMMETRIC, Sketcher::Tangent, Sketcher::Constraint::Third, Sketcher::Constraint::ThirdPos, Sketcher::Constraint::Type, Sketcher::Vertical, Sketcher::Weight, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadius::applyConstraint(), and CmdSketcherConstrainDiameter::applyConstraint().
◆ drawConstraintIcons()
void ViewProviderSketch::drawConstraintIcons | ( | ) |
Draw all constraint icons.
Except maybe the radius and lock ones?
References SketcherGui::SoZoomTranslation::abPos, Base::Console(), SketcherGui::ViewProviderSketch::constrIconQueueItem::constraintId, SketcherGui::ViewProviderSketch::constrIconQueueItem::destination, Gui::Application::editViewOfNode(), Sketcher::Equal, Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Base::Persistence::getTypeId(), Sketcher::Horizontal, SketcherGui::ViewProviderSketch::constrIconQueueItem::iconRotation, SketcherGui::ViewProviderSketch::constrIconQueueItem::infoPtr, Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), SketcherGui::ViewProviderSketch::constrIconQueueItem::label, Sketcher::none, Sketcher::Parallel, Sketcher::Perpendicular, SketcherGui::ViewProviderSketch::constrIconQueueItem::position, Sketcher::Symmetric, Sketcher::Tangent, SketcherGui::ViewProviderSketch::constrIconQueueItem::type, Sketcher::Vertical, OfflineRenderingUtils::viewer(), Base::ConsoleSingleton::Warning(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
◆ drawEdit()
void ViewProviderSketch::drawEdit | ( | const std::vector< Base::Vector2d > & | EditCurve | ) |
draw the edit curve
Referenced by DrawSketchHandlerBox::mouseMove(), DrawSketchHandlerLineSet::mouseMove(), DrawSketchHandlerArc::mouseMove(), DrawSketchHandler3PointArc::mouseMove(), DrawSketchHandlerCircle::mouseMove(), DrawSketchHandlerEllipse::mouseMove(), DrawSketchHandlerArcOfEllipse::mouseMove(), DrawSketchHandlerArcOfHyperbola::mouseMove(), DrawSketchHandlerArcOfParabola::mouseMove(), DrawSketchHandlerBSpline::mouseMove(), DrawSketchHandler3PointCircle::mouseMove(), DrawSketchHandlerExtend::mouseMove(), DrawSketchHandlerSlot::mouseMove(), DrawSketchHandlerRegularPolygon::mouseMove(), DrawSketchHandlerCopy::mouseMove(), DrawSketchHandlerRectangularArray::mouseMove(), DrawSketchHandlerBox::pressButton(), DrawSketchHandlerLineSet::pressButton(), DrawSketchHandlerArc::pressButton(), DrawSketchHandler3PointArc::pressButton(), DrawSketchHandler3PointCircle::pressButton(), DrawSketchHandlerCopy::pressButton(), DrawSketchHandlerRectangularArray::pressButton(), DrawSketchHandlerLineSet::quit(), DrawSketchHandlerBSpline::quit(), SketcherGui::DrawSketchHandler::quit(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerExtend::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), and DrawSketchHandlerBSpline::releaseButton().
◆ drawMergedConstraintIcons()
|
protected |
Combines multiple constraint icons and sends them to Coin.
◆ drawTypicalConstraintIcon()
|
protected |
Renders an icon for a single constraint and sends it to Coin.
◆ editDoubleClicked()
|
protected |
get called if a subelement is double clicked while editing
References Base::Console(), SketcherGui::EditDatumDialog::exec(), Sketcher::Constraint::isDimensional(), Base::ConsoleSingleton::Log(), Gui::Command::openCommand(), and draftutils.translate::QT_TRANSLATE_NOOP.
◆ forceUpdateData()
|
protected |
References Gui::Command::updateActive().
◆ getCoordsOnSketchPlane()
void ViewProviderSketch::getCoordsOnSketchPlane | ( | double & | u, |
double & | v, | ||
const SbVec3f & | point, | ||
const SbVec3f & | normal | ||
) |
give the coordinates of a line on the sketch plane in sketcher (2D) coordinates
References Base::Placement::getPosition(), Base::Placement::getRotation(), Base::Rotation::multVec(), Base::Placement::setRotation(), Base::Vector3< _Precision >::TransformToCoordinateSystem(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
◆ getDisplayedSize()
|
protected |
Returns the size that Coin should display the indicated image at.
◆ getEditingPlacement()
|
protected |
References Gui::Application::editDocument(), and Gui::Application::Instance.
◆ getIsShownVirtualSpace()
bool ViewProviderSketch::getIsShownVirtualSpace | ( | void | ) | const |
◆ getPreselectCross()
int ViewProviderSketch::getPreselectCross | ( | void | ) | const |
◆ getPreselectCurve()
int ViewProviderSketch::getPreselectCurve | ( | void | ) | const |
◆ getPreselectPoint()
int ViewProviderSketch::getPreselectPoint | ( | void | ) | const |
◆ getPresentationString()
|
protected |
Return display string for constraint including hiding units if.
References Base::Centimeters, Sketcher::Diameter, App::GetApplication(), ParameterGrp::GetBool(), ParameterGrp::GetGroup(), Sketcher::Constraint::getPresentationValue(), Base::UnitsApi::getSchema(), App::Application::GetUserParameter(), Base::Quantity::getUserString(), Base::ImperialDecimal, Sketcher::Constraint::isActive, Base::MmMin, Sketcher::Radius, Base::SI1, Base::SI2, and Sketcher::Constraint::Type.
◆ getProjectingLine()
void ViewProviderSketch::getProjectingLine | ( | const SbVec2s & | pnt, |
const Gui::View3DInventorViewer * | viewer, | ||
SbLine & | line | ||
) | const |
give projecting line of position
References OfflineRenderingUtils::viewer().
◆ getScaleFactor()
float ViewProviderSketch::getScaleFactor | ( | ) |
References Gui::Application::editViewOfNode(), Base::BaseClass::getClassTypeId(), Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), draftfunctions.scale::scale(), and OfflineRenderingUtils::viewer().
Referenced by CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), and SketcherGui::DrawSketchHandler::seekAutoConstraint().
◆ getSketchMode()
SketchMode SketcherGui::ViewProviderSketch::getSketchMode | ( | void | ) | const |
get the sketch mode
Referenced by SketcherGui::ReleaseHandler().
◆ getSketchObject()
Sketcher::SketchObject * ViewProviderSketch::getSketchObject | ( | void | ) | const |
get the pointer to the sketch document object
Referenced by CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), SketcherGui::EditDatumDialog::EditDatumDialog(), SketcherGui::DrawSketchHandler::getHighestCurveIndex(), SketcherGui::DrawSketchHandler::getHighestVertexIndex(), DrawSketchHandlerExtend::mouseMove(), SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_itemChanged(), SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_itemSelectionChanged(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemEntered(), SketcherGui::TaskSketcherElements::on_listWidgetElements_itemSelectionChanged(), SketcherGui::TaskSketcherConstrains::onSelectionChanged(), SketcherGui::TaskSketcherElements::onSelectionChanged(), DrawSketchHandlerLineSet::pressButton(), DrawSketchHandlerLineSet::registerPressedKey(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), SketcherGui::TaskSketcherMessages::TaskSketcherMessages(), SketcherGui::TaskSketcherSolverAdvanced::updateDefaultMethodParameters(), SketcherGui::TaskSketcherSolverAdvanced::updateRedundantMethodParameters(), SketcherGui::TaskSketcherSolverAdvanced::updateSketchObject(), and DrawSketchHandlerLineSet::updateTransitionData().
◆ getSolvedSketch()
const Sketcher::Sketch & ViewProviderSketch::getSolvedSketch | ( | void | ) | const |
returns a const reference to the last solved sketch object.
It guarantees that the solver object does not lose synchronisation with the SketchObject properties.
NOTE: Operations requiring write access to the solver must be done via SketchObject interface. See for example functions: -> inline void setRecalculateInitialSolutionWhileMovingPoint(bool recalculateInitialSolutionWhileMovingPoint) -> inline int initTemporaryMove(int geoId, PointPos pos, bool fine=true) -> inline int moveTemporaryPoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative=false) -> inline void updateSolverExtension(int geoId, std::unique_ptr<Part::GeometryExtension> && ext)
◆ getTransactionText()
|
overridevirtual |
Is called by the tree if the user double clicks on the object.
It returns the string for the transaction that will be shown in the undo/redo dialog. If null is returned then no transaction will be opened.
Reimplemented from Gui::ViewProviderDocumentObject.
◆ iconTypeFromConstraint()
|
protected |
TODO: Consider pushing this functionality up into Constraint
References Sketcher::Block, Sketcher::Equal, Sketcher::Horizontal, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::SnellsLaw, Sketcher::Symmetric, Sketcher::Tangent, Sketcher::Constraint::Type, and Sketcher::Vertical.
◆ initItemsSizes()
|
protected |
set icon & font sizes
References App::GetApplication(), ParameterGrp::GetFloat(), ParameterGrp::GetInt(), and App::Application::GetParameterGroupByPath().
◆ isPointOnSketch()
|
protected |
helper to detect whether the picked point lies on the sketch
◆ isSelectable()
|
overridevirtual |
Is the view provider selectable.
Reimplemented from Gui::ViewProviderGeometryObject.
References Gui::ViewProviderGeometryObject::isSelectable().
◆ keyPressed()
is called when the Provider is in edit and a key event ocours. Only ESC ends edit.
Reimplemented from Gui::ViewProvider.
References Sketcher::none.
◆ mergeColorfulOverlayIcons()
|
overridevirtual |
Icons and Icon overlays.
Reimplemented from Gui::ViewProvider.
References Gui::BitmapFactoryInst::BottomRight, Gui::ViewProvider::mergeColorfulOverlayIcons(), and Gui::BitmapFactoryInst::mergePixmap().
◆ mouseButtonPressed()
|
overridevirtual |
is called when the Provider is in edit and the mouse is clicked
Reimplemented from Gui::ViewProvider.
References Gui::SelectionSingleton::addSelection2(), Gui::SelectionSingleton::clearSelection(), Gui::cmdAppObjectArgs(), Base::Console(), Base::ConsoleSingleton::Error(), Sketcher::Constraint::GeoUndef, Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Sketcher::PropertyConstraintList::getConstraintName(), Gui::MenuManager::getInstance(), Gui::SelectionSingleton::getSelectionEx(), Base::Persistence::getTypeId(), Gui::Application::Instance, Gui::View3DInventorViewer::Native, Sketcher::none, draftutils.translate::QT_TRANSLATE_NOOP, Gui::SelectionSingleton::rmvSelection(), Gui::Selection(), Gui::MenuItem::setCommand(), Gui::Application::setupContextMenu(), Gui::MenuManager::setupContextMenu(), SketcherGui::tryAutoRecomputeIfNotSolve(), draftgeoutils.general::vec(), and OfflineRenderingUtils::viewer().
◆ mouseMove()
|
overridevirtual |
is called when the Provider is in edit and the mouse is moved
Reimplemented from Gui::ViewProvider.
References Sketcher::BSplineControlPoint, Sketcher::Constraint::GeoUndef, Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Part::Geometry::getExtension(), Base::Persistence::getTypeId(), Part::Geometry::hasExtension(), Gui::View3DInventorViewer::Image, Sketcher::SolverGeometryExtension::Independent, Sketcher::InternalAlignment, Sketcher::none, draftgeoutils.general::vec(), and OfflineRenderingUtils::viewer().
◆ moveConstraint()
void ViewProviderSketch::moveConstraint | ( | int | constNum, |
const Base::Vector2d & | toPos | ||
) |
moves a selected constraint
References Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Part::GeomLineSegment::getEndPoint(), Part::GeomLineSegment::getStartPoint(), Base::Persistence::getTypeId(), Sketcher::Constraint::LabelDistance, Sketcher::Constraint::LabelPosition, Sketcher::none, Base::Vector3< _Precision >::Normalize(), Base::Vector3< _Precision >::ProjectToLine(), Sketcher::Radius, Base::Vector3< _Precision >::RotateZ(), Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::Constraint::Third, Sketcher::Constraint::ThirdPos, Sketcher::Constraint::Type, draftgeoutils.general::vec(), Sketcher::Weight, Base::Vector2d::x, Base::Vector3< _Precision >::x, Base::Vector2d::y, and Base::Vector3< _Precision >::y.
◆ OnChange()
|
override |
Observer for parameter group.
◆ onChanged()
|
overrideprotectedvirtual |
get called by the container whenever a property has been changed
Reimplemented from PartGui::ViewProvider2DObjectGrid.
Reimplemented in SketcherGui::ViewProviderCustom.
References PartGui::ViewProvider2DObjectGrid::onChanged().
Referenced by draftviewproviders.view_base.ViewProviderDraft::attach(), ArchSite.Compass::buildCoordinates(), draftobjects.wire.Wire::execute(), ArchAxis.CommandArchGrid::IsActive(), ArchBuildingPart.ViewProviderBuildingPart::updateData(), ArchPanel.ViewProviderPanelCut::updateData(), ArchPanel.ViewProviderPanelSheet::updateData(), draftviewproviders.view_label.ViewProviderLabel::updateData(), draftviewproviders.view_layer.ViewProviderLayer::updateData(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy::updateData().
◆ onDelete()
|
overridevirtual |
is called when the Provider is in edit and a deletion request occurs
Reimplemented from Gui::ViewProvider.
References Gui::SelectionSingleton::clearSelection(), Gui::cmdAppObjectArgs(), Sketcher::Coincident, Base::Console(), Base::ConsoleSingleton::Error(), App::GetApplication(), ParameterGrp::GetBool(), Base::Persistence::getClassTypeId(), Sketcher::PropertyConstraintList::getIndexFromConstraintName(), App::Application::GetParameterGroupByPath(), Gui::ViewProvider::onDelete(), Sketcher::GeoEnum::RefExt, Sketcher::GeoEnum::RtPnt, Gui::Selection(), and Gui::Command::updateActive().
◆ onSelectionChanged()
|
overridevirtual |
Observer message from the Selection.
Implements Gui::SelectionObserver.
References Gui::SelectionChanges::AddSelection, Gui::SelectionChanges::ClrSelection, Sketcher::PropertyConstraintList::getIndexFromConstraintName(), Sketcher::GeoEnum::HAxis, Gui::SelectionChanges::RmvPreselect, Gui::SelectionChanges::RmvSelection, Sketcher::GeoEnum::RtPnt, Gui::SelectionChanges::SetPreselect, Gui::SelectionChanges::SetSelection, and Sketcher::GeoEnum::VAxis.
◆ purgeHandler()
void ViewProviderSketch::purgeHandler | ( | void | ) |
removes the active handler
References Gui::SelectionSingleton::clearSelection(), Gui::Application::editDocument(), Gui::Document::getActiveView(), Gui::Application::Instance, Gui::Selection(), and OfflineRenderingUtils::viewer().
Referenced by DrawSketchHandlerLineSet::pressButton(), SketcherGui::DrawSketchHandler::quit(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerPoint::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerExtend::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), DrawSketchHandlerBSpline::releaseButton(), and SketcherGui::ReleaseHandler().
◆ rebuildConstraintsVisual()
|
protected |
build up the visual of the constraints
References Sketcher::Block, Sketcher::Coincident, Gui::coinRemoveAllChildren(), Base::Console(), Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::Equal, Base::Persistence::getClassTypeId(), Base::Placement::getRotation(), Base::Persistence::getTypeId(), Sketcher::Horizontal, Sketcher::InternalAlignment, SketcherGui::SoDatumLabel::lineWidth, Base::Rotation::multVec(), SketcherGui::SoDatumLabel::norm, Sketcher::Parallel, Sketcher::Perpendicular, Sketcher::PointOnObject, Sketcher::Radius, Base::Placement::setRotation(), Sketcher::SnellsLaw, SketcherGui::SoDatumLabel::string, Sketcher::Symmetric, Sketcher::Tangent, SketcherGui::SoDatumLabel::textColor, Sketcher::Vertical, Base::ConsoleSingleton::Warning(), Sketcher::Weight, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
◆ removeSelectPoint()
|
protected |
◆ renderConstrIcon()
|
protected |
Helper for drawMergedConstraintIcons and drawTypicalConstraintIcon.
Note: labels, labelColors, and boundingBoxes are all assumed to be the same length.
- Parameters
-
boundingBoxes Gets populated with bounding boxes (in icon image coordinates) for the icon at left, then labels for different constraints. vPad If not NULL, gets set to the number of pixels that the text extends below the icon base.
References Gui::BitmapFactory(), Gui::QtTools::horizontalAdvance(), and Gui::BitmapFactoryInst::pixmapFromSvg().
◆ resetPositionText()
|
protected |
Referenced by SketcherGui::DrawSketchHandler::resetPositionText().
◆ resetPreselectPoint()
|
protected |
◆ seekConstraintPosition()
Base::Vector3d ViewProviderSketch::seekConstraintPosition | ( | const Base::Vector3d & | origPos, |
const Base::Vector3d & | norm, | ||
const Base::Vector3d & | dir, | ||
float | step, | ||
const SoNode * | constraint | ||
) |
finds a free position for placing a constraint icon
References Gui::Application::editViewOfNode(), Base::BaseClass::getClassTypeId(), Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), OfflineRenderingUtils::viewer(), Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
◆ sendConstraintIconToCoin()
|
protected |
Copies a QImage constraint icon into a SoImage*.
Used by drawTypicalConstraintIcon() and drawMergedConstraintIcons()
References Gui::BitmapFactory(), and Gui::BitmapFactoryInst::convert().
◆ setAxisPickStyle()
void ViewProviderSketch::setAxisPickStyle | ( | bool | on | ) |
set the pick style of the sketch coordinate axes
Referenced by DrawSketchHandlerExternal::activated(), DrawSketchHandlerCarbonCopy::activated(), DrawSketchHandlerExternal::deactivated(), and DrawSketchHandlerCarbonCopy::deactivated().
◆ setEdit()
|
overrideprotectedvirtual |
is called by the document when the provider goes in edit mode
Reimplemented from PartGui::ViewProvider2DObjectGrid.
References Gui::ControlSingleton::activeDialog(), Gui::Command::addModule(), draftgeoutils.faces::bind(), Gui::SelectionSingleton::clearSelection(), Base::Console(), Gui::Control(), Gui::Application::editDocument(), Base::ConsoleSingleton::Error(), Sketcher::SketchObject::evaluateConstraints(), App::GetApplication(), ParameterGrp::GetBool(), Gui::getMainWindow(), Gui::Command::getObjectCmd(), App::Application::GetParameterGroupByPath(), SketcherGui::TaskDlgEditSketch::getSketchView(), ParameterGrp::GetUnsigned(), Gui::Command::Gui, Gui::Application::Instance, Gui::ControlSingleton::reject(), Gui::SelectionSingleton::rmvPreselect(), Gui::Selection(), Gui::ControlSingleton::showDialog(), slotRedoDocument(), slotUndoDocument(), and Base::ConsoleSingleton::Warning().
Referenced by ArchAxis.ViewProviderArchGrid::doubleClicked(), ArchReference.ViewProviderArchReference::doubleClicked(), draftviewproviders.view_dimension.ViewProviderDimensionBase::doubleClicked(), PathScripts.PathPropertyBagGui.ViewProvider::doubleClicked(), PathScripts.PathSetupSheetGui.ViewProvider::doubleClicked(), PathScripts.PathToolBitGui.ViewProvider::doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet::doubleClicked(), ArchAxis.CommandArchGrid::IsActive(), ArchSchedule.CommandArchSchedule::IsActive(), PathScripts.PathIconViewProvider.ViewProvider::setupContextMenu(), PathScripts.PathJobGui.ViewProvider::setupContextMenu(), PathScripts.PathOpGui.ViewProvider::setupContextMenu(), and PathScripts.PathToolControllerGui.ViewProvider::setupContextMenu().
◆ setEditViewer()
|
overrideprotectedvirtual |
adjust viewer settings when editing a view provider
Reimplemented from Gui::ViewProviderDragger.
References Base::Console(), DraftVecUtils::dist(), Gui::Application::editDocument(), Base::ConsoleSingleton::Error(), Gui::Document::getInEdit(), Base::Placement::getPosition(), Base::Placement::getRotation(), Gui::Command::Gui, Gui::Application::Instance, and OfflineRenderingUtils::viewer().
◆ setIsShownVirtualSpace()
void ViewProviderSketch::setIsShownVirtualSpace | ( | bool | isshownvirtualspace | ) |
◆ setPositionText() [1/2]
|
protected |
References Base::Vector2d::x, and Base::Vector2d::y.
◆ setPositionText() [2/2]
|
protected |
References Base::Vector2d::x, and Base::Vector2d::y.
Referenced by SketcherGui::DrawSketchHandler::setPositionText().
◆ setPreselectPoint()
|
protected |
◆ setSketchMode()
void SketcherGui::ViewProviderSketch::setSketchMode | ( | SketchMode | mode | ) |
is called by GuiCommands to set the drawing mode
◆ setupContextMenu()
|
overridevirtual |
set up the context-menu with the supported edit modes
Reimplemented from PartGui::ViewProviderPartExt.
◆ showRestoreInformationLayer()
void ViewProviderSketch::showRestoreInformationLayer | ( | ) |
Show/Hide nodes from information layer.
◆ slotRedoDocument()
|
protected |
Referenced by setEdit().
◆ slotUndoDocument()
|
protected |
Referenced by setEdit().
◆ snapToGrid()
void ViewProviderSketch::snapToGrid | ( | double & | x, |
double & | y | ||
) |
snap points x,y (mouse coordinates) onto grid if enabled
◆ subscribeToParameters()
|
protected |
subscribe to parameter groups as an observer
References Base::Subject< _MessageType >::Attach(), App::GetApplication(), and App::Application::GetParameterGroupByPath().
◆ unsetEdit()
|
overrideprotectedvirtual |
is called when you lose the edit mode
Reimplemented from PartGui::ViewProvider2DObjectGrid.
References Gui::SelectionSingleton::addSelection(), Gui::SelectionSingleton::clearSelection(), Gui::ControlSingleton::closeDialog(), Gui::coinRemoveAllChildren(), Base::Console(), Gui::Control(), Base::ConsoleSingleton::Error(), Gui::getMainWindow(), Gui::Command::Gui, Gui::Selection(), and Gui::Command::updateActive().
Referenced by PathScripts.PathJobGui.ViewProvider::uneditObject().
◆ unsetEditViewer()
|
overrideprotectedvirtual |
restores viewer settings when leaving editing mode
Reimplemented from Gui::ViewProviderDragger.
References OfflineRenderingUtils::viewer().
◆ unsubscribeToParameters()
|
protected |
unsubscribe to parameter groups as an observer
References Base::Subject< _MessageType >::Detach(), App::GetApplication(), and App::Application::GetParameterGroupByPath().
◆ updateColor()
void ViewProviderSketch::updateColor | ( | void | ) |
helper change the color of the sketch according to selection and solver status
References Sketcher::Constraint::AlignmentType, Sketcher::Angle, Sketcher::Coincident, Sketcher::Diameter, Sketcher::Distance, Sketcher::DistanceX, Sketcher::DistanceY, Sketcher::EllipseFocus1, Sketcher::EllipseFocus2, Sketcher::EllipseMajorDiameter, Sketcher::EllipseMinorDiameter, Sketcher::Constraint::First, Sketcher::Constraint::FirstPos, Sketcher::SolverGeometryExtension::FullyConstraint, App::GetApplication(), Base::BaseClass::getClassTypeId(), Base::Persistence::getClassTypeId(), Sketcher::GeometryFacade::getConstruction(), Part::Geometry::getExtension(), Sketcher::GeometryFacade::getFacade(), ParameterGrp::GetInt(), App::Application::GetParameterGroupByPath(), Base::Persistence::getTypeId(), Part::Geometry::hasExtension(), Sketcher::InternalAlignment, Sketcher::Constraint::isActive, Sketcher::Constraint::isDriving, Sketcher::Radius, Sketcher::GeoEnum::RefExt, Sketcher::Constraint::Second, Sketcher::Constraint::SecondPos, Sketcher::Symmetric, Sketcher::Constraint::Type, Sketcher::GeoEnum::VAxis, and Sketcher::Weight.
Referenced by SketcherGui::TaskSketcherGeneral::onRenderOrderChanged().
◆ updateData()
|
overridevirtual |
Reimplemented from PartGui::ViewProvider2DObjectGrid.
Reimplemented in SketcherGui::ViewProviderCustom.
References Gui::Application::editDocument(), Gui::Document::getActiveView(), Base::BaseClass::getClassTypeId(), Gui::Application::Instance, and Base::BaseClass::isDerivedFrom().
Referenced by PathScripts.PathJobDlg.JobCreate::exec_(), draftviewproviders.view_dimension.ViewProviderLinearDimension::onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension::onChanged(), draftviewproviders.view_wire.ViewProviderWire::onChanged(), PathScripts.PathOpGui.TaskPanelPage::pageUpdateData(), PathScripts.PathPropertyBagGui.TaskPanel::setupUi(), and PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi().
◆ updateInventorNodeSizes()
|
protected |
updates the sizes of the edit mode inventor node
References Gui::Inventor::MarkerBitmaps::getMarkerIndex().
◆ UpdateSolverInformation()
|
protected |
update solver information based on last solving at SketchObject
◆ updateVirtualSpace()
void ViewProviderSketch::updateVirtualSpace | ( | void | ) |
updates the visibility of the virtual space
Friends And Related Function Documentation
◆ ::EditData
|
friend |
◆ DrawSketchHandler
|
friend |
Member Data Documentation
◆ Autoconstraints
App::PropertyBool SketcherGui::ViewProviderSketch::Autoconstraints |
◆ AvoidRedundant
App::PropertyBool SketcherGui::ViewProviderSketch::AvoidRedundant |
◆ combrepscalehyst
|
protected |
◆ connectRedoDocument
|
protected |
◆ connectUndoDocument
|
protected |
◆ ConstrDimColor
|
staticprotected |
◆ ConstrIcoColor
|
staticprotected |
◆ CreateCurveColor
|
staticprotected |
◆ CrossColorH
|
staticprotected |
◆ CrossColorV
|
staticprotected |
◆ CurveColor
|
staticprotected |
◆ CurveDraftColor
|
staticprotected |
◆ CurveExternalColor
|
staticprotected |
◆ DeactivatedConstrDimColor
|
staticprotected |
◆ edit
|
protected |
pointer to the edit data structure if the ViewProvider is in edit.
Referenced by PathScripts.PathToolLibraryEditor.CommandToolLibraryEdit::Activated(), and ArchAxis.CommandArchGrid::IsActive().
◆ editDocName
|
protected |
◆ EditingWorkbench
App::PropertyString SketcherGui::ViewProviderSketch::EditingWorkbench |
◆ editObjName
|
protected |
◆ editSubName
|
protected |
◆ ExprBasedConstrDimColor
|
staticprotected |
◆ FullyConstrainedColor
|
staticprotected |
◆ FullyConstraintConstructionElementColor
|
staticprotected |
◆ FullyConstraintConstructionPointColor
|
staticprotected |
◆ FullyConstraintElementColor
|
staticprotected |
◆ FullyConstraintInternalAlignmentColor
|
staticprotected |
◆ HideDependent
App::PropertyBool SketcherGui::ViewProviderSketch::HideDependent |
◆ InformationColor
|
staticprotected |
◆ InternalAlignedGeoColor
|
staticprotected |
◆ InvalidSketchColor
|
staticprotected |
◆ isShownVirtualSpace
|
protected |
◆ listener
|
protected |
◆ Mode
|
protected |
◆ newCursorPos
|
staticprotected |
◆ NonDrivingConstrDimColor
|
staticprotected |
◆ PreselectColor
|
staticprotected |
◆ PreselectSelectedColor
|
staticprotected |
◆ prvClickPos
|
staticprotected |
◆ prvClickTime
|
staticprotected |
◆ prvCursorPos
|
staticprotected |
◆ relative
|
protected |
◆ RestoreCamera
App::PropertyBool SketcherGui::ViewProviderSketch::RestoreCamera |
◆ rubberband
|
protected |
◆ SelectColor
|
staticprotected |
◆ ShowLinks
App::PropertyBool SketcherGui::ViewProviderSketch::ShowLinks |
◆ ShowSupport
App::PropertyBool SketcherGui::ViewProviderSketch::ShowSupport |
◆ signalConstraintsChanged
boost::signals2::signal<void ()> SketcherGui::ViewProviderSketch::signalConstraintsChanged |
signals if the constraints list has changed
Referenced by SketcherGui::TaskSketcherConstrains::TaskSketcherConstrains().
◆ signalElementsChanged
boost::signals2::signal<void ()> SketcherGui::ViewProviderSketch::signalElementsChanged |
signals if the elements list has changed
Referenced by SketcherGui::TaskSketcherElements::TaskSketcherElements().
◆ signalSetUp
boost::signals2::signal<void (QString msg)> SketcherGui::ViewProviderSketch::signalSetUp |
signals if the sketch has been set up
Referenced by SketcherGui::TaskSketcherMessages::TaskSketcherMessages().
◆ signalSolved
boost::signals2::signal<void (QString msg)> SketcherGui::ViewProviderSketch::signalSolved |
signals if the sketch has been solved
Referenced by SketcherGui::TaskSketcherMessages::TaskSketcherMessages().
◆ TempoVis
App::PropertyPythonObject SketcherGui::ViewProviderSketch::TempoVis |
◆ VertexColor
|
staticprotected |
◆ visibleInformationChanged
|
protected |
◆ xInit
|
protected |
◆ yInit
|
protected |
◆ zConstr
|
protected |
◆ zCross
|
protected |
◆ zEdit
|
protected |
◆ zHighlight
|
protected |
◆ zHighLine
|
protected |
◆ zHighLines
|
protected |
◆ zHighPoints
|
protected |
◆ zInfo
|
protected |
◆ zLowLines
|
protected |
◆ zLowPoints
|
protected |
◆ zMidLines
|
protected |
◆ zText
|
protected |
The documentation for this class was generated from the following files:
- Sources/FreeCAD/src/Mod/Sketcher/Gui/ViewProviderSketch.h
- Sources/FreeCAD/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp