Creating Curved Facets - Unexpected Normal Vector Behavior

Dear Marton,

I have encountered a rather strange behavior when creating a new facet. I would expect that facets should only be able to exist in two cases: 

  1. When three vertices are selected
  2. When more than three vertices are selected and they are all coplanar.

Case 1 is simple enough, and always works as expected. Case 2 works as expected in most scenatios, for example when Collapse creates planar quadrilateral facets from two coplanar triangular facets. 

However, I noticed that it is possible to run Vertex > Create Facet from Selected > Keep selection order on a set of four or more non-coplanar vertices - and a facet is created! Here are images of such a facet from two points of view:

You can see that many of the points are not coplanar, and yet a facet object has been created. One curiosity of this facet is that I can change the normal vector, but both orientations point in more or less the same direction. Here is the same facet after inverting the normal vector with ctrl-n:

Some insight is shed on what's happening if we turn on Volume in the 3D Viewer settings. In the next image, I have turned off Draw Volume for the cylindrical port on the side of the central sphere and selected the facet shown above as well as a similar facet nearby, which I also made with many non-coplanar points. A number of these facets are visible around where the cyclinder meets the sphere.

Evidently, the algorithm has made planar facets that attempt to agree with the selected points.

To explore this further, I made a simple test geometry. It is a box with three normal, planar rectangular facets and one facet made from non-coplanar vertices. This latter facet should enclose the remaining three sides of the box.

When I create the new facet from the highlighed vertices, the following appears:

Clearly it has the same issues and the more complex case discussed above. If I desorb particles from the square face on the left, the following pressure distribution appears:

Clearly there is a leak where the Volume surfaces are not drawn. Enabling Leaks confirms this:

I understand that creating a planar facet from non-coplanar vertices is not geometrically possible. However, I would suggest two changes to MolFlow related to this issue.

  1. Raise a warning when attempting to generate a facet from non-coplanar vertices. If the vertices in question are only slightly out of plane, creating a facet without a warrning could lead to mysterious and frustrating leaks.
  2. A more helpful response to this issue would be for MolFlow to generate a triangulated surface that shares a perimeter with the intended facet. One simple algorithm that come to mind is forming triangles from sets of three consecutive vertices along the perimeter, then repeating that process with the new, smaller perimeter until the resulting perimeter has three points, which define the last triange to be created.

The use case for such a tool is illustrated by my original example above. Somewhere in the process of collapsing facets to simplify the model, the cylindrical ports attached to the spherical body of the chamber ended up with facets that ought to share edges with one another, but don't.

The ideal way to fix this is to delete the first row of triangular facets on the sphere and "stitch" the two objects back together. However, this is time-consuming to do by hand.

Best,

Alec