ArchComponent.ViewProviderComponent Class Reference

Public Member Functions

def areDifferentColors (self, a, b)
 
def attach (self, vobj)
 
def claimChildren (self)
 
def colorize (self, obj, force=False)
 
def getDisplayModes (self, vobj)
 
def getIcon (self)
 
def onChanged (self, vobj, prop)
 
def setDisplayMode (self, mode)
 
def setEdit (self, vobj, mode)
 
def setProperties (self, vobj)
 
def setupContextMenu (self, vobj, menu)
 
def toggleSubcomponents (self)
 
def unsetEdit (self, vobj, mode)
 
def updateData (self, obj, prop)
 

Public Attributes

 hiresgroup
 
 meshcolor
 
 meshnode
 
 Object
 

Detailed Description

A default View Provider for Component objects.

Acts as a base for all other Arch view providers. It's properties and
behaviours are common to all Arch view providers.

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The view provider to turn into a component view provider.

Member Function Documentation

◆ areDifferentColors()

def ArchComponent.ViewProviderComponent.areDifferentColors (   self,
  a,
  b 
)
Check if two diffuse colors are almost the same.

Parameters
----------
a: tuple
    The first DiffuseColor value to compare.
a: tuple
    The second DiffuseColor value to compare.

Returns
-------
bool:
    True if colors are different, false if they are similar.

Referenced by ArchComponent.ViewProviderComponent.colorize(), and ArchCurtainWall.ViewProviderCurtainWall.colorize().

◆ attach()

def ArchComponent.ViewProviderComponent.attach (   self,
  vobj 
)
Add display modes' data to the coin scenegraph.

Add each display mode as a coin node, whose parent is this view
provider.

Each display mode's node includes the data needed to display the object
in that mode. This might include colors of faces, or the draw style of
lines. This data is stored as additional coin nodes which are children
of the display mode node.

Add the HiRes display mode.

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by ArchWall.areSameWallTypes(), ArchRebar.makeRebar(), and ArchSpace.removeSpaceBoundaries().

◆ claimChildren()

def ArchComponent.ViewProviderComponent.claimChildren (   self)
Define which objects will appear as children in the tree view.

Set the host object's Base object as a child, and set any additions or
subtractions as children.

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.

