Skip to main content

A python wrapper for Ansys Geometry service

Project description

PyAnsys Geometry

PyAnsys Python MIT Ruff Codecov GH-CI pre-commit PyPI PyPI Downloads Conda Conda Downloads Ask DeepWiki Codacy Badge

Overview

PyAnsys Geometry is a Python client library for the Ansys Geometry service, as well as other CAD Ansys products such as Ansys Discovery and Ansys SpaceClaim.

Installation

You can use pip to install PyAnsys Geometry.

pip install ansys-geometry-core

Or, using uv:

uv add ansys-geometry-core

For optional graphics support (PyVista, VTK, pygltflib), install the graphics extra. To include all optional dependencies, use the all extra instead:

pip install "ansys-geometry-core[graphics]"
pip install "ansys-geometry-core[all]"
uv add "ansys-geometry-core[graphics]"
uv add "ansys-geometry-core[all]"

You can also install PyAnsys Geometry from Conda-Forge:

conda install -c conda-forge ansys-geometry-core

To install the latest development version, run these commands:

Using pip:

git clone https://github.com/ansys/pyansys-geometry
cd pyansys-geometry
pip install -e .

Using uv:

git clone https://github.com/ansys/pyansys-geometry
cd pyansys-geometry
uv sync

For more information, see Getting Started.

Basic usage

This code shows how to import PyAnsys Geometry and use some basic capabilities:

from ansys.geometry.core import launch_modeler
from ansys.geometry.core.math import Plane, Point3D, Point2D
from ansys.geometry.core.misc import UNITS, Distance
from ansys.geometry.core.sketch import Sketch

# Define a sketch
origin = Point3D([0, 0, 10])
plane = Plane(origin, direction_x=[1, 0, 0], direction_y=[0, 1, 0])

# Create a sketch
sketch = Sketch(plane)
sketch.circle(Point2D([1, 1]), 30 * UNITS.m)
sketch.plot()

# Start a modeler session
modeler = launch_modeler()

# Create a design
design = modeler.create_design("ModelingDemo")

# Create a body directly on the design by extruding the sketch
body = design.extrude_sketch(
    name="CylinderBody", sketch=sketch, distance=Distance(80, unit=UNITS.m)
)

# Plot the body
design.plot()

# Export the model to SCDOCX format
file_path = design.export_to_scdocx()

For comprehensive usage information, see Examples in the PyAnsys Geometry documentation.

Documentation and issues

Documentation for the latest stable release of PyAnsys Geometry is hosted at PyAnsys Geometry documentation.

In the upper right corner of the documentation’s title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.

On the PyAnsys Geometry Issues page, you can create issues to report bugs and request new features. On the PyAnsys Geometry Discussions page or the Discussions page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email pyansys.core@ansys.com.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_geometry_core-0.16.1.tar.gz (22.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_geometry_core-0.16.1-py3-none-any.whl (532.5 kB view details)

Uploaded Python 3

File details

Details for the file ansys_geometry_core-0.16.1.tar.gz.

File metadata

  • Download URL: ansys_geometry_core-0.16.1.tar.gz
  • Upload date:
  • Size: 22.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ansys_geometry_core-0.16.1.tar.gz
Algorithm Hash digest
SHA256 6d984e4381bcc70060b9b322536cd5716230d0cc9d36e391615cf7a0638131a3
MD5 819367bd3e5c883d36635dce4ff99483
BLAKE2b-256 8a54bd520990d73a54a386f7687c59f8d56a1f96ded5094bdfc56a196b7a5add

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_geometry_core-0.16.1.tar.gz:

Publisher: ci_cd.yml on ansys/pyansys-geometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_geometry_core-0.16.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_geometry_core-0.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 014f86ee48bdb2568ca5c023da7129e49e55ff8361bd653cda28cd640b5131b4
MD5 b5701b2290e03ec195e788b39ce7cfdf
BLAKE2b-256 f4e0cf2af49c94b0c00a73fef57f2fcd56f5bdcae51c97a07028bb55b8346c97

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_geometry_core-0.16.1-py3-none-any.whl:

Publisher: ci_cd.yml on ansys/pyansys-geometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page