3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

How to select elements to create a surface using SpaceClaim scripting?

TAGGED: ,

    • Nicole Pan Tavares
      Subscriber

      Helo! 

      I'm creating a standardized geometry with several circles and channels that interconnect the circles. I then want to select only the circles and channels to create surfaces and then extrude them. It can't be done by recording the script because this geometry has to be expanded later, and if it's done by selecting the mouse and recording the script, it won't work for the other geometries. How could I write this script to select and create a surface?

    • Nicole Pan Tavares
      Subscriber

      I managed to do this by giving the number of lines to be selected, and thus creating the surface only in the desired region. 
      "

      selection_curves = []  # Lista para armazenar os valores de Curves[i]

      for i in range(13):  # Iterando de 0 a 13
          curve = GetRootPart().DatumPlanes[0].Curves[i]
          selection_curves.append(curve)

      selection = Selection.Create(selection_curves)
      secondarySelection = Selection.Empty()
      options = FillOptions()
      result = Fill.Execute(selection, secondarySelection, options, FillMode.Layout, None)

      "

Viewing 1 reply thread
  • The topic ‘How to select elements to create a surface using SpaceClaim scripting?’ is closed to new replies.