Wings 3D Development Forum
Boolean difference resulting in fatal error - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Interface & Usage (https://www.wings3d.com/forum/forumdisplay.php?fid=3)
+--- Thread: Boolean difference resulting in fatal error (/showthread.php?tid=2841)



Boolean difference resulting in fatal error - Crawdad - 09-09-2019

I'm trying to subtract six cylinders from a shape that was create by doing mirror on a building block, and then mirror again in a perpendicular direction. Four of my cylinders can 'difference' just fine, but the two that straddle the plane of the previous mirror operation give me a crash dump like this:

Dump written 2019-9-8_21-48
Version: 2.2.4
OS: Mac OS X (Darwin 18.7.0 x86_64)
GPU: NVIDIA Corporation | NVIDIA GeForce GT 755M OpenGL Engine
Window: geom
Reason: no_loop

Stack trace:
[{wings_bool,make_directed,6,[{file,"wings_bool.erl"},{line,1174}]},
{wings_bool,make_directed,3,[{file,"wings_bool.erl"},{line,1141}]},
{wings_bool,build_vtx_loops,1,[{file,"wings_bool.erl"},{line,1111}]},
{wings_bool,merge_1,5,[{file,"wings_bool.erl"},{line,196}]},
{wings_bool,find_intersect_1,3,[{file,"wings_bool.erl"},{line,169}]},
{wings_bool,find_intersect,3,[{file,"wings_bool.erl"},{line,159}]},
{wings_sel,dfold_1,5,[{file,"wings_sel.erl"},{line,236}]},
{wings_bool,sub,2,[{file,"wings_bool.erl"},{line,73}]},
{wings_bool,'-sub/1-fun-0-',2,[{file,"wings_bool.erl"},{line,60}]},
{wings,handle_event_3,2,[{file,"wings.erl"},{line,414}]},
{wings_wm,handle_event,3,[{file,"wings_wm.erl"},{line,984}]},
{wings_wm,send_event,2,[{file,"wings_wm.erl"},{line,951}]},
{wings_wm,do_dispatch,2,[{file,"wings_wm.erl"},{line,852}]},
{wings_wm,dispatch_event,1,[{file,"wings_wm.erl"},{line,761}]},
{lists,all,2,[{file,"lists.erl"},{line,1213}]},
{wings_wm,redraw_win,1,[{file,"wings_wm.erl"},{line,889}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{wings_wm,redraw_all,0,[{file,"wings_wm.erl"},{line,868}]},
{wings,init_part2,2,[{file,"wings.erl"},{line,106}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]

=========

There are two coincident internal faces that intersect the cylinder I'm trying to subtract, left I suppose by the mirror function. I can't bridge them to reduce them to one: "Faces must not be neighbors" is the error. Neither of these faces needs to exist, since they are both completely internal.


RE: v 2.2.4 Boolean difference fatal error - micheus - 09-09-2019

Crawdad, that is one of those minimal situation not covered by boolean.

Your topology is broken and that causes Wings3D to fail in this "simple" operation.
The region where you getting the problem has two internal and strange faces, meaning something went wrong in your process to build that part of the block.

[Image: topology-fix-1.png]

I fixed your model and then you will be able to get it right now ...
[Image: topology-fix-2.png]

... as you can see bellow. I attached back your project so you can do the boolean by ourself. Smile



You told us you used mirror and then got those "parallel" faces. That happens because mirror will copy and bridge the selected face. Take a look in this tutorial (starting exact in mirror) where I used mirror a couple of times in sequence and notice what I do when I want to mirror the entire half of the object I just created - I remove one edge to make that an entire face.


p.s. Please, report possible bugs in the Bug Reports session. Wink


RE: v 2.2.4 Boolean difference fatal error - Crawdad - 09-09-2019

Ah, I see. Thank you. I had previously selected the two faces on the side to be mirrored, but I wound up with two overlapping mirrored copies of the base object. I could have/should have removed one edge instead to make a single face.


RE: v 2.2.4 Boolean difference fatal error - Ramjet - 09-10-2019

I use boolean difference on complex object, starting with no thickness elements, (ie: the concrete runway of an airport and the grass surrounding the concrete runways) that I change in volume elements.

There are two factors that do not support the Boolean functions of Wings 3D:
- Elements of zero thickness.
- The coplanarity of 2 surfaces.

If one of these two conditions is encountered during the Boolean calculation, Wings 3D reports this
anomaly by indicating that:
- Coplanar plans were met.
- An internal error occurred.
Or the program runs in a loop indefinitely, without any warning.

- A little thought is needed about coplanarity:
* They are either an interference with the first element. But we built so that it does not happen: there are no common Vertices and Edges with second element!
* Either they are due to the connections between the different objects of the second element which will become coplanar planes when going from the plane surface to the volume.
To avoid this kind of trouble, simply move backward one of the common edges a few decimetres (1/10 of Wings Unit), noting the direction, because it will be easy at the end of the process to redo
the initial geometry by welding vertices.




and the result



Then I extract and clean the upper surface of the result and weld the remaining ex-coplanar vertices.

it save a lot of time, because I just place 15 vertices surrounding the runways and after Boolean difference I get 250 vertices for the grass element perfectly aligned with the concrete runways of this airports



The Airport in the game completely build with Wings 3D

Hope that will help some of you to use Boolean difference.


RE: Boolean difference resulting in fatal error - micheus - 09-10-2019

Ramjet, thanks for sharing your workaround for this boolean limitation.