Question

Extruding lines to faces, the points of each face point in a different order


Hi,

I use Extruder to extrude several lines to surface (Parameters: Direction: Vertical). But after extruding, the vertices of each surface point to different orders, some of which are clockwise (the bottom figure) and some of which are counterclockwise (the above figure). If I want to unify the directions of vertices as counterclockwise, how to set?Can anyone help me?


10 replies

Userlevel 4
Badge +26

Hi @thewindgone,

 

 

Check out the Orienter transformer. That has the ability to set Left or Right hand rule orientations. I think you miiight have to cooerce the surfaces into polygons first and then use a FaceReplacer to get them back to surfaces.

 

The other option would be to check the direction of the input lines to see if that is what is causing the difference in orientation here.

Orientation is annoying. I wish you luck!

Hi @thewindgone,

 

 

Check out the Orienter transformer. That has the ability to set Left or Right hand rule orientations. I think you miiight have to cooerce the surfaces into polygons first and then use a FaceReplacer to get them back to surfaces.

 

The other option would be to check the direction of the input lines to see if that is what is causing the difference in orientation here.

Orientation is annoying. I wish you luck!

Hi, thank you for your reply.

I check the directions of the input lines, and find that the directions are different, too. As a result, the direction of the corresponding face follows the direction of the line. Is there a way to reverse the direction of line? I look for a transformer for that, but I'm failed.

 

So, I try to unify the directions of all faces as Right hand rule using Orienter by coercing faces to polygons. But it doesn't work. The directions haven't change. I check the directions of these polygons in Data Inspector, and all of them are "Right hand rule", also the order of points in each polygon didn't change. Is it because these faces are vertical, not horizontal? I just want to unify the order of points in each face, how can I do that?

Userlevel 4
Badge +26

Hi, thank you for your reply.

I check the directions of the input lines, and find that the directions are different, too. As a result, the direction of the corresponding face follows the direction of the line. Is there a way to reverse the direction of line? I look for a transformer for that, but I'm failed.

 

So, I try to unify the directions of all faces as Right hand rule using Orienter by coercing faces to polygons. But it doesn't work. The directions haven't change. I check the directions of these polygons in Data Inspector, and all of them are "Right hand rule", also the order of points in each polygon didn't change. Is it because these faces are vertical, not horizontal? I just want to unify the order of points in each face, how can I do that?

Ahh too bad!

 

I'm sorry that didn't work for you. But at least now we know why they have different font/back sides. Is there anyway you can figure out which lines are oriented in the direction which you don't want? - then it would be pretty simple to just flip the appearances of the related faces. But if not then it might be a little tricky.

 

Face orientation is often quite a tricky issue. One thing is to make the surfaces double-sided. I'm not sure if that will work for your application, however.

 

Ahh too bad!

 

I'm sorry that didn't work for you. But at least now we know why they have different font/back sides. Is there anyway you can figure out which lines are oriented in the direction which you don't want? - then it would be pretty simple to just flip the appearances of the related faces. But if not then it might be a little tricky.

 

Face orientation is often quite a tricky issue. One thing is to make the surfaces double-sided. I'm not sure if that will work for your application, however.

 

Hi,

I look at the directions of faces in the Data Inspector before using Orientor transformer, and they all show "Right hand rule", even though the vertices of each face pointed differently. This is strange.

I also look at the directions in workbench Inspector using OrientationExtractor transformer, and all of them are "valid_surface_orientation". Maybe that's the reason why the directions can not be setted. But how to settle it?

Userlevel 4
Badge +26

Hi,

I look at the directions of faces in the Data Inspector before using Orientor transformer, and they all show "Right hand rule", even though the vertices of each face pointed differently. This is strange.

I also look at the directions in workbench Inspector using OrientationExtractor transformer, and all of them are "valid_surface_orientation". Maybe that's the reason why the directions can not be setted. But how to settle it?

