I need Help to find a manner to reference my "CenterLinePoint" Object to a "BaseFeature" (if selected)
my code is :
Code: Select all
class CenterLinePoint(WF_Point):
""" The CenterLinePoint feature object. """
# this method is mandatory
def __init__(self,selfobj):
self.name = "CenterLinePoint"
WF_Point.__init__(self, selfobj, self.name)
""" Add some custom properties to our CenterLinePoint feature object. """
selfobj.addProperty("App::PropertyLinkSub","Edge",self.name,
"Input edge")
selfobj.addProperty("App::PropertyInteger","NumberLinePart",self.name,
"The number of parts of parent segment !").NumberLinePart=2
selfobj.addProperty("App::PropertyInteger","IndexPart",self.name,
"The location of the point : 1/2 means middle of the segment !").IndexPart=1
selfobj.setEditorMode("Edge", 1)
selfobj.Proxy = self
# this method is mandatory
def execute(self,selfobj):
...
Hereafter an illustration
OS: Ubuntu 17.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13142 (Git)
Build type: None
Branch: master
Hash: b0928342309511026e713d1f4e26be65b5b297dc
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/France (fr_FR)
Thank you for your help
Rentlau