Material Properties: Modified Snowden Anisotropic Example#

Download the ExampleModel.slmd for this example.

Code Snippet: Modified Snowden Anisotropic Example#
from Slide2Scripting.Slide2Modeler import Slide2Modeler
from Slide2Scripting.MaterialProperties.MaterialStrength import StrengthType
import os, inspect

current_dir = os.path.dirname(os.path.abspath(inspect.getfile(lambda: None)))
Slide2Modeler.startApplication(60074)

slide2_modeler = Slide2Modeler(60074)
model = slide2_modeler.openFile(rf"{current_dir}\example_models\ExampleModel.slmd")

material = model.getMaterialProperties()[0]
material.StrengthProperties.setStrengthType(StrengthType.MODIFIED_SNOWDEN_ANISOTROPIC)
props = material.StrengthProperties.ModifiedSnowdenAnisotropic
props.setA1(1.0)
props.setB1(1.0)
props.setA2(1.0)
props.setB2(1.0)

print(props.getA1())
print(props.getB1())
print(props.getA2())
print(props.getB2())

model.save()
model.close()

slide2_modeler.closeApplication()

Output#

1.0
1.0
1.0
1.0