Skip to main content
Question

How to convert a surface into triangles without using SurfaceModeller transformer?


tono
Contributor
Forum|alt.badge.img+11
  • Contributor

I have a fme_surface and I need to clip it. As long as it is not possible to clip a fme_surface, I have tried to extract triangles from that feature and then clip them. Is it possible to extract triangles from a fme_surface without using the SurfaceModeller?

11 replies

fgiron
Supporter
Forum|alt.badge.img+20
  • Supporter
  • September 13, 2017

What do you have against the SurfaceModeller? The Triangulator should do the very same job, although I'm not sure if it's just basically a particular instance of the SurfaceModeller


owen
Forum|alt.badge.img+1
  • September 13, 2017

This should work - GeometryCoercer (>composite surface) then Deaggregator (split composites) and finally another GeometryCoercer to polygons, etc depending on what you want to do with the triangles


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 13, 2017

Hi @tono, what is the geometry class (IFME*) of the surface, which is shown in the Feature Information of FME Data Inspector like this?

 


tono
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • September 13, 2017
owen wrote:

This should work - GeometryCoercer (>composite surface) then Deaggregator (split composites) and finally another GeometryCoercer to polygons, etc depending on what you want to do with the triangles

I tried GeometryCoercer and then Deaggregator but it did not work

tono
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • September 13, 2017
fgiron wrote:

What do you have against the SurfaceModeller? The Triangulator should do the very same job, although I'm not sure if it's just basically a particular instance of the SurfaceModeller

If the original surface is made of triangles, triangulating it again will build a different surface, and also it means more processing time when i could extract the triangles without creating a new surface

 

 


fgiron
Supporter
Forum|alt.badge.img+20
  • Supporter
  • September 13, 2017
tono wrote:
If the original surface is made of triangles, triangulating it again will build a different surface, and also it means more processing time when i could extract the triangles without creating a new surface

 

 

Sorry, I hadn't understood the original surface was made of triangles. It completely makes sense now

 


tono
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • September 13, 2017
takashi wrote:

Hi @tono, what is the geometry class (IFME*) of the surface, which is shown in the Feature Information of FME Data Inspector like this?

 

1 Part, but in the inspector I can see it is made of several triangles

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 13, 2017
takashi wrote:

Hi @tono, what is the geometry class (IFME*) of the surface, which is shown in the Feature Information of FME Data Inspector like this?

 

OK. You can just use the GeometryPartExtractor with this Geometry XQuery setting.Part to TestLeft ValueOperatorRight ValueThis partGeometry Type=IFMEDonutIf you have other IFMECompositeSurface surfaces containing IFMPolygon internally, connect another GeometryPartExtractor to the Untouched port of this one to extract IFMEPolygon geometries (set IFMEPolygon to Right Value).

 

However, it's a bit strange. If the surface was made of triangles as you said, I don't think there should be IFMEDonut part internally.

geosander
Forum|alt.badge.img+7
  • September 13, 2017
tono wrote:

1 Part, but in the inspector I can see it is made of several triangles
Hi @tono,

 

Would you like to share (a part of) your surface data with us? Best thing would be to write an FFS file of the surface(s) you want to break apart into individual triangles.

 

Furthermore, like @takashi already pointed out, it's a bit odd that the FMEFace is a donut. Faces do not need to be triangular, but if you say that your surface consists of triangles only, I believe you should check that again. Your surface might be invalid in that case (tip: use a GeometryValidator to find out).

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 14, 2017
takashi wrote:

Hi @tono, what is the geometry class (IFME*) of the surface, which is shown in the Feature Information of FME Data Inspector like this?

 

If the surface could contain not only IFMEDonut parts but also IFMEPolygon parts, this Geometry XQuery would be better.

 

Part to TestLeft ValueOperatorRight ValueThe parent of this partGeometry Type=IFMEFaceNote: The GeometryPartExtractor with the query extracts every area geometry from the IFMECompositeSurface surface. However, they aren't always triangles since a surface can be constructed with any shaped areas, as @sander mentioned. If it's not guaranteed that the parts of the target surface are always triangles and also if you need to create triangles anyway, the triangulation process would be necessary.

 

 

In addition, just be aware that the View of FME Data Inspector always shows triangle edges within every face, even if the surface consists of non-triangle faces.

 

 


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 16, 2017

If your goal is to clip a surface by an area, I don't think it's required that all the parts of the surface are triangles. However, the parts don't always keep planarity after clipping even if they all were triangles, since some vertices from the clipper could be added to the clippees. I therefore think that you will have to triangulate clipped parts which didn't keep planarity.

This is a possible workflow. Assuming the source feature has IFMECompositeSurface geometry. The MeshBuilder is a custom transformer from FME Hub, which outputs a feature having IFMEMesh geometry, but you can transform it into IFMCompositeSurface with a GeometryCoercer if necessary.

Related Idea: Clipping Operation for Surface


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings