예제 #1
0
    def Activated(self):
        """
        Command activation method
        """

        #generate a spiral with two radii given the arcs on either side
        #and render it
        Modifier.Activated(self, 'SpiralTest')

        arc1 = {
            'BearingIn': math.pi / 2.0,
            'Radius': 2600.0,
            'Delta': math.radians(44.821592613698),
            'Start': App.Vector(),
            'Direction': -1
        }

        arc1 = arc.get_parameters(arc1)

        arc2 = {
            'BearingIn': 0.0,
            'Radius': 1750.0,
            'Delta': math.radians(16.074936823812),
            'Start': App.Vector(),
            'Direction': -1
        }

        arc2 = arc.get_parameters(arc2)
예제 #2
0
    def Activated(self):
        """
        Command activation method
        """

        cz._zoom_camera(cz.Camera())

        Modifier.Activated(self, 'TestZoom')
예제 #3
0
    def Activated(self):
        """
        Command activation method
        """
        #create alignment editing task
        self.task = PivyTrackerTask()

        Modifier.Activated(self, 'PivyTrackerCommand')
예제 #4
0
    def Activated(self):
        """
        Command activation method
        """
        #create alignment editing task
        self.task = SelectDragTask()

        Modifier.Activated(self, 'SelectDragCommand')
예제 #5
0
    def Activated(self):
        """
        Command activation method
        """

        Modifier.Activated(self, 'Command')

        self.tracker = editTracker(App.Vector(), 'test', 0)
    def Activated(self):
        """
        Command activation method
        """

        panel = Panel()
        Gui.Control.showDialog(panel)

        Modifier.Activated(self, 'TrailsGuide')
예제 #7
0
 def Activated(self):
     self.name = translate("draft","Scale", utf8_decode=True)
     Modifier.Activated(self,self.name)
     self.ghost = None
     if self.ui:
         if not FreeCADGui.Selection.getSelection():
             self.ui.selectUi()
             msg(translate("draft", "Select an object to scale")+"\n")
             self.call = self.view.addEventCallback("SoEvent",selectObject)
         else:
             self.proceed()
예제 #8
0
 def Activated(self):
     self.name = translate("draft", "BaseTransform", utf8_decode=True)
     Modifier.Activated(self, self.name)
     if self.ui:
         if not FreeCADGui.Selection.getSelection():
             self.ui.selectUi()
             msg(translate("draft", "Select an object to edit") + "\n")
             self.call_sel = \
                     self.view.addEventCallback("SoEvent", selectObject)
             ## TODO it should allow multiple selections
             ## TODO Ui should be more explanatory
         else:
             self.proceed()
    def Activated(self):
        """
        Command activation method
        """

        self.doc = App.ActiveDocument

        ViewState().view = Gui.ActiveDocument.ActiveView

        #create alignment editing task
        self.task = SpriteSplitterTask(self.doc)

        Gui.Control.showDialog(self.task)
        self.task.setup()

        Modifier.Activated(self, 'SpriteSplitter')
예제 #10
0
    def Activated(self):
        """
        Command activation method
        """

        self.doc = App.ActiveDocument

        #create working, non-visual copy of horizontal alignment
        obj = Gui.Selection.getSelection()[0]
        data = obj.Proxy.get_data_copy()

        self.doc = App.ActiveDocument
        ViewState().view = Gui.ActiveDocument.ActiveView

        #create alignment editing task
        self.task = \
            base_tracker_test_task.create(self.doc, data, obj, self.is_linked)

        Gui.Control.showDialog(self.task)
        self.task.setup()

        Modifier.Activated(self, 'BaseTrackerTest')
    def Activated(self):
        """
        Command activation method
        """

        self.doc = App.ActiveDocument

        #create working, non-visual copy of horizontal alignment
        obj = Gui.Selection.getSelection()[0]
        data = obj.Proxy.get_data_copy()

        self.doc = App.ActiveDocument
        ViewState().view = Gui.ActiveDocument.ActiveView

        #create alignment editing task
        self.task = edit_alignment_task.create(self.doc, data, obj)

        #cz._zoom_camera(cz.Camera())

        Gui.Control.showDialog(self.task)
        self.task.setup()

        Modifier.Activated(self, 'EditAlignmentCommand')
예제 #12
0
    def Activated(self):
        from bimEdit import hideAttribute
        self.name = translate("draft","bimMove", utf8_decode=True)
        Modifier.Activated(self,self.name)
        self.ghost = {}
        for typ in self.sel_dict:
            if typ not in self.ghost:
                self.ghost.update({typ:[]})
            for o in self.sel_dict[typ]:
                self.ghost[typ].append(o.ghost[typ])

        ## Proceeding
        if self.call:
            self.view.removeEventCallback("SoEvent",self.call)
        self.ui.pointUi(self.name)
        self.ui.modUi()
        if self.copymode:
            self.ui.isCopy.setChecked(True)
        self.ui.xValue.setFocus()
        self.ui.xValue.selectAll()

        self.call = self.view.addEventCallback("SoEvent",self.action)
        msg(translate("draft", "Pick start point:")+"\n")
예제 #13
0
    def Activated(self):
        from bimEdit import hideAttribute
        self.name = translate("draft","bimRotate", utf8_decode=True)
        Modifier.Activated(self,self.name)
        self.ghost = {}
        for typ in self.sel_dict:
            if typ not in self.ghost:
                self.ghost.update({typ:[]})
            for o in self.sel_dict[typ]:
                self.ghost[typ].append(o.ghost[typ])
        self.arctrack = None

        ## Proceeding
        if self.call:
            self.view.removeEventCallback("SoEvent",self.call)
        self.step = 0
        self.center = None
        self.ui.arcUi()
        self.ui.modUi()
        self.ui.setTitle("Rotate")
        self.arctrack = arcTracker()
        self.call = self.view.addEventCallback("SoEvent",self.action)

        msg(translate("draft", "Pick rotation center:")+"\n")
예제 #14
0
    def Activated(self):
        """
        Command activation method
        """

        Modifier.Activated(self, 'Command')