Discovery Import

Discovery Import

selection based on color and face area with a script

    • Guillaume ANFOSSI
      Subscriber

      Hello,

      I have to select some equals area surfaces with same color.

      Is it possible to create a script to combine two different powerselection (colors and faces with same area) ?

      Thanks,

    • Brian Bueno
      Ansys Employee

      GUICAD

      I don't believe this is possible, but I've sent an email to the development team to confirm.

    • Brian Bueno
      Ansys Employee

      GUICAD

      You can do something like this:

      areaSel = PowerSelection.Faces.ByArea(MM2(400),

                  PowerSelectOptions(True),

                  SearchCriteria.SizeComparison.Equal)

       

      colorSel = PowerSelection.Faces.ByColor(ColorHelper.Red,

                  PowerSelectOptions(True))

       

      intersection = Selection.Create([f for f in areaSel.Items if colorSel.Items.Contains(f)])

    • Guillaume ANFOSSI
      Subscriber

      Thanks ! it works 

Viewing 3 reply threads
  • You must be logged in to reply to this topic.