本文整理汇总了Python中testing.setup_mesh_modifier_test函数的典型用法代码示例。如果您正苦于以下问题:Python setup_mesh_modifier_test函数的具体用法?Python setup_mesh_modifier_test怎么用?Python setup_mesh_modifier_test使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setup_mesh_modifier_test函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyGrid", "DissolveFaces")
selection = k3d.selection.set()
primitive_selection = k3d.geometry.primitive_selection.create(selection, k3d.selection.type.FACE)
k3d.geometry.primitive_selection.append(primitive_selection, 0, 2, 1)
k3d.geometry.primitive_selection.append(primitive_selection, 11, 15, 1)
setup.modifier.mesh_selection = selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "modifier.DissolveFaces", 2)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:16,代码来源:modifier.DissolveFaces.py
示例2:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCube", "GTSMeshVolume")
setup.source.width = 2
setup.source.height = 3
setup.source.depth = 4
testing.require_mesh_volume(setup.modifier.volume, 24.0)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:11,代码来源:mesh.metrics.GTSMeshVolume.PolyCube.py
示例3:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyGrid", "GrowSelection")
selection = k3d.geometry.selection.create(0)
point_selection = k3d.geometry.point_selection.create(selection)
k3d.geometry.point_selection.append(point_selection, 15, 16, 1)
k3d.geometry.point_selection.append(point_selection, 18, 19, 1)
edge_selection = k3d.geometry.primitive_selection.create(selection, k3d.selection.type.EDGE)
k3d.geometry.primitive_selection.append(edge_selection, 17, 18, 1)
k3d.geometry.primitive_selection.append(edge_selection, 55, 56, 1)
face_selection = k3d.geometry.primitive_selection.create(selection, k3d.selection.type.FACE)
k3d.geometry.primitive_selection.append(face_selection, 12, 13, 1)
setup.modifier.mesh_selection = selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.selection.GrowSelection", 2)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:24,代码来源:mesh.selection.GrowSelection.py
示例4:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCube", "TriangulateFaces")
mesh_selection = k3d.geometry.selection.create(1)
setup.modifier.mesh_selection = mesh_selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.TriangulateFaces.PolyCube", 0)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:13,代码来源:mesh.modifier.TriangulateFaces.PolyCube.py
示例5:
# python
import testing
import k3d
setup = testing.setup_mesh_modifier_test("NurbsDisk", "NurbsExtrudePatch")
setup.modifier.mesh_selection = k3d.geometry.selection.create(1)
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(
setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.NurbsExtrudePatch", 2, ["Darwin-i386"]
)
开发者ID:GarysRefererence2014,项目名称:k3d,代码行数:12,代码来源:mesh.modifier.NurbsExtrudePatch.py
示例6:
# python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCylinder", "LinearWavePoints")
selection = k3d.geometry.selection.create(0)
selection.points = k3d.geometry.point_selection.create(selection, 1)
setup.source.u_segments = 4
setup.source.v_segments = 16
setup.modifier.mesh_selection = selection
setup.modifier.axis = "x"
setup.modifier.along = "z"
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(
setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.LinearWavePoints", 1, ["Darwin-i386"]
)
开发者ID:GarysRefererence2014,项目名称:k3d,代码行数:21,代码来源:mesh.modifier.LinearWavePoints.py
示例7:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCylinder", "TaperPoints")
selection = k3d.geometry.selection.create(0)
selection.points = k3d.geometry.point_selection.create(selection, 1)
setup.modifier.mesh_selection = selection
setup.modifier.taper_factor = 1
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.TaperPoints", 4, ["Darwin-i386"])
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:15,代码来源:mesh.modifier.TaperPoints.py
示例8:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("NurbsCircle","NurbsPolygonizeCurve")
setup.modifier.mesh_selection = k3d.geometry.selection.create(1)
setup.modifier.segments = 10
setup.modifier.delete_original = True
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.NurbsPolygonizeCurve", 3, ["Darwin-i386"])
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:14,代码来源:mesh.modifier.NurbsPolygonizeCurve.py
示例9:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("FrozenMesh", "TriangulateFaces")
mesh = setup.source.create_mesh()
points = mesh.create_points()
point_selection = mesh.create_point_selection()
polyhedron = k3d.polyhedron.create(mesh)
Cs = polyhedron.vertex_attributes().create("Cs", "k3d::color")
positions = [(0, 0, 1), (1, 0, 1), (2, 0, 0), (2, 0, 1), (1, 0, 0), (0, 0, 0)]
for position in positions:
points.append(k3d.point3(position[0], position[1], position[2]))
point_selection.append(0)
polyhedron.shell_types().append(k3d.polyhedron.shell_type.POLYGONS)
polyhedron.face_shells().append(0)
polyhedron.face_first_loops().append(len(polyhedron.loop_first_edges()))
polyhedron.face_loop_counts().append(1)
polyhedron.face_materials().append(None)
polyhedron.face_selections().append(0)
polyhedron.loop_first_edges().append(len(polyhedron.clockwise_edges()))
polyhedron.clockwise_edges().append(1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:31,代码来源:mesh.modifier.TriangulateFaces.vertex.py
示例10:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCube", "CUDATransformPoints")
selection = k3d.geometry.selection.create(0)
selection.points = k3d.geometry.point_selection.uniform(selection, 1)
setup.modifier.mesh_selection = selection
setup.modifier.input_matrix = k3d.translate3(k3d.vector3(0, 0, 1))
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.TransformPoints", 1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:16,代码来源:mesh.modifier.CUDATransformPoints.py
示例11:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyGrid", "ScalePoints")
setup.source.rows = 1
setup.source.columns = 1
mesh_selection = k3d.geometry.selection.create(1.0)
setup.modifier.mesh_selection = mesh_selection
setup.modifier.x = 2
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.selection.all", 1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:16,代码来源:mesh.selection.all.py
示例12:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyText", "CapHoles")
selection = k3d.geometry.selection.create(0)
edge_selection = k3d.geometry.primitive_selection.create(selection, k3d.selection.type.EDGE)
k3d.geometry.primitive_selection.append(edge_selection, 48, 49, 1)
setup.source.text = "8"
setup.modifier.mesh_selection = selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.CapHoles", 2, ["Darwin-i386"])
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:16,代码来源:mesh.modifier.CapHoles.py
示例13:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCube", "PointsToParticles")
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.PointsToParticles", 1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:10,代码来源:modifier.PointsToParticles.py
示例14:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyGrid", "SelectBoundaryEdges")
setup.modifier.mesh_selection = k3d.geometry.selection.create(0)
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.selection.SelectBoundaryEdges", 1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:11,代码来源:mesh.selection.SelectBoundaryEdges.py
示例15:
# python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCube", "SphereizePoints")
setup.source.rows = 2
setup.source.columns = 2
setup.source.slices = 2
selection = k3d.geometry.selection.create(0)
selection.points = k3d.geometry.point_selection.create(selection, 1)
setup.modifier.mesh_selection = selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(
setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.SphereizePoints", 1
)
开发者ID:GarysRefererence2014,项目名称:k3d,代码行数:21,代码来源:mesh.modifier.SphereizePoints.py
示例16: str
# python
import k3d
import testing
import benchmarking
setup = testing.setup_mesh_modifier_test("PolySphere", "CatmullClark")
setup.modifier.level = 5
setup.modifier.mesh_selection = k3d.geometry.selection.create(1)
profiler = k3d.plugin.create("PipelineProfiler", setup.document)
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
# note: no comparison to reference, as the file is 97 MB!
benchmarking.print_profiler_records(profiler.records)
print """<DartMeasurement name="Total Time" type="numeric/float">""" + str(
benchmarking.total_profiler_time(profiler.records)
) + """</DartMeasurement>"""
开发者ID:GarysRefererence2014,项目名称:k3d,代码行数:20,代码来源:mesh.modifier.CatmullClark.benchmark.py
示例17:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("PolyCube", "ConnectVertices")
selection = k3d.selection.set()
point_selection = k3d.geometry.point_selection.create(selection)
k3d.geometry.point_selection.append(point_selection, 0, 1, 1)
k3d.geometry.point_selection.append(point_selection, 2, 3, 1)
setup.modifier.mesh_selection = selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.ConnectVertices", 1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:17,代码来源:mesh.modifier.ConnectVertices.py
示例18:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("K3DMeshReader", "BridgeEdges")
setup.source.file = k3d.filesystem.generic_path(testing.source_path() + "/meshes/mesh.modifier.BridgeEdges.source.k3d")
selection = k3d.geometry.selection.create(0)
edge_selection = k3d.geometry.primitive_selection.create(selection, k3d.selection.type.EDGE)
k3d.geometry.primitive_selection.append(edge_selection, 1, 2, 1)
k3d.geometry.primitive_selection.append(edge_selection, 7, 8, 1)
setup.modifier.mesh_selection = selection
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.BridgeEdges", 1)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:18,代码来源:mesh.modifier.BridgeEdges.py
示例19:
#python
import testing
import k3d
setup = testing.setup_mesh_modifier_test("NurbsCircle","NurbsExtrudeCurve")
setup.modifier.mesh_selection = k3d.geometry.selection.create(1)
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.NurbsExtrudeCurve", 1, ["Darwin-i386"])
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:10,代码来源:mesh.modifier.NurbsExtrudeCurve.py
示例20:
#python
import k3d
import testing
setup = testing.setup_mesh_modifier_test("K3DMeshReader", "SubdivideEdges")
setup.source.file = k3d.filesystem.generic_path(testing.source_path() + "/meshes/polyhedron.hole.k3d")
setup.source.center = False
setup.source.scale_to_size = False
selection = k3d.geometry.selection.create(0)
edge_selection = k3d.geometry.primitive_selection.create(selection, k3d.selection.type.EDGE)
k3d.geometry.primitive_selection.append(edge_selection, 0, 4294967295, 0)
k3d.geometry.primitive_selection.append(edge_selection, 0, 4, 1)
k3d.geometry.primitive_selection.append(edge_selection, 27, 28, 1)
k3d.geometry.primitive_selection.append(edge_selection, 52, 65, 1)
k3d.geometry.primitive_selection.append(edge_selection, 74, 82, 1)
setup.modifier.mesh_selection = selection
setup.modifier.vertices = 2
testing.require_valid_mesh(setup.document, setup.modifier.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.modifier.get_property("output_mesh"), "mesh.modifier.SubdivideEdges", 8)
开发者ID:AwesomeDoesIt,项目名称:k3d,代码行数:22,代码来源:mesh.modifier.SubdivideEdges.py
注:本文中的testing.setup_mesh_modifier_test函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论