Prepare for getPrimitiveInfo
This commit is contained in:
parent
b5ccdcb875
commit
c73afc784c
1 changed files with 17 additions and 0 deletions
17
ARFrames.py
17
ARFrames.py
|
@ -26,6 +26,8 @@ class Frame(object):
|
|||
"Placement of the frame")
|
||||
obj.Placement = FreeCAD.Placement()
|
||||
obj.Proxy = self
|
||||
self.obj = obj
|
||||
self.additional_data = {}
|
||||
|
||||
def onChanged(self, fp, prop):
|
||||
pass
|
||||
|
@ -39,6 +41,13 @@ class Frame(object):
|
|||
def __setstate__(self, state):
|
||||
return None
|
||||
|
||||
def getDict(self):
|
||||
d = {}
|
||||
d["Label"] = self.obj.Label
|
||||
d["Placement"] = self.obj.Placement
|
||||
d.update(self.additional_data)
|
||||
return d
|
||||
|
||||
|
||||
class PartFrame(Frame):
|
||||
"""Frame rigidly attached to a part frame.
|
||||
|
@ -57,6 +66,11 @@ class PartFrame(Frame):
|
|||
if FreeCAD.GuiUp:
|
||||
obj.ViewObject.Proxy.updateData(obj, "Placement")
|
||||
|
||||
def getDict(self):
|
||||
d = Frame.getDict(self)
|
||||
d["Part"] = self.obj.Part
|
||||
return d
|
||||
|
||||
|
||||
class FeatureFrame(PartFrame):
|
||||
"""Frame rigidly attached to a feature.
|
||||
|
@ -403,6 +417,9 @@ class BaseFeaturePanel(object):
|
|||
self.fframe = makeFeatureFrame(self.selected.Object, self.local_ffpl)
|
||||
self.fframe.PrimitiveType = self.so_desc[0]
|
||||
self.fframe.ShapeType = self.so_desc[1]
|
||||
ad = ARTools.getPrimitiveInfo(self.so_desc[0],
|
||||
self.selected.SubObjects[0])
|
||||
self.fframe.Proxy.additional_data.update(ad)
|
||||
|
||||
def scaleChanged(self):
|
||||
scale = self.form.ScaleBox.value()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue