MoI discussion forum
MoI discussion forum

Full Version: How to keep colors during boolean union

From: fcwilt
30 Oct 2020   [#1]
Hi,

There is something that I do not understand involving the color of objects and the boolean union operation.

In the first simple image the pile of objects of different sizes keep their colors after a union, not so the pile of same size objects. The image is pre-union.

The second image shows what prompted my question. The model is composed of different "layers" of objects to allow applying different colors. But after the union the colors are messed up.

What is the "correct" way to have multiple colors on such a model?

Thanks much.

Frederick




Image Attachments:
Boolean Union and Colors.png  Stepper Model Before Union.png 


From: Michael Gibson
30 Oct 2020   [#2] In reply to [#1]
Hi Frederick, can you please post the .3dm model file of your second one?

- Michael
From: fcwilt
30 Oct 2020   [#3] In reply to [#2]
Hi,

Will do.

I built the model in layers of solids, each layer relating to a part of the real object that was a different color from other adjacent parts.

I have no idea if that is even a sensible way to apply color.

Thanks.

Frederick

Attachments:
Stepper 39mm with 5-to-1 Gearbox - 8mm shaft with keyway.3dm


From: Michael Gibson
30 Oct 2020   [#4] In reply to [#3]
Hi Frederick, so what you're running into there is that boolean union will merge together faces with planes that are coplanar fragments of a larger plane and also surfaces that share the same "underlying surface" under their trimming boundaries.

That merging is normally helpful for modeling but it is getting in the way of your current goal of keeping the face structure intact.

Right now there isn't any way to turn off that behavior in the booleans but there are other ways you can achieve the end result you want.

The first way is to delete the common faces so the pieces are open there, like this (here I deleted the top face of the bottom piece, you would also need to delete the bottom face of the upper piece):


Then when you have pieces with open edges that are all touching each other you can use Edit > Join to glue them together. Unlike the booleans, the join command does not try to do any cutting of material nor any merging of faces, it only joins naked edges to other naked edges.

The other way to approach it would be to make it all one solid piece and then cut it with a line drawn in a side view using the Edit > Trim command with the "Keep all joined" option at the last stage. That will slice up the "skin" of a solid but still keep it all connected together.

Hope this helps!

- Michael

Image Attachments:
frederick_join.jpg 


From: fcwilt
30 Oct 2020   [#5] In reply to [#4]
Hi,

I think I understand what you said and it is consistent with what I have seen happening.

I will give those two approaches a try and see which one works best for me.

Is the behavior I would like to see something that is worthwhile OR am I simply going about it all wrong?

Frederick
From: fcwilt
30 Oct 2020   [#6] In reply to [#4]
Hi again,

Well after trying the trim command it's clear that it works fine and is much easier then what I was doing.

Thanks.

Frederick
From: Michael Gibson
30 Oct 2020   [#7] In reply to [#5]
Hi Frederick,

> Is the behavior I would like to see something that is worthwhile
> OR am I simply going about it all wrong?

It's not necessarily wrong, and it has come up every now and then so it would make sense to put in an option for disabling the face merging in v5.

- Michael