Skip to content

Commit

Permalink
Feat/adaptive templates geometry classes (#153)
Browse files Browse the repository at this point in the history
* Initial commit

* add api methods

* add api methods

* add example spec

* change format of coordinates

* Added conversion to JSON format for geometry regions

* Added save adaptive script functionality

* Updated new functionality docstrings

* Refactored json entity conversion procedure names

* Added tests for new functionality

* ignore version flag

* Update tests and docs

* formatting

* Added check_collisons API call

* Updated check_collision API

* Review changes

* Updated tests

* Minor fix to test

* Added Coordinate class

* tidy up doc strings

* error message changed - make assert less strict

---------

Co-authored-by: JackDavies <[email protected]>
  • Loading branch information
matthewAnsys and jgsdavies authored Aug 17, 2023
1 parent 50fa122 commit 345cf1c
Show file tree
Hide file tree
Showing 11 changed files with 1,020 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
- id: pydocstyle
additional_dependencies: [toml]
exclude: tests/|examples/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions doc/source/methods/MotorCAD_object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ MotorCAD API
_autogen_FEA Geometry
_autogen_General
_autogen_Geometry
_autogen_Adaptive Geometry
_autogen_Graphs
_autogen_Internal Scripting
_autogen_Lab
Expand Down
2 changes: 2 additions & 0 deletions doc/source/methods/autofill_function_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def generate_method_docs():
"FEA Geometry",
"General",
"Geometry",
"Adaptive Geometry",
"Graphs",
"Internal Scripting",
"Lab",
Expand All @@ -29,6 +30,7 @@ def generate_method_docs():
"rpc_methods_fea_geometry.py",
"rpc_methods_general.py",
"rpc_methods_geometry.py",
"adaptive_geometry.py",
"rpc_methods_graphs.py",
"rpc_methods_internal_scripting.py",
"rpc_methods_lab.py",
Expand Down
22 changes: 22 additions & 0 deletions doc/source/methods/geometry_functions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. currentmodule:: ansys.motorcad.core.geometry
Adaptive Geometry
=================
Add some info here about adaptive geometry


Geometry Objects
----------------
.. autosummary::
:toctree: _autosummary_geometry_methods

Region
Line
Arc

Geometry Functions
------------------
.. autosummary::
:toctree: _autosummary_geometry_functions

xy_to_rt
rt_to_xy
5 changes: 3 additions & 2 deletions doc/source/methods/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ API reference
=============

Motor-CAD API
------------
-------------

The ``MotorCAD`` object is used by default for PyMotorCAD scripting.
For descriptions of this object's single class and its many methods,
see :ref:`ref_MotorCAD_object`.

Motor-CAD compatibility API
--------------------------
---------------------------

The ``MotorCADCompatibility`` object is used for running old ActiveX
scripts. For information on backwards compatibility, see
Expand All @@ -29,3 +29,4 @@ object, its single class, and its many methods, see

MotorCAD_object
MotorCADCompatibility_object
geometry_functions
Loading

0 comments on commit 345cf1c

Please sign in to comment.