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.
1class 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 wrote:
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.
1class 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
v 11422 -0.000238869 -5464.68
v 11357.1 -0.000239796 -5485.89
v 11379.5 -0.000241047 -5514.52
v 11379.1 -0.000239044 -5468.68
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.
lemzip wrote:
@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
v 11422 -0.000238869 -5464.68
v 11357.1 -0.000239796 -5485.89
v 11379.5 -0.000241047 -5514.52
v 11379.1 -0.000239044 -5468.68
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.
I don't think the obj supports any spatial projection and that it is all relative location.
lemzip wrote:
@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
v 11422 -0.000238869 -5464.68
v 11357.1 -0.000239796 -5485.89
v 11379.5 -0.000241047 -5514.52
v 11379.1 -0.000239044 -5468.68
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.
Digging further into the
documentation revels the possibility to move the data into world coordinate systems when reading, but it requires the 'companion' dataset files (??)