FEM: use MechanicalMaterial instead App::MaterialObjectPython in TestFem
This commit is contained in:
parent
a7f96cb838
commit
41852c4c50
|
@ -28,6 +28,7 @@ import Fem
|
||||||
import FemTools
|
import FemTools
|
||||||
import FreeCAD
|
import FreeCAD
|
||||||
import MechanicalAnalysis
|
import MechanicalAnalysis
|
||||||
|
import MechanicalMaterial
|
||||||
import csv
|
import csv
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -89,7 +90,7 @@ class FemTest(unittest.TestCase):
|
||||||
self.active_doc.recompute()
|
self.active_doc.recompute()
|
||||||
|
|
||||||
def create_new_material(self):
|
def create_new_material(self):
|
||||||
self.new_material_object = self.active_doc.addObject("App::MaterialObjectPython", 'MechanicalMaterial')
|
self.new_material_object = MechanicalMaterial.makeMechanicalMaterial('MechanicalMaterial')
|
||||||
mat = self.new_material_object.Material
|
mat = self.new_material_object.Material
|
||||||
mat['Name'] = "Steel"
|
mat['Name'] = "Steel"
|
||||||
mat['YoungsModulus'] = "200000 MPa"
|
mat['YoungsModulus'] = "200000 MPa"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user