當前位置: 首頁>>代碼示例>>Python>>正文


Python MeshReader.readObject3D方法代碼示例

本文整理匯總了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
開發者ID:bgarrels,項目名稱:jCAE,代碼行數:12,代碼來源:remesh.py

示例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()") ]
開發者ID:alclp,項目名稱:jCAE,代碼行數:32,代碼來源:refine.py

示例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
開發者ID:bgarrels,項目名稱:jCAE,代碼行數:8,代碼來源:remesh.py

示例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():
開發者ID:alclp,項目名稱:jCAE,代碼行數:33,代碼來源:uniformRefine.py

示例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())

開發者ID:GaneshPatil,項目名稱:jCAE,代碼行數:31,代碼來源:extract.py


注:本文中的org.jcae.mesh.xmldata.MeshReader.readObject3D方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。