How to keep appearances in fusions?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

How to keep appearances in fusions?

Post by perot »

I've been struggling with appearances a lot. I cannot find out how to have different parts of a fusion with different defined appearance. I can set the appearance of the parts just fine, usually when I fuse them the appearance of the fusion is messed up. But sometimes it works. This state of affairs is the same with v0.18 and v0.19, it just seems the two versions mess them up differently.

Examples:

I have modeled a button switch, to go onto a PCB. The switch's body is black plastic, while the cap is blue in one case and yellow in another case. I fused these just fine. I now have a fused model of a switch that is partially black and partially blue, and another one Black and yellow.

On the other hand I have created a model of an LED, with white satin plastics body (not lit), and metallized leads. When I fused them the leads turned black. Unfusing, I decided on plan B to keep the leads with the default appearance (sort of matte aluminium type grey). When I fuse again, now the LED body also switches to the default appearance. This appears totally unpredictable (the nice way of saying: This is a bug. Software must not behave unpredictably).

If fusion cannot accept different appearances, it should refuse to do the work, and display an error message. Better: Let the user choose which of the
existing appearances are to be applied to the finished object.

So, is there another way to achieve my objective?

Cheers Peter
Attachments
test.FCStd
(44.16 KiB) Downloaded 41 times
Brutha
Posts: 221
Joined: Mon May 04, 2015 1:50 pm

Re: How to keep appearances in fusions?

Post by Brutha »

The switch's body is black plastic, while the cap is blue in one case and yellow in another case. I fused these just fine. I now have a fused model of a switch that is partially black and partially blue, and another one Black and yellow.
Is fusion the right thing to use here? I guess the cap and body will be separate pieces of plastic. I would use Fusion in case something will be a single solid piece of material.

I would use the "Part" object instead to group the cap and body I think: https://wiki.freecadweb.org/Std_Part

Cheers

Brutha
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: How to keep appearances in fusions?

Post by perot »

Brutha wrote: Sun Feb 21, 2021 11:49 am
The switch's body is black plastic, while the cap is blue in one case and yellow in another case. I fused these just fine. I now have a fused model of a switch that is partially black and partially blue, and another one Black and yellow.
Is fusion the right thing to use here? I guess the cap and body will be separate pieces of plastic. I would use Fusion in case something will be a single solid piece of material.

I would use the "Part" object instead to group the cap and body I think: https://wiki.freecadweb.org/Std_Part
True. However it's not so clear for the LED. It's body is inseparable from the leads. Still could use Std:Part. However, Std:Part does not really solve the problem, as the problem comes right back when I try to create a linked copy (Draft:Clone): The linked copy has all the appearances replaced by the default(*). This is unusable, as I use linked copy a lot.

Cheers Peter

(*) BTW this is
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: How to keep appearances in fusions?

Post by heda »

not really keeping them, but allowing you full control over the end result.

perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: How to keep appearances in fusions?

Post by perot »

heda wrote: Sun Feb 21, 2021 8:11 pm not really keeping them, but allowing you full control over the end result.
Thanks for your suggestion. Unfortunately, this is lacking in even more respects than the Std:Part suggestions above:
1.) Same problem with linked copies (Draft:Clone). The copy does not have the changed colour, and there even is no way to make them have the changed colour, as linked copies do not have accessable internal parts.
2.) Tree structure inconsistency: With the fusion visible (and the contents not) the changed colour is not visible. To make it visible, the fusion must be invisible and the contents made visible. This runs contrary to the whole paradigm of how FreeCAD uses the tree elements.
3.) The colours to be set this way are a poor replacement of the more detailed colour model that appearances implement: No specular effects, for instance, i.e. no way to make metallic surfaces look metallic.

I now have also experimented with Part:Compound. However, it is worse than Std:Part because it seems to remove all the appearance's special colour effects and only keeps the base colour (basically point (3) above). And again linked copies are colourless. :(

I seem to remember having used appearances in 2016, when I started using FreeCAD. Apparently in five years no developer bothered to fix these issues. Appearances are still useless but for the most basic models. :cry: Instead, lots of other new features have been implemented. This is FreeCAD's biggest issue: No developer cares to get the basics right (I'm not specifically referring to appearances, there are lots of more important basics that are broken).

Cheers Peter
User avatar
papyblaise
Veteran
Posts: 7878
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: How to keep appearances in fusions?

Post by papyblaise »

this LED is made of a green body and a 1.01 scale bigger cap in red color, but it does a lot of work for each element
I may have bad memory, I think I remember that in "Rendu we could make the skin of a different color than the body, but it is perhaps in another life with another CAD :?:
Attachments
led.FCStd
(17.03 KiB) Downloaded 43 times
led.PNG
led.PNG (14.33 KiB) Viewed 724 times
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: How to keep appearances in fusions?

Post by heda »

here is how it looks in v0.18 for me.
so yes there are ways to keep appearances,
you are saying that you use part wb (fusion), but to me it does not look like part wb is doing what you say,
part design wb however seems to behave like this, which indeed is not very practical.

but saying that noone cares, really dude..., fc is made by volunteers (not paid devs), and they have cared enough to spend years/decades in making a piece of software that you can use for free - that for me is the true opposite of "not caring", it is borderline heroic.

app.png
app.png (74.4 KiB) Viewed 702 times
ps: the ones with sharp eyes will notice the presence of a seam edge on the sphere for pd wb, which is not there for part wb because it is oriented in such way that it does not appear on final shape.
Brutha
Posts: 221
Joined: Mon May 04, 2015 1:50 pm

Re: How to keep appearances in fusions?

Post by Brutha »

perot wrote: Sun Feb 21, 2021 6:08 pm
True. However it's not so clear for the LED. It's body is inseparable from the leads. Still could use Std:Part. However, Std:Part does not really solve the problem, as the problem comes right back when I try to create a linked copy (Draft:Clone): The linked copy has all the appearances replaced by the default(*). This is unusable, as I use linked copy a lot.
I've just discovered something that may be useful with the new App:Link - at least it was new to me! https://wiki.freecadweb.org/App_Link

Try this: create your LED from two or more bodies and put them inside a Std:Part.

Then: right click on the Part, and click "Link actions" / "Make link" - you get a new Part in the document, which shows the same bodies as in the original Part.

It looks like any changes to the original bodies are now replicated.... including appearance, or adding new bodies to the originally linked part.
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: How to keep appearances in fusions?

Post by perot »

Brutha wrote: Tue Feb 23, 2021 11:55 am
perot wrote: Sun Feb 21, 2021 6:08 pm
True. However it's not so clear for the LED. It's body is inseparable from the leads. Still could use Std:Part. However, Std:Part does not really solve the problem, as the problem comes right back when I try to create a linked copy (Draft:Clone): The linked copy has all the appearances replaced by the default(*). This is unusable, as I use linked copy a lot.
I've just discovered something that may be useful with the new App:Link - at least it was new to me! https://wiki.freecadweb.org/App_Link

Try this: create your LED from two or more bodies and put them inside a Std:Part.

Then: right click on the Part, and click "Link actions" / "Make link" - you get a new Part in the document, which shows the same bodies as in the original Part.

It looks like any changes to the original bodies are now replicated.... including appearance, or adding new bodies to the originally linked part.
Whoa! You're my hero of the day. This works beautifully.

Is this possibly meant to replace Draft:Clone in the long term? In that case we'd just have a communication issue: The reference page of Draft:Clone should be modified to state that it's deprecated.

Cheers Peter
Post Reply