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