# Difference boolean for overlapped objects or any possible alternative

I am trying to generate a geometry using Math Function (XYZ function) as in Fig.1 using version 2.79.

I ideally would prefer to have three independent objects and merge/join all 3 objects as one and export as an stl. I am aware of the 'join' function but this would not eliminate the overlapped boundaries in the stl file (that is the stl file still marks the boundaries of the objects present in the joined stl) which is not what I want. Therefore, I taught 'difference' boolean can be used but was causing major issues.

The steps I followed were, Step1: Model bottom half part of the geometry as in Fig.2 (see for equation used).

Step2: Copy paste Part1 to get Part2 and rotate 180 along Y as in Fig.3. This results in an overlapped portion of the objects.

Step3: Add Part3 to finish the geometry as in Fig. 4 by copy past part1 and rotate 270 along Z. Again this has overlapped portion of the object.

Now, I extrude each object individually and select a plane to apply the difference boolean. Unfortunately, this works very rarely and most of the time I end up with an unsnapped plane as in Fig.5. How can I avoid this?

For reference, I attach the blender file with 3 objects. I have not included the extrusion of the objects and difference boolean in the .blend file to make it flexible to work for others.

Do note that, I am using a maximum number of vertices for the math function (1024) as for my purpose I would like to have accurate tangents and normals to the surface. I did try out the "remove double" but still, I have some unwanted parts in the geometry.

Thanks.

• For the accuracy you mention, do you require the vertices internal to the shape, or will the vertices on the boundary be enough? Jul 2, 2018 at 17:14
• The main aim is to get the boundary of the model which later will be used for a Computational Fluid Dynamics set up. Internal vertices are less important (in other words, I don't even need them) in this case but I guess the difference boolean is struggling with the overlapped vertices. Jul 2, 2018 at 17:31

Boolean have limitations, as described in blender wiki:

Boolean operates best on water-tight meshes, where inside/outside is clearly defined.

The following characteristics are known to give bad output.

• Open volumes.
• Overlapping geometry.
• Self-intersections.
• Zero-area faces.

While they may not fail in all situations, they aren’t guaranteed to work properly.

When you join meshes you create Overlapping geometry and Self-intersections, that makes bad result.

So make 3 separate booleans to avoid self-intersections.

Or maybe try different ways to build geometry, for example Animation nodes or Svercok ?

Or instead of using booleans remove useless parts of mesh manually, in edit mode?

• Could you please elaborate on using 3 booleans? (I think it is the same doing 3 times the difference boolean one after the other or am I thinking wrong?) Also, I am not sure how to remove unwanted portion in edit mode as I have way too many vertices. I tried 'remove doubles' but not satisfactory. Jul 2, 2018 at 19:09
• I have tried the three individual boolean step mentioned above and I did notice that blender struggles to snap-off the essential portion. Jul 3, 2018 at 5:19

I can't be sure this result is acceptable, but maybe the general approach is.

• Dispose of all geometry not contributing to the profile you're interested in.
• a) select 1 internal vertex then Select > Similar > By Connecting edges, and delete.
• b) on all straight edges, Ctrl-select internal vertices, and dissolve.
• Put pivot at center of long straight edge
• a) With edge selected,ShiftS Cursor to selected
• b) In Object Mode ShiftCtrlAltC > Origin to Cursor.
• Create empty at origin

• Assign an Array modifier in the Empty's space, and rotate the empty in Z by 90 degrees.

This results in an offset.. (the ends of your math function curves do not meet)

• So compensate with an offset in the modifier, as shown

• Hoping this is what you are after - corners now coincident

• Make the outline contiguous, after applying the modifier.
• a) Go in by hand AltM, merge the corner vertices
• b) Delete internal vertices
• c) F Fill the outline, resulting in an Ngon face

• Optionally tidy up, put the pivot at the center, put in a couple of edge-loops which meet there.
• Extrude the face.

Of course, if it's the hole you want, not the block, delete the Ngons, turn the profile inside-out and box it in.