Skip to main content

Mechanical scripting interface

Geometry

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.Geometry

Bases: object

Defines a Geometry.

Overview

Methods

Name Description
Activate Activate the current object.
AddComment Creates a new child Comment.
AddDistributedMass Creates a new DistributedMass
AddElementOrientation Creates a new ElementOrientation
AddFigure Creates a new child Figure.
AddImage Creates a new child Image.
AddImportedElementOrientationExternalData Creates a new Imported Element Orientation (External Data).
AddImportedThicknessExternalData Creates a new Imported Thickness (External Data).
AddLayeredSection Creates a new child LayeredSection.
AddPointMass Creates a new PointMass
AddSurfaceCoating Creates a new SurfaceCoating
AddThermalPointMass Creates a new ThermalPointMass
AddThickness Creates a new child Thickness.
CenterOfMass CenterOfMass method.
CopyTo Copies all visible properties from this object to another.
CreateParameter Creates a new parameter for a Property.
Duplicate Creates a copy of the current DataModelObject.
ExportParts ExportParts method.
FreezeMeshOnAllParts Run the FreezeMeshOnAllParts action.
GetBody Gets the Body associated with the given IGeoBody
GetChildren Gets the list of children, filtered by type.
GetParameter Gets the parameter corresponding to the given property.
GetPart Gets the Part associated with the given IGeoPart
GroupAllSimilarChildren Run the GroupAllSimilarChildren action.
GroupSimilarObjects Run the GroupSimilarObjects action.
InvertSuppressedBodySet Invert all parts Suppressed property.
PropertyByAPIName Get a property by its API name.
PropertyByName Get a property by its unique name.
RemoveParameter Removes the parameter from the parameter set corresponding to the given property.
ResetBodyColors Run the ResetBodyColors action.
UnfreezeMeshOnAllParts Run the UnfreezeMeshOnAllParts action.
UnsuppressAllBodies Unsuppress all the bodies that were suppressed.
UpdateGeometryFromSource Run the UpdateGeometryFromSource action.

Properties

Name Description
ActiveBodies Gets the ActiveBodies.
AnalysisType Gets the AnalysisType.
AssignMaterialOnUpdate Gets or sets the AssignMaterialOnUpdate.
AttachFileViaTempFile Gets or sets the AttachFileViaTempFile.
AttributeKey Gets the AttributeKey.
Attributes Gets the Attributes.
Average Gets the Average.
Bodies Gets the Bodies.
CanChangeCADUnits Gets the CanChangeCADUnits.
Children Gets the list of children.
Comments Gets the list of associated comments.
ComparePartsOnUpdate Gets the ComparePartsOnUpdate.
ComparePartsTolerance Gets the ComparePartsTolerance.
DataModelObjectCategory Gets the current DataModelObject’s category.
DecomposeDisjointGeometry Gets the DecomposeDisjointGeometry.
DisplayStyle Gets or sets the DisplayStyle.
ElementControl Gets or sets the ElementControl.
Elements Gets the Elements.
EnclosureAndSymmetryProcessing Gets the EnclosureAndSymmetryProcessing.
EndPlaneRotationAboutX Gets or sets the EndPlaneRotationAboutX.
EndPlaneRotationAboutY Gets or sets the EndPlaneRotationAboutY.
FiberLength Gets or sets the FiberLength.
Figures Gets the list of associated figures.
GeometryPreferencesReadOnly Gets the GeometryPreferencesReadOnly.
Images Gets the list of associated images.
ImportCoordinateSystems Gets the ImportCoordinateSystems.
InternalObject Gets the internal object. For advanced usage only.
LengthUnit Gets or sets the LengthUnit.
LengthX Gets the LengthX.
LengthY Gets the LengthY.
LengthZ Gets the LengthZ.
LineBodies Gets the LineBodies.
Mass Gets the Mass.
MaterialProperties Gets the MaterialProperties.
Maximum Gets the Maximum.
MeshMetric Gets the MeshMetric.
MeshVolume Gets the MeshVolume.
Minimum Gets the Minimum.
MixedImportResolution Gets the MixedImportResolution.
Model2DBehavior Gets or sets the Model2DBehavior.
NamedSelectionKey Gets the NamedSelectionKey.
NamedSelections Gets the NamedSelections.
Nodes Gets the Nodes.
ParameterKey Gets the ParameterKey.
Parameters Gets the Parameters.
Properties Gets the list of properties for this object.
ReaderModeSavesUpdatedFile Gets or sets the ReaderModeSavesUpdatedFile.
ScaleFactorValue Gets or sets the ScaleFactorValue.
SheetSurfaceArea Gets the SheetSurfaceArea.
SmartCADUpdate Gets the SmartCADUpdate.
SolidBodies Gets the SolidBodies.
Source Gets the Source.
StandardDeviation Gets the StandardDeviation.
SurfaceArea Gets the SurfaceArea.
SurfaceBodies Gets the SurfaceBodies.
TemporaryDirectory Gets or sets the TemporaryDirectory.
Tolerance2D Gets or sets the Tolerance2D.
Type Gets the Type.
UseAssociativity Gets the UseAssociativity.
UseInstances Gets the UseInstances.
VisibleProperties Gets the list of properties that are visible for this object.
Volume Gets the Volume.
XCentroid Gets the XCentroid.
YCentroid Gets the YCentroid.
ZCentroid Gets the ZCentroid.

