Dynamic Modeler just patching at cuts

I was cutting models using Dynamic Modeler to prepare for 3D printing and noticed that the cut surfaces are filled in with “patches,” resulting in a multi-part mesh rather than a finished one-part mesh.

Is this what it is supposed to do? I have normally used the EasyClip module and that produces a finished mesh.

Screenshots show the cut surface of a skull in Slicer 4.11.20200930 and the filled in patches in Meshmixer that I separated using Edit --> Separate Shells (I made shell 2 invisible). The patched surfaces also have the normals flipped inward.

Good point, only positive side of the plane cut output has correctly oriented cap. I’ve submitted an issue to fix orientation of the negative side.

Not merging points of the caps with the cut model is a feature. It makes normal computation very robust, allows separation of caps from the original surface, and allows plane cut operation be a tiny bit faster. You can always easily merge points if that is preferred for any reason, but once you merged the points, it is much harder to separate them.

You can use Surface Toolbox to post-process the model to get a model with consistently oriented normals an non-separable parts:

  • If you want to merge points of the cut model with the caps (so that MeshMixer cannot separate the parts anymore), enable “Clean” operation.
  • To make surface normal consistently face outwards, enable “Normals” operation with “Auto-orient normals” and “Splitting” options enabled (maybe also “Flip normals”). Use result of a previously “Clean”-ed (merged) operation as an input and also enable “Clean” for the output as well.
1 Like

Ok so when I use the “Clean” operation, the parts get merged although the normals are still flipped on the patches. However, when I apply “Auto-orient normals” and “Splitting”, the normals are flipped the wrong way but also the mesh gets chopped into multiple parts (blue edges) so the Cleaning step gets undone. When I input the cleaned model and check “auto-orient normals”, “splitting”, and “flip normals”, the normals are all flipped correctly, but the mesh still gets chopped into multiple parts–Meshlab is showing 1777 components and 8702 unreferenced vertices.

Maybe the instructions above were a bit confusing. By this

Use result of a previously “Clean”-ed (merged) operation as an input and also enable “Clean” for the output as well.

I meant that you need to clean both before and after recomputing the normals. I’ve tested it with MeshMixer and it worked well.

After @Sunderlandkyl fixes the capping plane normal direction (or you keep the positive side of the cut model) then all you need is a simple clean operation to merge all coincident points.

Thank you for the clarification Andras. Applying the Cleaner and fixing the normals at the same time worked–Meshlab found unreferenced vertices but it was a single closed mesh.

It might be nice if the Dynamic Modeler gave the option to leave the mesh open or not after plane cutting (like Meshmixer)–if somebody did want to leave the edges open to append to other objects, then they would have to separate the patches from the cut mesh. Also, if the cut mesh has open edges, then the Surface Toolbox (or Meshmixer) could be used to just fill holes rather than cleaning, flipping normals and cleaning again.

Capping of cut surfaces in Dynamic Modeler’s Plane cut tool is optional - controlled by “Cap surface” checkbox. Do you mean some additional open/closed option would need to be added?

“Clean” operation removes all unreferenced points. If you can provide an example file that MeshMixer reports to have unreferenced points then send it and I can have a look.

Hole filling relies on heuristics - it is not guaranteed to provide correct results. So, it is better to cap the cut surface while you still know where exactly the cut plane was.

You don’t need manual normal computation if you use a recent Slicer Preview Release and use the positive side of the cut plane, but you just need is a simple clean operation using Surface Toolbox (4-5 clicks in total).

We could add coincident point merging as an option to plane cut tool, but for that we would need to have a good reason (otherwise we would just clutter the GUI with it). Can you tell why is this a problem that coincident points are not merged?

Note that coincident point merging is a trivial operation that is available in all mesh processing software. In MeshMixer it is called “Close Cracks” (in Edit menu). So, if you don’t want to merge the points in Slicer then you can easily do it in MeshMixer, too.

1 Like

I found the Cap Surfaces box–sorry I missed that! The mesh with unreferenced vertices had a floating piece so that was it. The positive side worked fine.

We could add coincident point merging as an option to plane cut tool, but for that we would need to have a good reason (otherwise we would just clutter the GUI with it). Can you tell why is this a problem that coincident points are not merged?

I am used to using the EasyClip module for plane cuts which automatically produces a closed finished mesh, so I assumed that Dynamic Modeler might incorporate the same feature. Ultimately, I would like to not have to use Meshmixer or Meshlab to finish a model.
Thanks Andras!

1 Like

There are several reasons merging coincident points after surface cutting should not be done:

  1. Breaks surface normal computation

Surface normals are computed at mesh points and surface normal is computed by interpolating between these points. This means that at sharp edges you will not have nice, clean cut edges if the points are shared between neighbor cells.

You can split the edges (e.g., by using a fixed feature angle), but all these splitting methods rely on heuristics, so you will never get back your original cutting planes exactly.

  1. It makes more difficult to separate surface patches

Often you want to render the cut surface with a different color from the original surface. By having disjoint surface patches it is easier to separate the cut surfaces and assign different color or rendering style.

  1. It takes time

Usually point merging is quick but for large meshes it may take significant amount of time.

  1. It is an irreversible operation

All mesh processing software can easily merge coincident points, but once you merged the points, there is no way to separate the cut surface from the caps again.

Overall, it is probably better not to offer point merging as an option to plane cut tool, as it would encourage users to do it, causing potential complications for further visualization and processing steps. Any algorithms that is sensitive to coincident points can start with point merging step to avoid problems; and users can merge points anytime as needed anyway.

1 Like