View Issue Details

IDProjectCategoryView StatusLast Update
0004499FreeCADBugpublic2020-11-22 02:12
Reporterjohnwang Assigned To 
Status newResolutionopen 
OSWindows 10 
Product Version0.19 
Summary0004499: Can't save color
DescriptionTalked in the post:

Using this code to generate a FemMesh object with two triangle elements. Then changed the color of one element. But after saving and reopen, the color is lost.
Steps To ReproduceUse this code to create the file, then save and reopen.
import Fem

a = Fem.FemMesh()

a.addNode(0,    0,    0,    1)
a.addNode(10,    0,    0,    2)
a.addNode(5,    10,    0,    3)
a.addNode(15,    15,    0,    4)

a.addFace([1,2,3], 1)
a.addFace([2,4,3], 2)
obj = FreeCAD.ActiveDocument.addObject("Fem::FemMeshObject")
#obj.Placement.Base = FreeCAD.Vector(2, 0, 0)
obj.FemMesh = a

obj.ViewObject.ElementColor = {1:(1,0,0)}
TagsNo tags attached.
FreeCAD InformationOS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22900 (Git)
Build type: Release
Branch: master
Hash: b7b4250b7fe5e98bcdbe2a7c7be256132b35cd3d
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-11-22 02:12 johnwang New Issue