Property detail

property Geometry.ActiveBodies : int | None

Gets the ActiveBodies.

property Geometry.AnalysisType : Ansys.Mechanical.DataModel.Enums.GeometryDimensionType | None

Gets the AnalysisType.

property Geometry.AssignMaterialOnUpdate : bool | None

Gets or sets the AssignMaterialOnUpdate.

property Geometry.AttachFileViaTempFile : bool | None

Gets or sets the AttachFileViaTempFile.

property Geometry.AttributeKey : str | None

Gets the AttributeKey.

property Geometry.Attributes : bool | None

Gets the Attributes.

property Geometry.Average : float | None

Gets the Average.

property Geometry.Bodies : int | None

Gets the Bodies.

property Geometry.CanChangeCADUnits : bool | None

Gets the CanChangeCADUnits.

property Geometry.Children : List[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets the list of children.

property Geometry.Comments : Iterable[Ansys.ACT.Automation.Mechanical.Comment] | None

Gets the list of associated comments.

property Geometry.ComparePartsOnUpdate : Ansys.Mechanical.DataModel.Enums.ComparePartsOnUpdateType | None

Gets the ComparePartsOnUpdate.

property Geometry.ComparePartsTolerance : Ansys.Mechanical.DataModel.Enums.ComparePartsToleranceType | None

Gets the ComparePartsTolerance.

property Geometry.DataModelObjectCategory : Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory | None

Gets the current DataModelObject’s category.

property Geometry.DecomposeDisjointGeometry : bool | None

Gets the DecomposeDisjointGeometry.

property Geometry.DisplayStyle : Ansys.Mechanical.DataModel.Enums.PrototypeDisplayStyleType | None

Gets or sets the DisplayStyle.

property Geometry.ElementControl : Ansys.Mechanical.DataModel.Enums.ElementControl | None

Gets or sets the ElementControl.

property Geometry.Elements : int | None

Gets the Elements.

property Geometry.EnclosureAndSymmetryProcessing : bool | None

Gets the EnclosureAndSymmetryProcessing.

property Geometry.EndPlaneRotationAboutX : Ansys.Core.Units.Quantity | None

Gets or sets the EndPlaneRotationAboutX.

property Geometry.EndPlaneRotationAboutY : Ansys.Core.Units.Quantity | None

Gets or sets the EndPlaneRotationAboutY.

property Geometry.FiberLength : Ansys.Core.Units.Quantity | None

Gets or sets the FiberLength.

property Geometry.Figures : Iterable[Ansys.ACT.Automation.Mechanical.Figure] | None

Gets the list of associated figures.

property Geometry.GeometryPreferencesReadOnly : bool | None

Gets the GeometryPreferencesReadOnly.

property Geometry.Images : Iterable[Ansys.ACT.Automation.Mechanical.Image] | None

Gets the list of associated images.

property Geometry.ImportCoordinateSystems : bool | None

Gets the ImportCoordinateSystems.

property Geometry.InternalObject : Ansys.Common.Interop.DSObjectsAuto.IDSPrototypeGroupAuto | None

Gets the internal object. For advanced usage only.

property Geometry.LengthUnit : Ansys.Mechanical.DataModel.Enums.WBUnitSystemType | None

Gets or sets the LengthUnit.

property Geometry.LengthX : Ansys.Core.Units.Quantity | None

Gets the LengthX.

property Geometry.LengthY : Ansys.Core.Units.Quantity | None

Gets the LengthY.

property Geometry.LengthZ : Ansys.Core.Units.Quantity | None

Gets the LengthZ.

property Geometry.LineBodies : bool | None

Gets the LineBodies.

property Geometry.Mass : Ansys.Core.Units.Quantity | None

Gets the Mass.

property Geometry.MaterialProperties : bool | None

Gets the MaterialProperties.

property Geometry.Maximum : float | None

Gets the Maximum.

property Geometry.MeshMetric : Ansys.Mechanical.DataModel.Enums.MeshMetricType | None

Gets the MeshMetric.

property Geometry.MeshVolume : Ansys.Core.Units.Quantity | None

Gets the MeshVolume.

property Geometry.Minimum : float | None

Gets the Minimum.

property Geometry.MixedImportResolution : Ansys.Mechanical.DataModel.Enums.SecondaryImportPrefType | None

Gets the MixedImportResolution.

property Geometry.Model2DBehavior : Ansys.Mechanical.DataModel.Enums.Model2DBehavior | None

Gets or sets the Model2DBehavior.

property Geometry.NamedSelectionKey : str | None

Gets the NamedSelectionKey.

property Geometry.NamedSelections : bool | None

Gets the NamedSelections.

property Geometry.Nodes : int | None

Gets the Nodes.

property Geometry.ParameterKey : str | None

Gets the ParameterKey.

property Geometry.Parameters : Ansys.Mechanical.DataModel.Enums.ImportParameterType | None

Gets the Parameters.

property Geometry.Properties : tuple[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties for this object.

property Geometry.ReaderModeSavesUpdatedFile : bool | None

Gets or sets the ReaderModeSavesUpdatedFile.

property Geometry.ScaleFactorValue : float | None

Gets or sets the ScaleFactorValue.

property Geometry.SheetSurfaceArea : Ansys.Core.Units.Quantity | None

Gets the SheetSurfaceArea.

property Geometry.SmartCADUpdate : bool | None

Gets the SmartCADUpdate.

property Geometry.SolidBodies : bool | None

Gets the SolidBodies.

property Geometry.Source : str | None

Gets the Source.

property Geometry.StandardDeviation : float | None

Gets the StandardDeviation.

property Geometry.SurfaceArea : Ansys.Core.Units.Quantity | None

Gets the SurfaceArea.

property Geometry.SurfaceBodies : bool | None

Gets the SurfaceBodies.

property Geometry.TemporaryDirectory : str | None

Gets or sets the TemporaryDirectory.

property Geometry.Tolerance2D : float | None

Gets or sets the Tolerance2D.

property Geometry.Type : str | None

Gets the Type.

property Geometry.UseAssociativity : bool | None

Gets the UseAssociativity.

property Geometry.UseInstances : bool | None

Gets the UseInstances.

property Geometry.VisibleProperties : tuple[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties that are visible for this object.

property Geometry.Volume : Ansys.Core.Units.Quantity | None

Gets the Volume.

property Geometry.XCentroid : Ansys.Core.Units.Quantity | None

Gets the XCentroid.

property Geometry.YCentroid : Ansys.Core.Units.Quantity | None

Gets the YCentroid.

property Geometry.ZCentroid : Ansys.Core.Units.Quantity | None

Gets the ZCentroid.

Method detail

Geometry.Activate()

Activate the current object.

Geometry.AddComment()

Creates a new child Comment.

Geometry.AddDistributedMass()

Creates a new DistributedMass

Geometry.AddElementOrientation()

Creates a new ElementOrientation

Geometry.AddFigure()

Creates a new child Figure.

Geometry.AddImage(filePath: str)

Creates a new child Image.
If a filePath is provided, the image will be loaded from that file,
if not, the image will be a screen capture of the Geometry window.

Geometry.AddImportedElementOrientationExternalData()

Creates a new Imported Element Orientation (External Data).

Geometry.AddImportedThicknessExternalData()

Creates a new Imported Thickness (External Data).

Geometry.AddLayeredSection()

Creates a new child LayeredSection.

Geometry.AddPointMass()

Creates a new PointMass

Geometry.AddSurfaceCoating()

Creates a new SurfaceCoating

Geometry.AddThermalPointMass()

Creates a new ThermalPointMass

Geometry.AddThickness()

Creates a new child Thickness.

Geometry.CenterOfMass(geoBodies: List[Ansys.ACT.Interfaces.Geometry.IBaseGeoBody], pointMasses: List[Ansys.ACT.Automation.Mechanical.PointMass], distributedMasses: List[Ansys.ACT.Automation.Mechanical.DistributedMass])

CenterOfMass method.

Geometry.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject)

Copies all visible properties from this object to another.

Geometry.CreateParameter(paramPath: str)

Creates a new parameter for a Property.

Geometry.Duplicate()

Creates a copy of the current DataModelObject.

Geometry.ExportParts(filePath: str, partIds: List[int])

ExportParts method.

Geometry.FreezeMeshOnAllParts()

Run the FreezeMeshOnAllParts action.

Geometry.GetBody(geoBody: Ansys.ACT.Interfaces.Geometry.IBaseGeoBody)

Gets the Body associated with the given IGeoBody

Geometry.GetChildren(recurses: bool, children: List[ChildrenType])

Gets the list of children, filtered by type.

Geometry.GetParameter(propName: str)

Gets the parameter corresponding to the given property.

Geometry.GetPart(geoPart: Ansys.ACT.Interfaces.Geometry.IBaseGeoPart)

Gets the Part associated with the given IGeoPart

Geometry.GroupAllSimilarChildren()

Run the GroupAllSimilarChildren action.

Geometry.GroupSimilarObjects()

Run the GroupSimilarObjects action.

Geometry.InvertSuppressedBodySet()

Invert all parts Suppressed property.

Geometry.PropertyByAPIName(name: str)

Get a property by its API name.
If multiple properties have the same API Name, only the first property with that name will be returned.

Geometry.PropertyByName(name: str)

Get a property by its unique name.

Geometry.RemoveParameter(paramPath: str)

Removes the parameter from the parameter set corresponding to the given property.

Geometry.ResetBodyColors()

Run the ResetBodyColors action.

Geometry.UnfreezeMeshOnAllParts()

Run the UnfreezeMeshOnAllParts action.

Geometry.UnsuppressAllBodies()

Unsuppress all the bodies that were suppressed.

Geometry.UpdateGeometryFromSource()

Run the UpdateGeometryFromSource action.