0
$\begingroup$

My group had developed a Blender based addon - BlenderPhotonics - which can be used as a front-end for 3D tetrahedral mesh generation (by calling our Iso2Mesh toolbox in the backend). The details of this work can be found in our paper: https://doi.org/10.1117/1.JBO.27.8.083014

Our workflow involves creating complex models using Blender's built-in functions, and then, joining all mesh objects and perform intersection. The tetrahedral mesh generator is extremely sensitive and refuses to mesh any triangular surfaces that 1) are not water-tight, 2) have self-intersecting triangles, and 3) contain inconsistent triangles (such as vertices ended up in the middle of any edge or faces).

I found that Blender 2.9+ is quite good at resolving intersections with the Exact solver enabled. However, I have struggled to slice box objects with plane objects to create a multi-layered structure.

Here is an example. The scene contains a box, a plane of matching size, and a cone. My goal is to create tetrahedral mesh from this scene.

enter image description here

By performing 1) converting all objects to mesh, 2) join all triangular meshes to intersect, I got the attached intersected mesh. You can see, Blender did a good job for both top and bottom planes, but the intersection of the middle-plane creates inconsistent triangles - the 4 highlighted vertices are located in the middle of the edge of the triangles on the bounding box. This makes my tetrahedral mesh generator unhappy.

My question is - why Blender inserts these 4 nodes in the first place? is there an option for Blender to refine all connected triangles if it decides to insert a new node in the middle of any edge? or, even better, not to insert these nodes at all (like the top/bottom planes)?

any suggestion on how to consistently mesh such cut structure would be appreciated!

enter image description here

Update: just to give some idea on what is the expected "consistent triangular mesh", here is a manually edited image. What are missing are these 8 red-colored edges. With these edges, there will be no vertex located in the middle of any edge.

enter image description here

The .blend file before joining is attached here

Update 2: it looks like this behavior is also version dependent - the above screenshots were taken on Blender 3.0.1 (Ubuntu 22.04), but if I use Blender 2.92, the generated tessellation is valid - see below screenshot blender 2.92. As you can see, only two nodes were added, but both nodes were properly tessellated.

$\endgroup$
12
  • $\begingroup$ Blender will create vertices where it needs them, as far as I know you cannot control this without manually fixing them after the fact. If you need consistent triangles, after your operations you could do Face -> Triangulate Faces in EDIT mode $\endgroup$
    – Psyonic
    Commented Feb 11, 2023 at 4:49
  • $\begingroup$ It's not clear from the images what the expected result is. It seems to be a single object, but are these supposed to be loose parts in the end? If the middle plane is doubled, extra verts could be explained by self-intersection. If all you care about are the verts, try the obscure mathutils built-in "geometry.points_in_planes". $\endgroup$
    – chedap
    Commented Feb 11, 2023 at 6:47
  • 1
    $\begingroup$ @FangQ That site is not secure, try here instead blend-exchange.com This site is specifically for sharing .blend files on stackexchange $\endgroup$
    – Psyonic
    Commented Feb 12, 2023 at 6:05
  • 1
    $\begingroup$ @FangQ I can create that mesh simply, I'm really interested in the mesh from your second pic, I'm trying to understand why it won't triangulate. I'm guessing there are some rouge verts but I need to see it it help you create a workflow that can end in 100% triangles $\endgroup$
    – Psyonic
    Commented Feb 12, 2023 at 22:20
  • 1
    $\begingroup$ Well, the workaround seems to be to simply scale the plane up slightly so that its edges don't lie within the cube planes. Applies both to the Boolean modifier and to edit-mode Faces > Intersect (both modes). I don't know why it behaves the way it does. $\endgroup$
    – chedap
    Commented Feb 12, 2023 at 22:35

1 Answer 1

0
$\begingroup$

ok, I am going to answer my own question here.

After testing various blender versions, now I see that this invalid triangulation issue is only a brief regression introduced in Blender 3.0.x, and it does not show up in either older (2.92) or newer (3.4.1) versions.

Here is a comparison of 3 blender versions:

  • Top-left: 3.0.1: showing incorrect triangulation (the 4 rogue nodes were selected)
  • Top-right: 3.4.1: showing correct triangulation
  • Bottom-right: 2.92.0: showing correct triangulation

enter image description here

Both 3.0.1 and 3.4.1 were installed on Ubuntu 22.04 Linux. 2.92 were tested on Ubuntu 18.04 and Windows.

To reproduce this, here are the steps:

  1. start a new general scene with the default cube
  2. add a plane object
  3. select both, right-click, select "join"
  4. switch to "Edit mode", select Face->Intersect (Knife)-> select self-intersecting in the option dialog
  5. again in Edit mode, select Face->Triangulation
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .