This is the code that I initialize with.
Code: Select all
doc = App.ActiveDocument
body = doc.addObject('PartDesign::Body', 'gear_box')
gear_box_obj = doc.addObject("Part::FeaturePython", "GearBoxParameters")
gear_box = CycloidalGearBox(gear_box_obj)
Code: Select all
class CycloidalGearBox():
def __init__(self, obj):
...
obj.addProperty("App::PropertyLength", "clearance", "CycloidGearBox", QT_TRANSLATE_NOOP(
"App::Property", "clearance between parts")).clearance = H["clearance"]
self.Type = 'CycloidalGearBox'
self.Object = obj
self.doc = App.ActiveDocument
obj.Proxy = self
attrs = vars(self)
Thanks in advance for helping.