本文整理汇总了Python中UM.Mesh.MeshBuilder.MeshBuilder.addDonut方法的典型用法代码示例。如果您正苦于以下问题:Python MeshBuilder.addDonut方法的具体用法?Python MeshBuilder.addDonut怎么用?Python MeshBuilder.addDonut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UM.Mesh.MeshBuilder.MeshBuilder
的用法示例。
在下文中一共展示了MeshBuilder.addDonut方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from UM.Mesh.MeshBuilder import MeshBuilder [as 别名]
# 或者: from UM.Mesh.MeshBuilder.MeshBuilder import addDonut [as 别名]
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())
示例2: buildMesh
# 需要导入模块: from UM.Mesh.MeshBuilder import MeshBuilder [as 别名]
# 或者: from UM.Mesh.MeshBuilder.MeshBuilder import addDonut [as 别名]
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())
示例3: __init__
# 需要导入模块: from UM.Mesh.MeshBuilder import MeshBuilder [as 别名]
# 或者: from UM.Mesh.MeshBuilder.MeshBuilder import addDonut [as 别名]
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())