Hi
First time using .obj files and i can build the mesh as a single item. How would i go about access each individual point geometry? I have tried a few things i could think of but nothing worked.
Anyone know much about obj files?
thanks
Hi
First time using .obj files and i can build the mesh as a single item. How would i go about access each individual point geometry? I have tried a few things i could think of but nothing worked.
Anyone know much about obj files?
thanks
Hi @lemzip, I can provide two ways to extract every vertex point from a Mesh geometry.
TINGenerator: Send the Mesh feature to the Points/Lines port of a TINGenerator, set 0 to the "Surface Tolerance" parameter, and then pick the Point features output from the VertexPoints port.
Or,
PythonCaller with this script.
class FeatureProcessor(object):
def input(self, feature):
mesh = feature.getGeometry()
for i, xyz in enumerate(mesh.getVertices()):
feature.setGeometry(fmeobjects.FMEPoint(*xyz))
feature.setAttribute('_vertex_id', i)
self.pyoutput(feature)
Hi @lemzip, I can provide two ways to extract every vertex point from a Mesh geometry.
TINGenerator: Send the Mesh feature to the Points/Lines port of a TINGenerator, set 0 to the "Surface Tolerance" parameter, and then pick the Point features output from the VertexPoints port.
Or,
PythonCaller with this script.
class FeatureProcessor(object):
def input(self, feature):
mesh = feature.getGeometry()
for i, xyz in enumerate(mesh.getVertices()):
feature.setGeometry(fmeobjects.FMEPoint(*xyz))
feature.setAttribute('_vertex_id', i)
self.pyoutput(feature)
@takashi, Thanks i can now pull out the vertex.
Another question, the vertex x,y, and z in the file in plain text is like this:
v 11416.5 -0.00023741 -5431.3
Is that in any relation to a spatial projection etc or is it just the location in the file?
I cannot find anywhere in the file that gives me any indication on spatial reference used.
@takashi, Thanks i can now pull out the vertex.
Another question, the vertex x,y, and z in the file in plain text is like this:
v 11416.5 -0.00023741 -5431.3
Is that in any relation to a spatial projection etc or is it just the location in the file?
I cannot find anywhere in the file that gives me any indication on spatial reference used.
@takashi, Thanks i can now pull out the vertex.
Another question, the vertex x,y, and z in the file in plain text is like this:
v 11416.5 -0.00023741 -5431.3
Is that in any relation to a spatial projection etc or is it just the location in the file?
I cannot find anywhere in the file that gives me any indication on spatial reference used.