Returns
-------
list of <App::DocumentObject>s:
    The objects claimed as children.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by ArchFrame.makeFrame(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.onDelete(), femviewprovider.view_result_mechanical.VPResultMechanical.onDelete(), BOPTools.JoinFeatures.ViewProviderConnect.onDelete(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.onDelete(), BOPTools.SplitFeatures.ViewProviderSlice.onDelete(), and BOPTools.SplitFeatures.ViewProviderXOR.onDelete().

◆ colorize()

def ArchComponent.ViewProviderComponent.colorize (   self,
  obj,
  force = False 
)
If an object is a clone, set it to copy the color of its parent.

Only change the color of the clone if the clone and its parent have
colors that are distinguishably different from each other.

Parameters
----------
obj: <Part::Feature>
    The object to change the color of.
force: bool
    If true, forces the colourisation even if the two objects have very
    similar colors.

Reimplemented in ArchCurtainWall.ViewProviderCurtainWall.

References ArchComponent.ViewProviderComponent.areDifferentColors().

Referenced by ArchCurtainWall.ViewProviderCurtainWall.onChanged(), and ArchCurtainWall.ViewProviderCurtainWall.updateData().

◆ getDisplayModes()

def ArchComponent.ViewProviderComponent.getDisplayModes (   self,
  vobj 
)
Define the display modes unique to the Arch Component.

Define mode HiRes, which displays the component as a mesh, intended as
a more visually appealing version of the component.

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.

Returns
-------
list of str
    List containing the names of the new display modes.

Referenced by ArchWall.areSameWallTypes(), ArchRebar.makeRebar(), and ArchSpace.removeSpaceBoundaries().

◆ getIcon()

def ArchComponent.ViewProviderComponent.getIcon (   self)
Return the path to the appropriate icon.

If a clone, return the cloned component icon path. Otherwise return the
Arch Component icon.

Returns
-------
str
    Path to the appropriate icon .svg file.

Reimplemented in ArchCurtainWall.ViewProviderCurtainWall, and ArchTruss.ViewProviderTruss.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by ArchAxisSystem.AxisSystemTaskPanel.update(), ArchComponent.ComponentTaskPanel.update(), and ArchSectionPlane.SectionPlaneTaskPanel.update().

◆ onChanged()

def ArchComponent.ViewProviderComponent.onChanged (   self,
  vobj,
  prop 
)
Method called when the view provider has a property changed.

If DiffuseColor changes, change DiffuseColor to copy the host object's
clone, if it exists.

If ShapeColor changes, overwrite it with DiffuseColor.

If Visibility changes, propagate the change to all view objects that
are also hosted by this view object's host.

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.
prop: string
    The name of the property that has changed.

Reimplemented in ArchCurtainWall.ViewProviderCurtainWall.

Referenced by ArchStructure.CommandStructuralSystem.Activated(), draftviewproviders.view_base.ViewProviderDraft.attach(), ArchSite.Compass.buildCoordinates(), draftobjects.wire.Wire.execute(), ArchRebar.makeRebar(), ArchCurtainWall.ViewProviderCurtainWall.onChanged(), 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().

◆ setDisplayMode()

def ArchComponent.ViewProviderComponent.setDisplayMode (   self,
  mode 
)
Method called when the display mode changes.

Called when the display mode changes, this method can be used to set
data that wasn't available when .attach() was called.

When HiRes is set as display mode, display the component as a copy of
the mesh associated as the HiRes property of the host object. See
ArchComponent.Component's properties.

If no shape is set in the HiRes property, just display the object as
the Flat Lines display mode.

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.
mode: str
    The name of the display mode the view provider has switched to.

Returns
-------
str:
    The name of the display mode the view provider has switched to.

References ArchComponent.ViewProviderComponent.hiresgroup, ArchComponent.ViewProviderComponent.meshnode, Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by ArchWall.areSameWallTypes(), and ArchSpace.removeSpaceBoundaries().

◆ setEdit()

def ArchComponent.ViewProviderComponent.setEdit (   self,
  vobj,
  mode 
)
Method called when the document requests the object to enter edit mode.

Edit mode is entered when a user double clicks on an object in the tree
view, or when they use the menu option [Edit -> Toggle Edit Mode].

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.
mode: int or str
    The edit mode the document has requested. Set to 0 when requested via
    a double click or [Edit -> Toggle Edit Mode].

Returns
-------
bool
    If edit mode was entered.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by ArchGrid.ViewProviderArchGrid.doubleClicked(), ArchReference.ViewProviderArchReference.doubleClicked(), draftviewproviders.view_dimension.ViewProviderDimensionBase.doubleClicked(), draftviewproviders.view_hatch.ViewProviderDraftHatch.doubleClicked(), draftviewproviders.view_text.ViewProviderText.doubleClicked(), PathScripts.PathPropertyBagGui.ViewProvider.doubleClicked(), PathScripts.PathSetupSheetGui.ViewProvider.doubleClicked(), PathScripts.PathToolBitGui.ViewProvider.doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet.doubleClicked(), ArchSchedule.CommandArchSchedule.IsActive(), PathScripts.PathIconViewProvider.ViewProvider.setupContextMenu(), PathScripts.PathJobGui.ViewProvider.setupContextMenu(), PathScripts.PathOpGui.ViewProvider.setupContextMenu(), and PathScripts.PathToolControllerGui.ViewProvider.setupContextMenu().

◆ setProperties()

◆ setupContextMenu()

def ArchComponent.ViewProviderComponent.setupContextMenu (   self,
  vobj,
  menu 
)
Add the component specific options to the context menu.

The context menu is the drop down menu that opens when the user right
clicks on the component in the tree view.

Add a menu choice to call the Arch_ToggleSubs Gui command. See
ArchCommands._ToggleSubs

Parameters
----------
vobj: <Gui.ViewProviderDocumentObject>
    The component's view provider object.
menu: <PySide2.QtWidgets.QMenu>
    The context menu already assembled prior to this method being
    called.

References ArchComponent.ViewProviderComponent.toggleSubcomponents().

◆ toggleSubcomponents()

def ArchComponent.ViewProviderComponent.toggleSubcomponents (   self)
Simple wrapper to call Arch_ToggleSubs when the relevant context
menu choice is selected.

Referenced by ArchComponent.ViewProviderComponent.setupContextMenu().

◆ unsetEdit()

def ArchComponent.ViewProviderComponent.unsetEdit (   self,
  vobj,
  mode 
)
Method called when the document requests the object exit edit mode.

Returns
-------
False

Referenced by PathScripts.PathJobGui.ViewProvider.uneditObject().

◆ updateData()

def ArchComponent.ViewProviderComponent.updateData (   self,
  obj,
  prop 
)
Method called when the host object has a property changed.

If the object has a Material associated with it, match the view
object's ShapeColor and Transparency to match the Material.

If the object is now cloned, or is part of a compound, have the view
object inherit the DiffuseColor.

Parameters
----------
obj: <App::FeaturePython>
    The host object that has changed.
prop: string
    The name of the property that has changed.

Reimplemented in ArchCurtainWall.ViewProviderCurtainWall.

Referenced by ArchPanel.CommandPanelSheet.Activated(), ArchStructure.CommandStructuralSystem.Activated(), ArchWall.areSameWallTypes(), PathScripts.PathJobDlg.JobCreate.exec_(), ArchRebar.makeRebar(), 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().

Member Data Documentation

◆ hiresgroup

ArchComponent.ViewProviderComponent.hiresgroup

◆ meshcolor

ArchComponent.ViewProviderComponent.meshcolor

◆ meshnode

ArchComponent.ViewProviderComponent.meshnode

◆ Object

ArchComponent.ViewProviderComponent.Object

Referenced by draftviewproviders.view_layer.ViewProviderLayer.activate(), ArchPanel.CommandPanelSheet.Activated(), ArchStructure.CommandStructuralSystem.Activated(), OpenSCADFeatures.ViewProviderTree.attach(), ArchComponent.ViewProviderComponent.attach(), draftviewproviders.view_base.ViewProviderDraft.attach(), draftviewproviders.view_dimension.ViewProviderLinearDimension.attach(), draftviewproviders.view_dimension.ViewProviderAngularDimension.attach(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.attach(), draftviewproviders.view_layer.ViewProviderLayer.attach(), draftviewproviders.view_layer.ViewProviderLayerContainer.attach(), PathScripts.PathArray.ViewProviderArray.attach(), PathScripts.PathCopy.ViewProviderPathCopy.attach(), PathScripts.PathDressupDragknife.ViewProviderDressup.attach(), PathScripts.PathHop.ViewProviderPathHop.attach(), PathScripts.PathOpGui.ViewProvider.attach(), ArchSite.Compass.buildCoordinates(), ArchReference.ViewProviderArchReference.checkChanges(), ArchComponent.ViewProviderComponent.claimChildren(), draftviewproviders.view_base.ViewProviderDraft.claimChildren(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.claimChildren(), draftviewproviders.view_draftlink.ViewProviderDraftLink.claimChildren(), draftviewproviders.view_layer.ViewProviderLayer.claimChildren(), draftviewproviders.view_wire.ViewProviderWire.claimChildren(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.claimChildren(), femviewprovider.view_result_mechanical.VPResultMechanical.claimChildren(), OpenSCADFeatures.ViewProviderTree.claimChildren(), BOPTools.JoinFeatures.ViewProviderConnect.claimChildren(), BOPTools.JoinFeatures.ViewProviderEmbed.claimChildren(), BOPTools.JoinFeatures.ViewProviderCutout.claimChildren(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.claimChildren(), BOPTools.SplitFeatures.ViewProviderSlice.claimChildren(), BOPTools.SplitFeatures.ViewProviderXOR.claimChildren(), PathScripts.PathArray.ViewProviderArray.claimChildren(), PathScripts.PathDressupDragknife.ViewProviderDressup.claimChildren(), Spreadsheet_legacy.ViewProviderSpreadsheet.claimChildren(), PathScripts.PathOpGui.ViewProvider.clearTaskPanel(), ArchBuildingPart.ViewProviderBuildingPart.cloneUp(), ArchStructure.StructureTaskPanel.connectNodes(), ArchBuildingPart.ViewProviderBuildingPart.createGroup(), draftviewproviders.view_text.ViewProviderText.createObject(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.doubleClicked(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.dragObject(), BOPTools.JoinFeatures.ViewProviderConnect.dragObject(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.dragObject(), BOPTools.SplitFeatures.ViewProviderXOR.dragObject(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.dropObject(), BOPTools.JoinFeatures.ViewProviderConnect.dropObject(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.dropObject(), BOPTools.SplitFeatures.ViewProviderXOR.dropObject(), ArchStructure.StructureTaskPanel.extendNodes(), draftviewproviders.view_wire.ViewProviderWire.flatten(), Mod.Show.Containers.Container.getCSChildren(), Mod.Show.Containers.Container.getDynamicChildren(), ArchBuildingPart.ViewProviderBuildingPart.getIcon(), ArchComponent.ViewProviderComponent.getIcon(), draftviewproviders.view_array.ViewProviderDraftArray.getIcon(), draftviewproviders.view_base.ViewProviderDraft.getIcon(), draftviewproviders.view_dimension.ViewProviderDimensionBase.getIcon(), draftviewproviders.view_draftlink.ViewProviderDraftLink.getIcon(), femviewprovider.view_base_femobject.VPBaseFemObject.getIcon(), femviewprovider.view_material_common.VPMaterialCommon.getIcon(), OpenSCADFeatures.ViewProviderTree.getIcon(), PathScripts.PathOpGui.ViewProvider.getIcon(), Mod.Show.Containers.Container.getStaticChildren(), Mod.Show.Containers.Container.getVisGroupChildren(), Mod.Show.Containers.Container.hasObjectRecursive(), draftviewproviders.view_dimension.ViewProviderLinearDimension.is_linked_to_circle(), Mod.Show.Containers.Container.isACS(), ArchSchedule.CommandArchSchedule.IsActive(), Mod.Show.Containers.Container.isAVisGroup(), Mod.Show.Containers.Container.isChildVisible(), draftviewproviders.view_layer.ViewProviderLayerContainer.merge_by_name(), draftviewproviders.view_base.ViewProviderDraft.onChanged(), BOPTools.JoinFeatures.ViewProviderEmbed.onDelete(), BOPTools.JoinFeatures.ViewProviderCutout.onDelete(), ArchReference.ViewProviderArchReference.onOpen(), ArchReference.ViewProviderArchReference.onReload(), ArchBuildingPart.ViewProviderBuildingPart.reorder(), ArchStructure.StructureTaskPanel.resetNodes(), draftviewproviders.view_layer.ViewProviderLayer.select_contents(), Mod.Show.Containers.Container.self_check(), ArchComponent.ViewProviderComponent.setDisplayMode(), ArchComponent.ViewProviderComponent.setEdit(), Mod.PartDesign.SprocketFeature.ViewProviderSprocket.setEdit(), ArchStructure.StructureTaskPanel.setSelectionFromTool(), ArchStructure.StructureTaskPanel.setToolFromSelection(), PathScripts.PathOpGui.ViewProvider.setupTaskPanel(), ArchBuildingPart.ViewProviderBuildingPart.setWorkingPlane(), femviewprovider.view_result_mechanical.VPResultMechanical.unsetEdit(), ArchBuildingPart.ViewProviderBuildingPart.writeCamera(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.writeCamera(), ArchBuildingPart.ViewProviderBuildingPart.writeInventor(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.writeState().


The documentation for this class was generated from the following file: