Material for part

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Material for part

Post by Vincent B »

Is it expected to insert material into a part?
Attachments
Capture.JPG
Capture.JPG (34.13 KiB) Viewed 3778 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Material for part

Post by vocx »

GlouGlou wrote: Sat Sep 14, 2019 8:50 pm Is it expected to insert material into a part?
I am not entirely sure how the material system works, but I think only certain objects are able to use materials. Part Workbench objects are pretty "simple", not very "intelligent" in terms of properties.

On the other hand, complex objects like Arch Workbench objects, or FEM Workbench objects, can use these materials.

I remember reading that now in 0.19, with the LinkMerge branch included, objects can have dynamic properties, so maybe you can create a Material property for you object and make it use a specific material.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Material for part

Post by bernd »

ATM material system only works for Arch and FEM. This https://forum.freecadweb.org/viewtopic.php?f=38&t=16714 implements materials for all parts as a property similar to a shape. But unfortunately eivind is not very active ATM. I am very interested in this work but it is a huge amount of C++. Since I am a Python guy this is out of my scope.
fcaduser
Posts: 446
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Material for part

Post by fcaduser »

So, it seems one can't yet attach a material to a part (within the part file, I mean) ?
Incidentally I'm surprised xml is not used for the *.FCMat files. Isn't it the right format for this sort of data storage ?
https://wiki.freecadweb.org/Material
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Material for part

Post by Jee-Bee »

You are talking about Part Design part right?
I think the part design part AND part design body should have these features. I think objects from the part workbench are more difficult
fcaduser
Posts: 446
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Material for part

Post by fcaduser »

I use Part.
If you click at the tree root in the combo-view (the node right under "Application"), then some "administrative" data are shown (relative to corporate, etc).
Adding a "material" section would be very useful, it's straightforward to fetch data once a *.FCMat file is associated.
fcaduser
Posts: 446
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Material for part

Post by fcaduser »

In the long term, will a part have a function linking it with a *.FCMat file ?
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Material for part

Post by Jee-Bee »

I don't know. For PartDesign i'm sure it would be yes. but part with all merging and splitting objects i think it is more difficult to handle
fcaduser
Posts: 446
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Material for part

Post by fcaduser »

I'm quite surprised. I don't think there is any particular difficulty for Part doing this too. Assuming the part has a *unique* feature at the top (ie a root), then it can be associated with a material without confusion (to what should it be applied ?). The path targets a material, retrieves all physical properties needed for the FEM module (for example), and applies all this to the upper most feature.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Material for part

Post by bernd »

see this post https://forum.freecadweb.org/viewtopic. ... 44#p334434 There exists a dev branch with lots of cool stuff which adds a material property to every part. IMHO this is the way to go. Unfortunally this is not developed ATM.

INI file format has been choosen Years ago. May be 10 or 15 or even more. This never changed. IMHO xml is not the right format. Since I am python guy I would use yaml, which is much easier to pares and even much easier for a human to edit and read. But any development in this regard is far away from the top of my TODO.
Post Reply