Material improvements

A forum to discuss the implementation of a good Materials system in FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Material improvements

Post by triplus »

Hi Eivind.

I tested this by moving materials in all mentioned locations and tested a few more. The same issue was always produced. Therefore best to leave it as it is for now and in the future when you will start working on it again we can test further.

I think i got the general idea. Your work will very likely enable FreeCAD and all its modules to use materials in straightforward fashion in the future.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Material improvements

Post by ian.rees »

I've rebased this to the current master: https://github.com/ianrrees/FreeCAD_tin ... al2-rebase Looks cool! -Ian-
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: Material improvements

Post by eivindkvedalen »

ian.rees wrote:I've rebased this to the current master: https://github.com/ianrrees/FreeCAD_tin ... al2-rebase Looks cool! -Ian-
Thank you for taking to do the rebasing, iirc I got some conflicts last time I looked into this. Currently I'm super busy, so I'm not sure when I can work more on this. Also, I'd like to finish the hole-feature first, as that is closer to completion...

Eivind
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Material improvements

Post by NormandC »

eivindkvedalen wrote:Also, I'd like to finish the hole-feature first, as that is closer to completion...
I know a few guys who will be happy to read that...

IMHO geometry creation should always come first. Image :mrgreen:
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Material improvements

Post by ian.rees »

eivindkvedalen wrote:
ian.rees wrote:I've rebased this to the current master: https://github.com/ianrrees/FreeCAD_tin ... al2-rebase Looks cool! -Ian-
Thank you for taking to do the rebasing, iirc I got some conflicts last time I looked into this. Currently I'm super busy, so I'm not sure when I can work more on this. Also, I'd like to finish the hole-feature first, as that is closer to completion...

Eivind
No worries! I'll try to keep my branch rebased occasionally. Might even try to do a bit of work on it once a few other things are popped off the TODO stack.
NormandC wrote:IMHO geometry creation should always come first.
Parallelism is where it's at! :)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Material improvements

Post by bernd »

which branch has the latest development?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Material improvements

Post by bernd »

Lately I did some development on Material module of FreeCAD. I started to sort out some devs but stopped because einvind did all the work already. He even did it ten times better than just some better Python devs for material handling. OK, I gave it a try and started to rebase eivinds branch https://github.com/eivindkv/free-cad-co ... /Material2 but had to give up. To much conflicts on FreeCADs insides on C++ I do not have a glue how to solve. It would be really cool if we could give this great development new live and somehow could rebase it on master ...

bernd
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Material improvements

Post by ian.rees »

It's good to see attention in this area bernd. I think it will be easier for you to update from the branch on my github mentioned a few posts back here, rather than eivind's original work. I'll try to update that branch sometime soon - not likely to be in the next week as I have some work to get done on the car which has a hard deadline...
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Material improvements

Post by bernd »

oh yeah your branch has much more less conflicts ... I gave a rebase a try but eventually run into trouble on compiling ...

Code: Select all

[ 10%] Built target FreeCADBase
[ 10%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/MaterialComposition.cpp.o
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/App/MaterialComposition.cpp: In constructor ‘App::MaterialComposition::MaterialComposition(App::PropertyPartMaterial*, int)’:
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/App/MaterialComposition.cpp:73:76: warning: unused parameter ‘_solid’ [-Wunused-parameter]
 MaterialComposition::MaterialComposition(PropertyPartMaterial *_owner, int _solid)
                                                                            ^~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/App/MaterialComposition.cpp: In member function ‘virtual Py::Object Py::MaterialCompositionPy::getattr(const char*)’:
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/App/MaterialComposition.cpp:204:123: error: no matching function for call to ‘Py::Exception::Exception(std::__cxx11::basic_string<char>)’
                 throw Py::Exception(boost::str(boost::format("Unable to resolve property %1% (missing material?)") % name));
                                                                                                                           ^
In file included from /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Exception.hxx:40:0,
                 from /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Objects.hxx:44,
                 from /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Extensions.hxx:52,
                 from /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Extensions.hxx:40,
                 from /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/App/MaterialComposition.h:29,
                 from /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/App/MaterialComposition.cpp:31:
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:76:9: note: candidate: Py::Exception::Exception(PyObject*, Py::Object&)
         Exception (PyObject* exception, Object &reason);
         ^~~~~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:76:9: note:   candidate expects 2 arguments, 1 provided
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:71:9: note: candidate: Py::Exception::Exception(PyObject*, const string&)
         Exception (PyObject* exception, const std::string& reason)
         ^~~~~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:71:9: note:   candidate expects 2 arguments, 1 provided
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:62:18: note: candidate: Py::Exception::Exception()
         explicit Exception ()
                  ^~~~~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:62:18: note:   candidate expects 0 arguments, 1 provided
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:60:9: note: candidate: Py::Exception::Exception(Py::ExtensionExceptionType&, Py::Object&)
         Exception( ExtensionExceptionType &exception, Object &reason );
         ^~~~~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:60:9: note:   candidate expects 2 arguments, 1 provided
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:59:9: note: candidate: Py::Exception::Exception(Py::ExtensionExceptionType&, const string&)
         Exception( ExtensionExceptionType &exception, const std::string& reason );
         ^~~~~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:59:9: note:   candidate expects 2 arguments, 1 provided
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:56:24: note: candidate: constexpr Py::Exception::Exception(const Py::Exception&)
     class PYCXX_EXPORT Exception
                        ^~~~~~~~~
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:56:24: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘const Py::Exception&’
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:56:24: note: candidate: constexpr Py::Exception::Exception(Py::Exception&&)
/home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/CXX/Python2/Exception.hxx:56:24: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘Py::Exception&&’
src/App/CMakeFiles/FreeCADApp.dir/build.make:1382: die Regel für Ziel „src/App/CMakeFiles/FreeCADApp.dir/MaterialComposition.cpp.o“ scheiterte
make[2]: *** [src/App/CMakeFiles/FreeCADApp.dir/MaterialComposition.cpp.o] Fehler 1
CMakeFiles/Makefile2:776: die Regel für Ziel „src/App/CMakeFiles/FreeCADApp.dir/all“ scheiterte
make[1]: *** [src/App/CMakeFiles/FreeCADApp.dir/all] Fehler 2
Makefile:127: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
hugo@ahorn:~/Documents/dev/freecad/freecadbhb_dev/build$ 

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Material improvements

Post by bernd »

Seams I need to wait for you ian.

BTW you will get some problems with material-editor.ui This is something I changed lately and I would fix if all the other would compile and run. Just checkout one of the ui files.
Post Reply