def buildMesh(self): super().buildMesh() mb = MeshBuilder() #SOLIDMESH mb.addDonut( inner_radius = LoadToolHandle.INNER_RADIUS, outer_radius = LoadToolHandle.OUTER_RADIUS, width = LoadToolHandle.LINE_WIDTH, axis = self.rotation_axis, color = self._y_axis_color ) self.setSolidMesh(mb.build()) mb = MeshBuilder() #SELECTIONMESH mb.addDonut( inner_radius = LoadToolHandle.ACTIVE_INNER_RADIUS, outer_radius = LoadToolHandle.ACTIVE_OUTER_RADIUS, width = LoadToolHandle.ACTIVE_LINE_WIDTH, axis = self.rotation_axis, color = ToolHandle.YAxisSelectionColor ) self.setSelectionMesh(mb.build())
def __init__(self, parent = None): super().__init__(parent) mb = MeshBuilder() mb.addArc( radius = 20, axis = Vector.Unit_X, color = ToolHandle.XAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Y, color = ToolHandle.YAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Z, color = ToolHandle.ZAxisColor ) self.setLineMesh(mb.getData()) mb = MeshBuilder() mb.addDonut( inner_radius = 18, outer_radius = 21, width = 1, color = ToolHandle.ZAxisColor ) mb.addDonut( inner_radius = 18, outer_radius = 21, width = 1, axis = Vector.Unit_X, angle = math.pi / 2, color = ToolHandle.YAxisColor ) mb.addDonut( inner_radius = 18, outer_radius = 21, width = 1, axis = Vector.Unit_Y, angle = math.pi / 2, color = ToolHandle.XAxisColor ) self.setSelectionMesh(mb.getData())
def buildMesh(self): #SOLIDMESH mb = MeshBuilder() mb.addDonut(inner_radius=self._inner_radius, outer_radius=self._outer_radius, width=self._line_width, color=self._z_axis_color) mb.addDonut(inner_radius=self._inner_radius, outer_radius=self._outer_radius, width=self._line_width, axis=Vector.Unit_X, angle=math.pi / 2, color=self._y_axis_color) mb.addDonut(inner_radius=self._inner_radius, outer_radius=self._outer_radius, width=self._line_width, axis=Vector.Unit_Y, angle=math.pi / 2, color=self._x_axis_color) mb.addPyramid(width=self._handle_width, height=self._handle_height, depth=self._handle_width, center=Vector(0, self._handle_offset_a, -self._handle_offset_b), color=self._x_axis_color, axis=Vector.Unit_X, angle=90 + self._angle_offset) mb.addPyramid(width=self._handle_width, height=self._handle_height, depth=self._handle_width, center=Vector(0, self._handle_offset_a, self._handle_offset_b), color=self._x_axis_color, axis=Vector.Unit_X, angle=-90 - self._angle_offset) mb.addPyramid(width=self._handle_width, height=self._handle_height, depth=self._handle_width, center=Vector(self._handle_offset_b, 0, self._handle_offset_a), color=self._y_axis_color, axis=Vector.Unit_Z, angle=90 - self._angle_offset) mb.addPyramid(width=self._handle_width, height=self._handle_height, depth=self._handle_width, center=Vector(-self._handle_offset_b, 0, self._handle_offset_a), color=self._y_axis_color, axis=Vector.Unit_Z, angle=-90 + self._angle_offset) mb.addPyramid(width=self._handle_width, height=self._handle_height, depth=self._handle_width, center=Vector(self._handle_offset_a, self._handle_offset_b, 0), color=self._z_axis_color, axis=Vector.Unit_Z, angle=-self._angle_offset) mb.addPyramid(width=self._handle_width, height=self._handle_height, depth=self._handle_width, center=Vector(self._handle_offset_a, -self._handle_offset_b, 0), color=self._z_axis_color, axis=Vector.Unit_Z, angle=180 + self._angle_offset) self.setSolidMesh(mb.build()) #SELECTIONMESH mb = MeshBuilder() mb.addDonut(inner_radius=self._active_inner_radius, outer_radius=self._active_outer_radius, width=self._active_line_width, color=ToolHandle.ZAxisSelectionColor) mb.addDonut(inner_radius=self._active_inner_radius, outer_radius=self._active_outer_radius, width=self._active_line_width, axis=Vector.Unit_X, angle=math.pi / 2, color=ToolHandle.YAxisSelectionColor) mb.addDonut(inner_radius=self._active_inner_radius, outer_radius=self._active_outer_radius, width=self._active_line_width, axis=Vector.Unit_Y, angle=math.pi / 2, color=ToolHandle.XAxisSelectionColor) mb.addPyramid(width=self._active_handle_width, height=self._active_handle_height, depth=self._active_handle_width, center=Vector(0, self._handle_offset_a, self._handle_offset_b), color=self._extra_widgets_color_map[ self.ExtraWidgets.XPositive90.value], axis=Vector.Unit_X, angle=-90 - self._angle_offset) mb.addPyramid(width=self._active_handle_width, height=self._active_handle_height, depth=self._active_handle_width, center=Vector(0, self._handle_offset_a, -self._handle_offset_b), color=self._extra_widgets_color_map[ self.ExtraWidgets.XNegative90.value], axis=Vector.Unit_X, angle=90 + self._angle_offset) mb.addPyramid(width=self._active_handle_width, height=self._active_handle_height, depth=self._active_handle_width, center=Vector(self._handle_offset_b, 0, self._handle_offset_a), color=self._extra_widgets_color_map[ self.ExtraWidgets.YPositive90.value], axis=Vector.Unit_Z, angle=90 - self._angle_offset) mb.addPyramid(width=self._active_handle_width, height=self._active_handle_height, depth=self._active_handle_width, center=Vector(-self._handle_offset_b, 0, self._handle_offset_a), color=self._extra_widgets_color_map[ self.ExtraWidgets.YNegative90.value], axis=Vector.Unit_Z, angle=-90 + self._angle_offset) mb.addPyramid(width=self._active_handle_width, height=self._active_handle_height, depth=self._active_handle_width, center=Vector(self._handle_offset_a, self._handle_offset_b, 0), color=self._extra_widgets_color_map[ self.ExtraWidgets.ZPositive90.value], axis=Vector.Unit_Z, angle=-self._angle_offset) mb.addPyramid(width=self._active_handle_width, height=self._active_handle_height, depth=self._active_handle_width, center=Vector(self._handle_offset_a, -self._handle_offset_b, 0), color=self._extra_widgets_color_map[ self.ExtraWidgets.ZNegative90.value], axis=Vector.Unit_Z, angle=180 + self._angle_offset) self.setSelectionMesh(mb.build())
def buildMesh(self): #SOLIDMESH mb = MeshBuilder() mb.addDonut(inner_radius=self._inner_radius, outer_radius=self._outer_radius, width=self._line_width, color=self._z_axis_color) mb.addDonut(inner_radius=self._inner_radius, outer_radius=self._outer_radius, width=self._line_width, axis=Vector.Unit_X, angle=math.pi / 2, color=self._y_axis_color) mb.addDonut(inner_radius=self._inner_radius, outer_radius=self._outer_radius, width=self._line_width, axis=Vector.Unit_Y, angle=math.pi / 2, color=self._x_axis_color) self.setSolidMesh(mb.build()) #SELECTIONMESH mb = MeshBuilder() mb.addDonut(inner_radius=self._active_inner_radius, outer_radius=self._active_outer_radius, width=self._active_line_width, color=ToolHandle.ZAxisSelectionColor) mb.addDonut(inner_radius=self._active_inner_radius, outer_radius=self._active_outer_radius, width=self._active_line_width, axis=Vector.Unit_X, angle=math.pi / 2, color=ToolHandle.YAxisSelectionColor) mb.addDonut(inner_radius=self._active_inner_radius, outer_radius=self._active_outer_radius, width=self._active_line_width, axis=Vector.Unit_Y, angle=math.pi / 2, color=ToolHandle.XAxisSelectionColor) self.setSelectionMesh(mb.build())
def buildMesh(self): #SOLIDMESH mb = MeshBuilder() mb.addDonut( inner_radius = self._inner_radius, outer_radius = self._outer_radius, width = self._line_width, color = self._z_axis_color ) mb.addDonut( inner_radius = self._inner_radius, outer_radius = self._outer_radius, width = self._line_width, axis = Vector.Unit_X, angle = math.pi / 2, color = self._y_axis_color ) mb.addDonut( inner_radius = self._inner_radius, outer_radius = self._outer_radius, width = self._line_width, axis = Vector.Unit_Y, angle = math.pi / 2, color = self._x_axis_color ) self.setSolidMesh(mb.build()) #SELECTIONMESH mb = MeshBuilder() mb.addDonut( inner_radius = self._active_inner_radius, outer_radius = self._active_outer_radius, width = self._active_line_width, color = ToolHandle.ZAxisSelectionColor ) mb.addDonut( inner_radius = self._active_inner_radius, outer_radius = self._active_outer_radius, width = self._active_line_width, axis = Vector.Unit_X, angle = math.pi / 2, color = ToolHandle.YAxisSelectionColor ) mb.addDonut( inner_radius = self._active_inner_radius, outer_radius = self._active_outer_radius, width = self._active_line_width, axis = Vector.Unit_Y, angle = math.pi / 2, color = ToolHandle.XAxisSelectionColor ) self.setSelectionMesh(mb.build())
def __init__(self, parent = None): super().__init__(parent) self._innerRadius = 40 self._outerRadius = 40.5 self._lineWidth = 0.5 self._activeInnerRadius = 37 self._activeOuterRadius = 44 self._activeLineWidth = 3 #SOLIDMESH mb = MeshBuilder() mb.addDonut( inner_radius = self._innerRadius, outer_radius = self._outerRadius, width = self._lineWidth, color = ToolHandle.ZAxisColor ) mb.addDonut( inner_radius = self._innerRadius, outer_radius = self._outerRadius, width = self._lineWidth, axis = Vector.Unit_X, angle = math.pi / 2, color = ToolHandle.YAxisColor ) mb.addDonut( inner_radius = self._innerRadius, outer_radius = self._outerRadius, width = self._lineWidth, axis = Vector.Unit_Y, angle = math.pi / 2, color = ToolHandle.XAxisColor ) self.setSolidMesh(mb.getData()) #SELECTIONMESH mb = MeshBuilder() mb.addDonut( inner_radius = self._activeInnerRadius, outer_radius = self._activeOuterRadius, width = self._activeLineWidth, color = ToolHandle.ZAxisColor ) mb.addDonut( inner_radius = self._activeInnerRadius, outer_radius = self._activeOuterRadius, width = self._activeLineWidth, axis = Vector.Unit_X, angle = math.pi / 2, color = ToolHandle.YAxisColor ) mb.addDonut( inner_radius = self._activeInnerRadius, outer_radius = self._activeOuterRadius, width = self._activeLineWidth, axis = Vector.Unit_Y, angle = math.pi / 2, color = ToolHandle.XAxisColor ) self.setSelectionMesh(mb.getData())