Yes, that's the tricky problem. These faces are all valid, and they are all in the right hand rule. It's a fairly common problem when working in 3D unfortunately with no real easy way to solve it in FME (well not that I know of).

 

 

How many cases like this do you have? Can you edit the input line in QGIS or ArcGIS? You might have to manually fix them.

 

 

The other way is calculating the Normal for each surface and then seeing if that vector intersects with an even or odd number of surfaces. If it intersects an odd number then you can assume that it is facing inwards. If it intersects either 0 or an even number of surfaces then you can assume that it is facing outwards. But this might be more Effort to put together than simply fixing the input data.

 

 

It's a really annoying problem that I often run into. Most of the time it's easier for me just to make the surfaces double-sided but this often is not good enough.

 

 

Perhaps @daveatsafe has come across this problem and knows maybe a way to fix it. It would certainly make a really helpful custom transformer.

Yes, that's the tricky problem. These faces are all valid, and they are all in the right hand rule. It's a fairly common problem when working in 3D unfortunately with no real easy way to solve it in FME (well not that I know of).

 

 

How many cases like this do you have? Can you edit the input line in QGIS or ArcGIS? You might have to manually fix them.

 

 

The other way is calculating the Normal for each surface and then seeing if that vector intersects with an even or odd number of surfaces. If it intersects an odd number then you can assume that it is facing inwards. If it intersects either 0 or an even number of surfaces then you can assume that it is facing outwards. But this might be more Effort to put together than simply fixing the input data.

 

 

It's a really annoying problem that I often run into. Most of the time it's easier for me just to make the surfaces double-sided but this often is not good enough.

 

 

Perhaps @daveatsafe has come across this problem and knows maybe a way to fix it. It would certainly make a really helpful custom transformer.

There are about several hundreds of faces that have different orientor. Maybe it's also a hard work to edit them in QGIS or ArcGIS.

By the way, in the case of horizontal faces, Orientor transformer can coerce all of the directions of them as "Right hand rule". But it doesn't work for vertical faces.

Userlevel 4
Badge +26

There are about several hundreds of faces that have different orientor. Maybe it's also a hard work to edit them in QGIS or ArcGIS.

By the way, in the case of horizontal faces, Orientor transformer can coerce all of the directions of them as "Right hand rule". But it doesn't work for vertical faces.

Ja, with vertical faces you need a way to say what the UP direction for them is. There is just no easy way to saw how a vertical face should be pointing. A roof is easy, a terrain is easy. But a wall need to know inside/outside not up and down

Ja, with vertical faces you need a way to say what the UP direction for them is. There is just no easy way to saw how a vertical face should be pointing. A roof is easy, a terrain is easy. But a wall need to know inside/outside not up and down

yes, but it's difficult to set a wall inside or outside. And also the order of points in each wall cann't be changed.

Userlevel 4
Badge +26

yes, but it's difficult to set a wall inside or outside. And also the order of points in each wall cann't be changed.

When the polygon is a face you can use the 'Flip appearances' in the Orientier. This will flip it. But you need a method to figure out what is inside and outside. Not easy.

 

Perhaps one method might be to Aggregate all the lines together and then extrude the multi line feature to see it that helps.

 

 

The other thing could be to try extrude the footprint as a polygon into a solid, then cooerce the solid back to mutisurface. (Solid>GeometryCoeercer>CompositeSurface>Deaggregator(Split Composites)

 

 

That might give you a more consistent result?
When the polygon is a face you can use the 'Flip appearances' in the Orientier. This will flip it. But you need a method to figure out what is inside and outside. Not easy.

 

Perhaps one method might be to Aggregate all the lines together and then extrude the multi line feature to see it that helps.

 

 

The other thing could be to try extrude the footprint as a polygon into a solid, then cooerce the solid back to mutisurface. (Solid>GeometryCoeercer>CompositeSurface>Deaggregator(Split Composites)

 

 

That might give you a more consistent result?

yes, maybe it is a way to settle this issue. But I still hope someone could to change the direction of a vertical face.

Reply