materials external build not copied

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

materials external build not copied

Post by Jee-Bee »

I figured out that when performing an external build that the materials in
At least in the from github downloaded osx and the 0.16 stable both have all the default materials.
So i can copy the files manually but it would be more nice to do this during the build... but no experinece with make/ cmake so don't know if i can do this...
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: materials external build not copied

Post by PrzemoF »

I hope I understand you: you can keep "your" material files in .FreeCAD directory (user config) and all instances of FreeCAD should be able to access it.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: materials external build not copied

Post by Jee-Bee »

No that's not what i meant ...
When looking to FreeCAD/src/Mod/Material/StandardMaterial/ there is a hole bunch of materials.
when i compile out of source (or so... at least compiling to other directory as source) i left with 5 material properties.

When looking to the mac application contend: I can find the materials in Contents/data/Mod/Material/StandardMaterial
so the materials are moved or copied to another directory.
Eighter the precompiled FreeCAD stable have all materials(109 materials).

I can copy self all the materials to this self compiled location... but it would be nice if this happens automatically.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: materials external build not copied

Post by PrzemoF »

OK, got it!

Go to src/Mod/Material/CMakeLists.txt and remove #

Code: Select all

# collect all the material cards:
#FILE( GLOB MaterialLib_Files ./StandardMaterial/*.FCMat ./StandardMaterial/*.txt  ) <-- remove the # to get all materials

SET (MaterialLib_Files
    StandardMaterial/None.FCMat
    StandardMaterial/ABS.FCMat
    StandardMaterial/CalculiX-Steel.FCMat
    StandardMaterial/Concrete-Generic.FCMat
    StandardMaterial/PLA.FCMat
    StandardMaterial/Steel-Generic.FCMat
    StandardMaterial/Wood-Generic.FCMat
    StandardMaterial/Readme.txt
)
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: materials external build not copied

Post by Jee-Bee »

thanks... but why is this blocked out?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: materials external build not copied

Post by sgrogan »

Jee-Bee wrote:thanks... but why is this blocked out?
Probably to just not copy a bunch of "non-important" files
If you "make install" the directories will be copied automaticalllly. Change the default CMake Install path before you try this. Look in FEM prefs, there's lots of options to customize this.
"fight the good fight"
luvres
Posts: 15
Joined: Thu Apr 28, 2016 10:54 pm

Re: materials external build not copied

Post by luvres »

I have compiled with the #FILE option spared, but I still can not include the materials.

Code: Select all

Sed -i '/ GLOB MaterialLib_Files / s / # //' FreeCAD / src / Mod / Material / CMakeLists.txt
Before:

Code: Select all

# collect all the material cards:
#FILE( GLOB MaterialLib_Files ./StandardMaterial/*.FCMat ./StandardMaterial/*.txt  ) <-- remove the # to get all materials

SET (MaterialLib_Files
    StandardMaterial/None.FCMat
    StandardMaterial/ABS.FCMat
    StandardMaterial/CalculiX-Steel.FCMat
    StandardMaterial/Concrete-Generic.FCMat
    StandardMaterial/PLA.FCMat
    StandardMaterial/Steel-Generic.FCMat
    StandardMaterial/Wood-Generic.FCMat
    StandardMaterial/Readme.txt
After:

Code: Select all

# collect all the material cards:
FILE( GLOB MaterialLib_Files ./StandardMaterial/*.FCMat ./StandardMaterial/*.txt  ) <-- remove the # to get all materials

SET (MaterialLib_Files
    StandardMaterial/None.FCMat
    StandardMaterial/ABS.FCMat
    StandardMaterial/CalculiX-Steel.FCMat
    StandardMaterial/Concrete-Generic.FCMat
    StandardMaterial/PLA.FCMat
    StandardMaterial/Steel-Generic.FCMat
    StandardMaterial/Wood-Generic.FCMat
    StandardMaterial/Readme.txt
Any idea ?
Post Reply