Page 1 of 1

[solved] how apply material for object? is it working?

Posted: Fri Feb 18, 2022 10:32 pm
by dprojects
Hi, I am trying to apply Wood Material for object Cube or Pad without success. Later, I would like to use Arch Texture workbench to rotate example grain direction texture (.png transparent file with grain direction mark) on face object and see how it impacts the XML object structure. I would like to know if this could be used this way for woodworking purposes or this need to be improved.

But when I selected Pad or Cube object and click material creation like it is described here https://wiki.freecadweb.org/Arch_SetMaterial but I got error:

Code: Select all

23:04:28  <Exception> type must be str or unicode, not FeaturePython
23:04:28  Running the Python command 'Arch_Material' failed:
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAGq1Ybw/usr/Mod/Arch/ArchMaterial.py", line 128, in Activated
    FreeCADGui.doCommand("FreeCAD.ActiveDocument.getObject(\""+obj.Name+"\").Material = mat")
  File "<string>", line 1, in <module>

type must be str or unicode, not FeaturePython
I can create Wood Material without selection but I am not able to apply it to the object.
I am doing something wrong? or this is not implemented to the end? or lost feature?

Re: [solved] how apply material for object? is it working?

Posted: Sat Feb 19, 2022 1:44 pm
by dprojects
OK. I was able to add Material and also MultiMaterial with 2 layers (one Wood and one Grain).
There need to be added new property to the object named "Material" and the type App::PropertyLink. Looks like bug or forgotten and not further developed good functionality.

Re: [solved] how apply material for object? is it working?

Posted: Fri Aug 12, 2022 6:16 pm
by OlPhil
I tried to use Arch Textures today on my Mac with FC 0.20 and it seems not to be working at all anymore. Even when I insert a "Material" branch into the Databranch of the object with App:ObjectLink it doesn't work.

Does someone know if Arch Textures will be updated or if there is some work on a FreeCAD solution for applying Textures to an object?

Greetings,

Phil

Re: [solved] how apply material for object? is it working?

Posted: Sat Aug 13, 2022 11:42 am
by dprojects
OlPhil wrote: Fri Aug 12, 2022 6:16 pm I tried to use Arch Textures today on my Mac with FC 0.20 and it seems not to be working at all anymore. Even when I insert a "Material" branch into the Databranch of the object with App:ObjectLink it doesn't work.

Does someone know if Arch Textures will be updated or if there is some work on a FreeCAD solution for applying Textures to an object?

Greetings,

Phil
Hi, Phil, I don't know about Arch Textures workbench but you may want to try setTextures macro. It allows to add URL to the texture from the internet and also there is added option to store local hard drive path.

Material Card is little different thing than texture, it is more about object technical description. However, the Material Card has link to texture and the setTextures can read the texture from there as well and apply the texture if the Material Card is assigned to the object.

There is also rendering workbench as far as I know, maybe there are some more options for textures.