Skip to main content

A python wrapper for Ansys Geometry service

Project description

PyAnsys Python PyPI GH-CI Codecov MIT Black pre-commit.ci

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

To install the latest development version, run these commands:

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

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()

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


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.4.5.tar.gz (124.9 kB 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.4.5-py3-none-any.whl (229.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ansys_geometry_core-0.4.5.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for ansys_geometry_core-0.4.5.tar.gz
Algorithm Hash digest
SHA256 9e14aaa6b7aa495853e0d8864a53c9c473ccdb934676fe02a1446750cda81d74
MD5 c5f0065b9cd53358254a1c4fc343e0b5
BLAKE2b-256 6ddd073dd88ea7a388bed76dec48b80c22a76e7d046d65fd9098f7f226455862

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansys_geometry_core-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0699c1317d4491caaa2c4577be5531117a5219a13f21486fccdc8766db37b8d9
MD5 eee9b6fd8144e3d0660492b453d2b0fb
BLAKE2b-256 3f063ee7c0a0d1c6e433acee95d6e56fede754d699d99b6c640f8daf2cccdcbb

See more details on using hashes here.

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