Arch materials

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
saso
Posts: 1490
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Arch materials

Postby saso » Sun Apr 12, 2015 11:49 pm

yorik wrote:What do you guys think?
Personally I would probably think about it for a bit longer :D But yes, as Bernd said, all the BIM tools I know normally have an quite complex management of materials / physical properties.
User avatar
rockn
Posts: 1636
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Arch materials

Postby rockn » Sun Apr 12, 2015 11:51 pm

Insomnia here ! :|
I was thinking to this :
- The property could be dic with only one key:value. key is the name, value is the path to the material cards. And a button to edit/create a card material. In this way no need (but I could be wrong) to have the material in the tree. When you save the document : whether the material is write in the object description in Document.xml whether the card material is handle in the FCStd file. So you can share it.

Also in this way we can hack FCMat to handle information like cost, thermal etc.. for windows, building etc... like saso say.
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
User avatar
yorik
Site Admin
Posts: 11859
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch materials

Postby yorik » Sun Apr 12, 2015 11:56 pm

hm yes but then it requires a much heavier system, to decide whether the material is stored in the file or not... (a kind of "pack" switch button, like blender). But I don't like that much either, it would be the only place in freecad with such behaviour...
User avatar
saso
Posts: 1490
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Arch materials

Postby saso » Mon Apr 13, 2015 12:00 am

rockn wrote:Insomnia here ! :|
I was thinking to this :
- The property could be dic with only one key:value. key is the name, value is the path to the material cards. And a button to edit/create a card material. In this way no need (but I could be wrong) to have the material in the tree. When you save the document : whether the material is write in the object description in Document.xml whether the card material is handle in the FCStd file. So you can share it.

Also in this way we can hack FCMat to handle information like cost, thermal etc.. for windows, building etc... like saso say.
I am afraid that at first this seems as a nice way to manage all the materials from one central place (the library of the material files), but in reality I suspect it could be a chaos users making infinite copies of same materials, because most users just don't like to manage things :) But I might be wrong...

I sort of lean to the way to make the default library not to big and not to friendly to general users to modify it (but still possible for more advance users) and then have an more easy and generic way to extend and modify them in the model...
User avatar
yorik
Site Admin
Posts: 11859
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch materials

Postby yorik » Thu Apr 16, 2015 1:17 am

Ok I just committed a first idea. Basically it works like this:

- All Arch objects now have a "BaseMaterial" property which is a PropertyLink and can link to a Material object
- There is a new "Add Material" button on the Arch toolbar
- When pressed, a new material is created, a task panel appears to load a material card and adjust some settings. You can also, from there, open the full editor from the Materials WB
- These materials are editable afterwards by double-clicking them in the tree
- These materials are always stored inside a "Materials" folder
- If you have arch objects selected when you create a new material, it will be automatically attributed to them. If not, you can attribute a material to an object simply by editing its BaseMaterial property.
- If an Arch object has a material, its color is automatically taken from the material color.

There is much space for improvement, but I thought this will already allow us to test and see how this kind of workflow behaves. Please test and tell me what you think!
User avatar
bernd
Posts: 9841
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Arch materials

Postby bernd » Thu Apr 16, 2015 3:32 pm

The idea sounds great.

Add only one ArchStructure (may be some profile). Try to edit the material of that structure. The link widget is empty. You need to add another structure before one comes up in the new link window.
User avatar
yorik
Site Admin
Posts: 11859
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch materials

Postby yorik » Thu Apr 16, 2015 4:25 pm

bernd wrote:Add only one ArchStructure (may be some profile). Try to edit the material of that structure. The link widget is empty. You need to add another structure before one comes up in the new link window.
I don't have that problem, as soon as there is a material in the document, I can attribute it to an object...

It would be nice to have actually a new property type, something like "PropertyLinkRestricted", that would allow you to specify a TypeId, and allow to link only objects of that type... I'll have a look if I can do it.
User avatar
bernd
Posts: 9841
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Arch materials

Postby bernd » Fri Apr 17, 2015 6:20 am

yorik wrote:... as soon as there is a material in the document, I can attribute it to an object...
:shock: :oops: Shame on me. Yeah you need to add a material first! Ahh an hint if there are more stupid user like me :shock: Add two structures and no material. Edit the material of one strucure. show all elements in link widget. click on the other structure in link widges, an exception is raised an freecad seams to get in an endless loop. Dozens of the following.

Code: Select all

Traceback (most recent call last):
  File "/home/hugo/Documents/projekte--ifc/freecad/development/snapshot/freecadcode/build/Mod/Arch/ArchStructure.py", line 696, in updateData
    ArchComponent.ViewProviderComponent.updateData(self,obj,prop)
  File "/home/hugo/Documents/projekte--ifc/freecad/development/snapshot/freecadcode/build/Mod/Arch/ArchComponent.py", line 662, in updateData
    if 'Color' in obj.BaseMaterial.Material:
<type 'exceptions.AttributeError'>: 'FeaturePython' object has no attribute 'Material'

Ahh forgot to say, Hey yorik that new material stuff in arch seams great, really !!!
User avatar
yorik
Site Admin
Posts: 11859
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch materials

Postby yorik » Fri Apr 17, 2015 2:45 pm

Aah, I see, you are trying to add the other structure as thr BaseMaterial link... There, you should link only to Material objects (the idea is that both columns link to the same material). But indeed I should add a check that rejects the link if it is not a material.
Renato Rebelo
Posts: 255
Joined: Mon May 19, 2014 1:14 pm
Location: Vouzela - Portugal

Re: Arch materials

Postby Renato Rebelo » Mon Apr 27, 2015 12:45 pm

hello,
I think there is a problem, because I can not open the material editor, whenever I click the icon the program crashes ...
material 2015-04-27.png
material 2015-04-27.png (34.69 KiB) Viewed 1052 times
OS: Ubuntu 14.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4903 (Git)
Branch: master
Hash: d449cab27975eee14278b812c362c4a4db989f87
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17



greetings,
Renato
my native language is not English, please excuse me any incorrectness, I apologize for any inconvenience caused, thank you