def __init__(self, selfobj):
        if m_debug:
            print("running ThreePointsPlane.__init__ !")

        self.name = "ThreePointsPlane"
        WF_Plane.__init__(self, selfobj, self.name)
        """ Add some custom properties to our ThreePointsPlane feature object. """
        selfobj.addProperty("App::PropertyLinkSub", "Point1", self.name,
                            "Point1")
        selfobj.addProperty("App::PropertyLinkSub", "Point2", self.name,
                            "Point2")
        selfobj.addProperty("App::PropertyLinkSub", "Point3", self.name,
                            "Point3")

        m_tooltip = """Width and Length of the plane in current units."""
        selfobj.addProperty("App::PropertyFloat", "Extension", self.name,
                            m_tooltip).Extension = m_extension
        # 0 -- default mode, read and write
        # 1 -- read-only
        # 2 -- hidden
        selfobj.setEditorMode("Point1", 1)
        selfobj.setEditorMode("Point2", 1)
        selfobj.setEditorMode("Point3", 1)

        selfobj.Proxy = self
예제 #2
0
    def onChanged(self, selfobj, prop):
        """ Print the name of the property that has changed """
        # Debug mode
        if WF.verbose() != 0:
            App.Console.PrintMessage("Change property : " + str(prop) + "\n")

        if 'parametric' in selfobj.PropertiesList:
            if selfobj.parametric == 'Not':
                selfobj.setEditorMode("Extension", 1)
            else:
                selfobj.setEditorMode("Extension", 0)

        if prop == "Extension":
            selfobj.Proxy.execute(selfobj)

        WF_Plane.onChanged(self, selfobj, prop)
예제 #3
0
    def onChanged(self, selfobj, prop):
        """ Print the name of the property that has changed """
        if M_DEBUG:
            print("running LinePointPlane.onChanged !")
            print("Change property : " + str(prop))

        WF_Plane.onChanged(self, selfobj, prop)

        if prop == "Parametric":
            if 'Parametric' in selfobj.PropertiesList:
                if selfobj.Parametric == 'Not':
                    selfobj.setEditorMode("Extension", 1)
                else:
                    selfobj.setEditorMode("Extension", 0)
            propertiesPlane(selfobj.Label, self.color)

        if prop == "Extension":
            selfobj.Proxy.execute(selfobj)
    def onChanged(self, selfobj, prop):
        if WF.verbose():
            App.Console.PrintMessage("Change property : " + str(prop) + "\n")

        if m_debug:
            print("running ThreePointsPlane.onChanged !")

        WF_Plane.onChanged(self, selfobj, prop)

        if prop == "Parametric":
            if 'Parametric' in selfobj.PropertiesList:
                if selfobj.Parametric == 'Not':
                    selfobj.setEditorMode("Extension", 1)
                else:
                    selfobj.setEditorMode("Extension", 0)
            propertiesPlane(selfobj.Label, self.color)

        if prop == "Extension":
            selfobj.Proxy.execute(selfobj)
예제 #5
0
    def __init__(self, selfobj):
        self.name = "PerpendicularLinePointPlane"
        WF_Plane.__init__(self, selfobj, self.name)
        """ Add some custom properties to our PerpendicularLinePointPlane feature object. """
        selfobj.addProperty("App::PropertyLinkSub", "Edge", self.name,
                            "Input edge")
        selfobj.addProperty("App::PropertyLinkSub", "Point", self.name,
                            "Input point")
        m_tooltip = """Extensions of plane in percentage of the Line Length.
Positive values upper than 100.0 will enlarge the Plane.
Positive values lower than 100.0 will start to shrink it."""
        selfobj.addProperty("App::PropertyFloat", "Extension", self.name,
                            m_tooltip).Extension = 100.0
        # 0 -- default mode, read and write
        # 1 -- read-only
        # 2 -- hidden
        selfobj.setEditorMode("Edge", 1)
        selfobj.setEditorMode("Point", 1)
        selfobj.Proxy = self
예제 #6
0
    def __init__(self, selfobj):
        if M_DEBUG:
            print("running LinePointPlane.__init__ !")

        self.name = "LinePointPlane"
        WF_Plane.__init__(self, selfobj, self.name)
        """ Add some custom properties to our LinePointPlane feature object. """
        selfobj.addProperty("App::PropertyLinkSub", "Edge", self.name,
                            "Input edge")
        selfobj.addProperty("App::PropertyLinkSub", "Point", self.name,
                            "Input point")

        m_tooltip = """Width and Length of the plane in current units."""
        selfobj.addProperty("App::PropertyFloat", "Extension", self.name,
                            m_tooltip).Extension = M_PLANE_EXT
        # 0 -- default mode, read and write
        # 1 -- read-only
        # 2 -- hidden
        selfobj.setEditorMode("Edge", 1)
        selfobj.setEditorMode("Point", 1)
        selfobj.Proxy = self