View Issue Details

IDProjectCategoryView StatusLast Update
0004499FEMBugpublic2022-02-04 18:48
Reporterjohnwang Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
OSWindows 10 
Target Version0.20 
Summary0004499: Can't save color
DescriptionTalked in the post:
https://forum.freecadweb.org/viewtopic.php?f=3&t=52341

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)

Activities

yorik

2022-03-03 13:55

administrator   ~0016964

This ticket has been migrated to GitHub as issue 6131.

Issue History

Date Modified Username Field Change
2020-11-22 02:12 johnwang New Issue
2021-02-06 06:49 abdullah Target Version => 0.20
2022-02-04 18:48 Kunda1 Project FreeCAD => FEM