Skip to main content

Mechanical scripting interface

SelectionHelper

Last update: 14.01.2025

class Ansys.Mechanical.Selection.SelectionHelper

Bases: object

SelectionHelper class.

Overview

Constructors

Name Description
CastRayOnGeometry Finds geometry entities intersecting input BoundVector and returns them in list of GeometryRayCastHit.
CreateVector3D Creates a Vector3D object based on the given selection and reverse flag.

Method detail

classmethod SelectionHelper.CastRayOnGeometry(castVector: Ansys.Mechanical.Math.BoundVector, settings: Ansys.Mechanical.Selection.GeometryRayCastSettings)

Finds geometry entities intersecting input BoundVector and returns them in list of GeometryRayCastHit.
These are returned in the order they are hit, each item containing the entity and BoundVector normal to point hit.

classmethod SelectionHelper.CreateVector3D(selection: Ansys.ACT.Interfaces.Common.ISelectionInfo, reversed: bool)

Creates a Vector3D object based on the given selection and reverse flag.
    The direction is computed as the outward normal of a planar face, the direction between
    two nodes or vertices from the first to the second, or the axis of an edge.
    The reversed flag will return the opposite of the computed direction.