def draw_ext_overshoot(self, vobj): from pivy import coin # set scale s = vobj.ExtOvershoot.Value * vobj.ScaleMultiplier self.transExtOvershoot1.scaleFactor.setValue((s, s, s)) self.transExtOvershoot2.scaleFactor.setValue((s, s, s)) # set new nodes self.marksExtOvershoot = coin.SoSeparator() if vobj.ExtOvershoot.Value: self.marksExtOvershoot.addChild(self.color) s1 = coin.SoSeparator() s1.addChild(self.transExtOvershoot1) s1.addChild(gui_utils.dimDash((0, 0, 0), (-1, 0, 0))) self.marksExtOvershoot.addChild(s1) s2 = coin.SoSeparator() s2.addChild(self.transExtOvershoot2) s2.addChild(gui_utils.dimDash((0, 0, 0), (-1, 0, 0))) self.marksExtOvershoot.addChild(s2) self.node.insertChild(self.marksExtOvershoot, 2) self.node3d.insertChild(self.marksExtOvershoot, 2)
def draw_dim_overshoot(self, vobj): """Draw dimension overshoot lines.""" # Set scale s = vobj.DimOvershoot.Value * vobj.ScaleMultiplier self.transDimOvershoot1.scaleFactor.setValue((s, s, s)) self.transDimOvershoot2.scaleFactor.setValue((s, s, s)) # Remove existing nodes, and set new nodes self.marksDimOvershoot = coin.SoSeparator() if vobj.DimOvershoot.Value: self.marksDimOvershoot.addChild(self.color) s1 = coin.SoSeparator() s1.addChild(self.transDimOvershoot1) s1.addChild(gui_utils.dimDash((-1, 0, 0), (0, 0, 0))) self.marksDimOvershoot.addChild(s1) s2 = coin.SoSeparator() s2.addChild(self.transDimOvershoot2) s2.addChild(gui_utils.dimDash((0, 0, 0), (1, 0, 0))) self.marksDimOvershoot.addChild(s2) self.node.insertChild(self.marksDimOvershoot, 2) self.node3d.insertChild(self.marksDimOvershoot, 2)