mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
107 lines
2.7 KiB
ReStructuredText
107 lines
2.7 KiB
ReStructuredText
####################
|
|
Direct API Reference
|
|
####################
|
|
|
|
The Direct API is an interface layer between the primary user interface API
|
|
(the Builders) and the OpenCascade (OCCT) API. This API is based on the CadQuery
|
|
Direct API (thank you to all of the CadQuery contributors that made this possible)
|
|
with the following major changes:
|
|
|
|
* PEP8 compliance
|
|
* New Axis class
|
|
* New ShapeList class enabling sorting and filtering of shape objects
|
|
* Literal strings replaced with Enums
|
|
|
|
*****************
|
|
Geometric Objects
|
|
*****************
|
|
The geometric classes defined by build123d are defined below. This parameters to the
|
|
CAD objects described in the following section are frequently of these types.
|
|
|
|
.. inheritance-diagram:: geometry
|
|
:parts: 1
|
|
|
|
.. py:module:: geometry
|
|
|
|
.. autoclass:: Axis
|
|
.. autoclass:: BoundBox
|
|
.. autoclass:: Color
|
|
.. autoclass:: Location
|
|
.. autoclass:: Matrix
|
|
.. autoclass:: Plane
|
|
.. autoclass:: Rotation
|
|
.. autoclass:: Vector
|
|
|
|
*******************
|
|
Topological Objects
|
|
*******************
|
|
The topological object classes defined by build123d are defined below.
|
|
|
|
Note that the :class:`~topology.Mixin1D` and :class:`~topology.Mixin3D` classes add
|
|
supplementary functionality specific to 1D
|
|
(:class:`~topology.Edge` and :class:`~topology.Wire`) and 3D (:class:`~topology.Compound` and
|
|
`~topology.Solid`) objects respectively.
|
|
Note that a :class:`~topology.Compound` may be contain only 1D, 2D (:class:`~topology.Face`) or 3D objects.
|
|
|
|
.. inheritance-diagram:: topology
|
|
:parts: 1
|
|
|
|
.. py:module:: topology
|
|
|
|
.. autoclass:: Compound
|
|
.. autoclass:: Edge
|
|
.. autoclass:: Face
|
|
.. autoclass:: Mixin1D
|
|
.. autoclass:: Mixin3D
|
|
.. autoclass:: Shape
|
|
.. autoclass:: ShapeList
|
|
.. autoclass:: Shell
|
|
.. autoclass:: Solid
|
|
.. autoclass:: Wire
|
|
.. autoclass:: Vertex
|
|
|
|
*************************
|
|
Importer/Exporter Objects
|
|
*************************
|
|
Methods and functions specific to exporting and importing build123d objects are defined below.
|
|
|
|
.. py:module:: topology
|
|
:noindex:
|
|
|
|
.. automethod:: Shape.export_brep
|
|
:noindex:
|
|
.. automethod:: Shape.export_dxf
|
|
:noindex:
|
|
.. automethod:: Shape.export_stl
|
|
:noindex:
|
|
.. automethod:: Shape.export_step
|
|
:noindex:
|
|
.. automethod:: Shape.export_stl
|
|
:noindex:
|
|
.. automethod:: Shape.export_svg
|
|
:noindex:
|
|
|
|
.. py:module:: importers
|
|
|
|
.. autofunction:: import_brep
|
|
.. autofunction:: import_step
|
|
.. autofunction:: import_stl
|
|
.. autofunction:: import_svg
|
|
.. autofunction:: import_svg_as_buildline_code
|
|
|
|
|
|
*************
|
|
Joint Objects
|
|
*************
|
|
Joint classes which are used to position Solid and Compound objects relative to each
|
|
other are defined below.
|
|
|
|
.. py:module:: topology
|
|
:noindex:
|
|
|
|
.. autoclass:: Joint
|
|
.. autoclass:: RigidJoint
|
|
.. autoclass:: RevoluteJoint
|
|
.. autoclass:: LinearJoint
|
|
.. autoclass:: CylindricalJoint
|
|
.. autoclass:: BallJoint
|