예제 #1
0
 def SplitSketch(self, object):
     sketch = object
     sketch.__class__ = cad.Sketch
     new_sketches = sketch.Split()
     cad.StartHistory()
     cad.DeleteUndoably(object)
     for sketch in new_sketches:
         cad.AddUndoably(sketch, object.GetOwner(), None)
     cad.EndHistory()
예제 #2
0
 def FitArcs(self, object):
     value = self.InputLength('Set tolerance for Fit Arcs', 'tolerance', geom.get_accuracy())
     if value != None:
         geom.set_accuracy(value)
         sketch = object
         sketch.__class__ = cad.Sketch
         curve = sketch.GetCurve()
         curve.FitArcs()
         cad.StartHistory()
         cad.DeleteUndoably(object)
         cad.AddUndoably(cad.NewSketchFromCurve(curve))
         cad.EndHistory()        
예제 #3
0
 def Run(self, event):
     cad.DeleteUndoably(self.object)
예제 #4
0
 def OnCut(self, e):
     self.CopySelectedItems()
     cad.StartHistory()
     for object in cad.GetSelectedObjects():
         cad.DeleteUndoably(object)
     cad.EndHistory()
예제 #5
0
 def OnDelete(self, e):
     cad.StartHistory()
     for object in cad.GetSelectedObjects():
         cad.DeleteUndoably(object)
     cad.EndHistory()