Error with DPF operator: stl_export
Mike.Thompson
Member, Employee Posts: 345
✭✭✭✭
in Structures
I am getting an error with stl export operator. Any ideas why? The mesh region is found fine with the mesh_provider op, but the stl export fails with: Could not find the specified Output Type
import mech_dpf
import Ans.DataProcessing as dpf my_file_path=r'C:\Users\mthompso\MyData\test.stl'
dataSource = dpf.DataSources(Model.Analyses[0].ResultFileName) op = dpf.operators.mesh.mesh_provider() # operator instantiation
op.inputs.data_sources.Connect(dataSource)
my_mesh = op.outputs.mesh.GetData() op = dpf.operators.mesh.stl_export() # operator instantiation
op.inputs.mesh.Connect(my_mesh)
op.inputs.file_path.Connect(my_file_path)
stl = op.outputs.data_sources.GetData()
Tagged:
0
Best Answer
-
I've created a PR to fix that bug.
Meanwhile, note that you can use "op.Run()" instead of "stl = op.outputs.data_sources.GetData()".
1
Answers
-
@Ayush Kumar , @Paul Profizi , maybe you can help on that one ?
0 -
Looks like a bug with the IronPython API, it works as expected with PyDPF. Please log a bug.
0 -
I can confirm the op.Run() method did work. Thanks! @Lea PARADIS
0