Boolean union fail
All  1  2-8

Previous
Next
 From:  Michael Gibson
3804.2 In reply to 3804.1 
Hi niko, it's because the larger shape is itself not a closed solid, it has an opening in it.

If you select that part, note that the object type indicator reads "Joined srf" and not "Solid" like it would if it was a fully closed object:



Running the script that selects naked edges shows 4 edges that are unattached:




The naked edge script is useful to set up as a shortcut on the N key so that you can see where the unjoined edges in a non-solid object are at. To set that up put in the following script as the command part of a shortcut key:

script:var gd = moi.geometryDatabase; gd.deselectAll(); var breps = gd.getObjects().getBreps(); for ( var i = 0; i < breps.length; ++i ) breps.item(i).getNakedEdges().setProperty( 'selected', true );


Those edges seemed to be slightly out of the 0.005 MoI join tolerance, so I scaled the object down by 1/10 in size, separated it into individual surfaces, then joined those, and that formed a completely closed solid, then I scaled it back up again.

I've attached the result here as union_fixed.3dm - now with both those objects as fully closed solids the boolean should work as expected.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3804.3 In reply to 3804.1 
Hi niko, also a note on this part:

> Just for reference's shake,this union is sucessful in Rhino...

That's because Rhino processes booleans between open surfaces differently than MoI does.

Rhino uses the positive normal direction of open surfaces to decide which side to keep. That can sometimes be pretty confusing because it means that something like Boolean Union actually behaves more like Boolean Difference instead if the normals happen to be reversed from what you were thinking.

For example with your original model here, load that into Rhino and then select the bigger piece and run the Flip command on it (it is able to be flipped since it is not a closed solid). Now try the boolean union command in Rhino again after that, and you'll see a much different result.

It's kind of a matter more of luck that the normals for that larger piece were aligned in a more expected direction as if it was a closed solid.

In situations like this MoI instead tries to slice up pieces with each other and try to extract whatever different volume chunks it can, rather than having this sensitivity to the surface normal direction. That helps to avoid this one kind of confusing situation of having Union behave as if it was Difference as in Rhino...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3804.4 In reply to 3804.1 
Hi niko, and it looks like the reason why your object was not a fully closed solid was that a fillet went wonky in this area here:





Seems the bottom fillet piece did not quite get its end trimmed off very cleanly, the trim boundary kind of doubles back on itself right in that spot.

Was that fillet produced in MoI or was that one generated in Rhino ?

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  niko (NICKP100)
3804.5 In reply to 3804.4 
The original model and fillet was generated in MOI.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3804.6 In reply to 3804.4 
Hi Niko - so yeah it looks like MoI's filleter did not quite get a clean trim at the ends of the fillets in that spot there.

That's one of the issues that makes filleting difficult - trying to get a clean intersection where 2 fillet pieces cross over each other where they are tangent or very close to being tangent.

Things that come to the same tangent kind of have more of a zone where they are overlapping in a certain sense which is much harder to calculate than a crisp intersection where things collide at a 90 degree angle or something like that.


So at any rate, the actual problem here was not really in the booleans but more in the filleter.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  niko (NICKP100)
3804.7 In reply to 3804.6 
what's the solution?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
3804.8 In reply to 3804.7 
Hi Niko, well the error is pretty small in size, do you actually need it cleared up?

If you just want the boolean to work, the solution I posted previously will work (scale down, join, scale up) for getting it into a solid and getting the boolean to finish.

If you need a better fillet in that spot, do you have the original unfilleted shape that you could post? Possibly doing a scale UP first before doing the fillet could actually help with the fillet, it may make the fillet be denser and more accurate and possibly intersect better.

Another possibility for fillet quality is to try using a surface/surface fillet instead of the edge-based filleting. To do surface/surface filleting you break things apart into individual surfaces and then just select 2 surfaces at a time for fillet construction. You may need to do some manual trimming for this method.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-8