当前位置: 首页>>代码示例>>Python>>正文


Python xmldata.MeshReader类代码示例

本文整理汇总了Python中org.jcae.mesh.xmldata.MeshReader的典型用法代码示例。如果您正苦于以下问题:Python MeshReader类的具体用法?Python MeshReader怎么用?Python MeshReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MeshReader类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_mesh

def create_mesh(**kwargs):
    mtb = MeshTraitsBuilder.getDefault3D()
    if kwargs.get('recordFile'):
        mtb.addTraceRecord()
    mtb.addNodeSet()
    mesh = Mesh(mtb)
    if kwargs.get('recordFile'):
        mesh.getTrace().setDisabled(True)
    MeshReader.readObject3D(mesh, kwargs['in_dir'])
    return mesh
开发者ID:bgarrels,项目名称:jCAE,代码行数:10,代码来源:remesh.py

示例2: len

if len(args) != 2:
	parser.print_usage()
	sys.exit(1)

xmlDir = args[0]
outDir = args[1]

mtb = MeshTraitsBuilder.getDefault3D()
if options.recordFile:
	mtb.addTraceRecord()
mtb.addNodeSet()
mesh = Mesh(mtb)
if options.recordFile:
	mesh.getTrace().setDisabled(True)
MeshReader.readObject3D(mesh, xmlDir)

liaison = MeshLiaison.create(mesh, mtb)
if options.recordFile:
	liaison.getMesh().getTrace().setDisabled(False)
	liaison.getMesh().getTrace().setLogFile(options.recordFile)
	liaison.getMesh().getTrace().createMesh("mesh", liaison.getMesh())
if options.immutable_border:
	liaison.mesh.tagFreeEdges(AbstractHalfEdge.IMMUTABLE)
if options.coplanarity:
	liaison.getMesh().buildRidges(options.coplanarity)
if options.preserveGroups:
	liaison.getMesh().buildGroupBoundaries()

if options.recordFile:
	cmds = [ String("assert self.m.checkNoDegeneratedTriangles()"), String("assert self.m.checkNoInvertedTriangles()"), String("assert self.m.checkVertexLinks()"), String("assert self.m.isValid()") ]
开发者ID:alclp,项目名称:jCAE,代码行数:30,代码来源:refine.py

示例3: read_mesh

def read_mesh(path):
    mtb = MeshTraitsBuilder.getDefault3D()
    mtb.addNodeSet()
    mesh = Mesh(mtb)
    MeshReader.readObject3D(mesh, path)
    return mesh
开发者ID:bgarrels,项目名称:jCAE,代码行数:6,代码来源:remesh.py

示例4: len

                  help="dot product of face normals to detect feature edges")

(options, args) = parser.parse_args(args=sys.argv[1:])

if len(args) != 2:
	parser.print_usage()
	sys.exit(1)

xmlDir = args[0]
outDir = args[1]

# Original mesh will be treated as a background mesh
background_mtb = MeshTraitsBuilder.getDefault3D()
background_mtb.addNodeSet()
background_mesh = Mesh(background_mtb)
MeshReader.readObject3D(background_mesh, xmlDir)
if options.coplanarity:
	background_mesh.buildRidges(options.coplanarity)

# New mesh must not have connectivity
new_mtb = MeshTraitsBuilder()
new_mtb.addTriangleList()
new_mtb.addNodeList()
new_mesh = Mesh(new_mtb)

for point in background_mesh.getNodes():
	new_mesh.add(point)

# Split triangles into 4 new triangles
mapSeenTriangles = {}
for triangle in background_mesh.getTriangles():
开发者ID:alclp,项目名称:jCAE,代码行数:31,代码来源:uniformRefine.py

示例5: OptionParser

from java.lang import String

# Python
import sys, os
from optparse import OptionParser

"""
   Extract specified groups from a mesh
"""

cmd=("extract    ", "<inputDir> <outputDir> <groupName> [<groupName>...]", "Extract specified groups")
parser = OptionParser(usage="amibebatch %s [OPTIONS] %s\n\n%s" % cmd,
	prog="extract")

(options, args) = parser.parse_args(args=sys.argv[1:])

if len(args) < 3:
	parser.print_usage()
	sys.exit(1)

xmlDir = args[0]
outDir = args[1]

s = SubMeshWorker(xmlDir)
groups = args[2:]
extractedDir = s.extractGroups(groups)
m = Mesh()
MeshReader.readObject3D(m, extractedDir)
MeshWriter.writeObject3D(m, outDir, String())

开发者ID:GaneshPatil,项目名称:jCAE,代码行数:29,代码来源:extract.py


注:本文中的org.jcae.mesh.xmldata.MeshReader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。