Public Member Functions | |
def execute (self, obj) | |
def onChanged (self, obj, prop) | |
Public Attributes | |
Type | |
Detailed Description
The base class for Draft objects. Parameters ---------- obj : a base C++ object The base object instantiated during creation, which commonly may be of types `Part::Part2DObjectPython`, `Part::FeaturePython`, or `App::FeaturePython`. >>> obj = App.ActiveDocument.addObject('Part::Part2DObjectPython') >>> DraftObject(obj) This class instance is stored in the `Proxy` attribute of the base object. :: obj.Proxy = self tp : str, optional It defaults to `'Unknown'`. It indicates the type of this scripted object, which will be assigned to the Proxy's `Type` attribute. This is useful to distinguish different types of scripted objects that may be derived from the same C++ class. Attributes ---------- Type : str It indicates the type of scripted object. Normally `Type = tp`. All objects have a `TypeId` attribute, but this attribute refers to the C++ class only. Using the `Type` attribute allows distinguishing among various types of objects derived from the same C++ class. >>> print(A.TypeId, "->", A.Proxy.Type) Part::Part2DObjectPython -> Wire >>> print(B.TypeId, "->", B.Proxy.Type) Part::Part2DObjectPython -> Circle This class attribute is accessible through the `Proxy` object: `obj.Proxy.Type`.
Member Function Documentation
◆ execute()
def draftobjects.base.DraftObject.execute | ( | self, | |
obj | |||
) |
Reimplemented in draftobjects.array.Array, draftobjects.patharray.PathArray, draftobjects.shape2dview.Shape2DView, draftobjects.pointarray.PointArray, draftobjects.wire.Wire, draftobjects.fillet.Fillet, draftobjects.bspline.BSpline, draftobjects.clone.Clone, draftobjects.drawingview.DrawingView, draftobjects.polygon.Polygon, draftobjects.rectangle.Rectangle, draftobjects.circle.Circle, draftobjects.ellipse.Ellipse, draftobjects.point.Point, draftobjects.facebinder.Facebinder, draftobjects.shapestring.ShapeString, draftobjects.block.Block, and draftobjects.bezcurve.BezCurve.
Referenced by draftobjects.facebinder.Facebinder.addSubobjects(), PathScripts.PathDressupDogbone.ObjectDressup.boneStateList(), ArchSite.Compass.buildCoordinates(), PathScripts.PathDressupHoldingTags.ObjectTagDressup.generateTags(), ArchSchedule.CommandArchSchedule.IsActive(), Mod.PartDesign.Scripts.Spring.MySpring.onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid.onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped.onChanged(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt.onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder.onChanged(), PathScripts.PathStock.StockFromBase.onChanged(), PathScripts.PathStock.StockCreateBox.onChanged(), PathScripts.PathStock.StockCreateCylinder.onChanged(), FeaturePython.DistanceBolt.onChanged(), draftobjects.draftlink.DraftLink.onDocumentRestored(), and draftobjects.patharray.PathArray.onDocumentRestored().
◆ onChanged()
def draftobjects.base.DraftObject.onChanged | ( | self, | |
obj, | |||
prop | |||
) |
Reimplemented in draftobjects.patharray.PathArray, draftobjects.array.Array, draftobjects.wire.Wire, draftobjects.draftlink.DraftLink, draftobjects.fillet.Fillet, draftobjects.bezcurve.BezCurve, and draftobjects.bspline.BSpline.
Referenced by draftviewproviders.view_base.ViewProviderDraft.attach(), ArchSite.Compass.buildCoordinates(), draftobjects.wire.Wire.execute(), ArchAxis.CommandArchGrid.IsActive(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.updateData(), and draftviewproviders.view_label.ViewProviderLabel.updateData().
Member Data Documentation
◆ Type
draftobjects.base.DraftObject.Type |
The documentation for this class was generated from the following file:
- src/Mod/Draft/draftobjects/base.py