hexagon logo

STL creation in python api

Hello ,

 Can we create a .stl file in Simufact python API using .stl creation code just like we do in MATLAB? 

I have tried but the system was showing this errors: 

ModuleNotFoundError: No module named 'stl'

Thanks,

VIgnesh

Parents Reply Children
  • Hi Vignesh,

    I'm happy to hear that you were able to install the package using pip. In this case you should be able to generate random .stl files as you did in MATLAB, and you can then directly import the generated .stl file into Simufact project via python. I assumed your first question is answered or solved.

    To your second question: Yes, it is possible to extract results by accessing object Project -> Process -> Results -> ResultIncrement -> Mesh -> IntegrationPointResults or NodeResults. Please search for the class name in the same documentation for instruction. The results can e.g. be exported into a file for further data processing.

    To the third question: Yes, you can setup the model, export the results, run your own algorithm to generate new .stl and assign them again in a loop so that e.g. 10 simulations can be started one after another and run at a time. But please note how many simulations can be performed at a time is limited by your available licenses and hardware (processors).

  • Hi,

    I’m having an issue with my PIP installation. Could you help me by sharing how you installed it?

    kamar 

  • Hi Kamar,

    I can gladly help you with the question. 

    First the pip installer is located in your Simufact product installation directory, e.g. for Forming it is by default C:\Program Files\simufact\forming\<version>\sfForming\python. You can open a prompt there and run the installer as followed: 

    pip.bat install somepackage

    If you would like to distinguish between a system-wide and a user-wide installation, please refer to our document C:\Program Files\simufact\forming\<version>\doc\Scripting\thirdparty.html for more information.

    Just let me know if this works for you or you have further questions!

  • Hi,

    Thank you very much for your help! I was able to follow your instructions and successfully complete the installation.

    Best regards,
    Kamar