Git Product home page Git Product logo

pyansys-geometry's Introduction

PyAnsys Geometry

PyAnsys Python MIT Ruff Codecov GH-CI pre-commit.ci PyPI PyPI Downloads Conda Conda Downloads

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.

You can use pip to install PyAnsys Geometry.

pip install ansys-geometry-core

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:

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

For more information, see Getting Started.

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 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 [email protected].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.