3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

How to input outside values into a SpaceClaim script?

    • prheintz
      Subscriber

      I have a script within Spaceclaim that develops a unidirectional composite matrix with fibers. I also have an external MATLAB function that randomly generates origin locations for the fibers and I'm wondering if there is way to take these points from MATLAB (or a txt file) and have them inputted into the python script within SpaceClaim to update fiber positions on my geometry. Any ways of interfacing spaceclaim scripts with programs outside of ANSYS would be of interest to me.

      I can include pictures of my current geometry and manual inputs if it's helpful.


      Thanks,

      Pierce

    • Aniket
      Forum Moderator
      You can import point curve text as explained in the following link:
      https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v211/en/spaceclaim/Discovery/user_manual/importing_and_exporting.html
      You can import the point cloud and then should be able to use generated points in your script further.

      Also, did you look at Material designer:
      https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v211/en/acp_md/acp_md.html
      -Aniket
      How to access Ansys help links
      Guidelines for Posting on Ansys Learning Forum
    • prheintz
      Subscriber
      Aniket
      Your suggestions pointed me in the right direction. I actually discovered the code to directly read a CSV file with (x,y,z) coordinates into spaceclaim via the scripting tool.

      And yes, I have been using Material designer as well to do some fiber modeling.

      Thank you for the suggestions!

      -Pierce
    • Franc Shaw
      Subscriber

      Hi Pierce,
      Could you please proivde a example code to read csv variable value into SpaceCalim by using csvReader?
      Thanks a lot!

    • Franc Shaw
      Subscriber

      For Exampel, I define R1 and r2 in csv, I import these two values into Spcaeclaim, to determine the radius of outer and inner circles

    • Franc Shaw
      Subscriber

      I do not know how to sovle the code at the question mark places?
      Thank you very much!

Viewing 5 reply threads
  • The topic ‘How to input outside values into a SpaceClaim script?’ is closed to new replies.