material editor
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
material editor
how do I start MaterialEditor from Python konsole?
Re: material editor
Code: Select all
import MaterialEditor
MaterialEditor.openEditor()
Code: Select all
mat = MaterialEditor.editMaterial(myMaterialDictionary)
to directly edit an existing material
Re: material editor
just realized, whereas:
but
OS: Debian GNU/Linux 9.4 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13805 (Git)
Build type: Debug
Branch: master
Hash: 468946bcde23e7e1e39714b2c5a7e786108fb5ba
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: German/Switzerland (de_CH)
works greatyorik wrote: ↑Sat May 26, 2018 8:58 pmCode: Select all
import MaterialEditor mat = MaterialEditor.editMaterial(myMaterialDictionary)
but
does only open the editor, but none of the buttons works. Even ok or cancel do not work at all onyorik wrote: ↑Sat May 26, 2018 8:58 pmCode: Select all
import MaterialEditor MaterialEditor.openEditor()
OS: Debian GNU/Linux 9.4 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13805 (Git)
Build type: Debug
Branch: master
Hash: 468946bcde23e7e1e39714b2c5a7e786108fb5ba
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: German/Switzerland (de_CH)
Re: material editor
hm I'll have a look... There is a long time I didn't use it.
Re: material editor
great! Found another one. The save as does not work at all, no matter how the material editor was started.
BTW: In FEM we gone use an own task panel to edit all material parameter. I'm on the way to switch to the material editor for this. I tried to fix the above problems, but have no glue what's going wrong ... Once the material editor is fixed I may try to improve it a bit in the regard of keeping track of the right unit while editing a property. We have this in our material task panel. If this works in material editor we gone switch to material editor in FEM completely. Than we only need to implement the new stuff of einvind only once in the material editor if it is in master. How does that sounds?
Re: material editor
It is working for me here apparently... Any error message? Some non-ascii/encoding problem maybe?
My plans for the material editor, regardless of Eivind's project (it only affects mat cards, so it should stay compatible):
- replace the material choosing combo box by a button that would open a more complex dialog to choose existing materials, either from cards or from a material already existing in the document. This will allow to use a tree widget and sort the materials by Father (steels, plastics, etc...)
- add SVG graphics at the top, that display a preview of the material
- implement a QStyledItemDelegate for the material editor, that would allow to use the FreeCAD unit widget in fields that expect a unit (and perform other checks if needed)
In Arch I'm still using a "simplified" UI when adding/editing materials (there is a button to open the full-dledged material editor too), I'm wondering if I want to keep that or not...
Re: material editor
I've got in my agenda, of June, a very similar question. I would like to learn about this ...
I'll see it. There always is something reusable ..., especially the structure or general idea
Re: material editor
double checked ...
the material editor opens. press open nothing happens, press ok nothing happens ... tested on a Debian Stretch in brand new virtual box same issue. No error, no warning. Tried
same problems ...
I can close the windwo by click on the cross in upper right corner of the widget only. Does it really work for you? Are you on Py3 and Qt5? I'm still on py2.7 and Qt4.8.7.
bernd
Code: Select all
import MaterialEditor
MaterialEditor.openEditor()
Code: Select all
LC_ALL=C ./bin/FreeCAD
I can close the windwo by click on the cross in upper right corner of the widget only. Does it really work for you? Are you on Py3 and Qt5? I'm still on py2.7 and Qt4.8.7.
bernd
Re: material editor
For me, no!
I suppose it must be revisited from the first line
OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13826 (Git)
Build type: None
Branch: master
Hash: 3b02ff2a9481f0883063c7e24c312978ef0ce642
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)