mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
Minor docs improvements
This commit is contained in:
parent
137fce07ca
commit
944f9a5c7d
3 changed files with 38 additions and 34 deletions
|
|
@ -200,28 +200,28 @@ Cheat Sheet
|
|||
|
||||
.. card:: Enums
|
||||
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Align` | MIN, CENTER, MAX |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.ApproxOption`| ARC, NONE, SPLINE |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.ApproxOption` | ARC, NONE, SPLINE |
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.CenterOf` | GEOMETRY, MASS, BOUNDING_BOX |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.FontStyle` | REGULAR, BOLD, ITALIC |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.GeomType` | BEZIER, BSPLINE, CIRCLE, CONE, CYLINDER, ELLIPSE, EXTRUSION, HYPERBOLA, LINE, OFFSET, OTHER, PARABOLA, PLANE, REVOLUTION, SPHERE, TORUS |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Keep` | TOP, BOTTOM, BOTH |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Kind` | ARC, INTERSECTION, TANGENT |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Mode` | ADD, SUBTRACT, INTERSECT, REPLACE, PRIVATE |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Select` | ALL, LAST |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.SortBy` | LENGTH, RADIUS, AREA, VOLUME, DISTANCE |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Transition` | RIGHT, ROUND, TRANSFORMED |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :class:`~build_enums.Until` | NEXT, LAST |
|
||||
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ Note that a :class:`~topology.Compound` may be contain only 1D, 2D (:class:`~top
|
|||
.. autoclass:: Wire
|
||||
.. autoclass:: Vertex
|
||||
|
||||
*************************
|
||||
Importer/Exporter Objects
|
||||
*************************
|
||||
*************
|
||||
Import/Export
|
||||
*************
|
||||
Methods and functions specific to exporting and importing build123d objects are defined below.
|
||||
|
||||
.. py:module:: topology
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ from __future__ import annotations
|
|||
import logging
|
||||
from math import degrees, pi, radians
|
||||
from typing import (
|
||||
Any,
|
||||
Optional,
|
||||
Sequence,
|
||||
Tuple,
|
||||
|
|
@ -1749,14 +1750,15 @@ class Plane:
|
|||
return axis
|
||||
|
||||
def _to_from_local_coords(
|
||||
self, obj: Union[VectorLike, "Shape", BoundBox], to_from: bool = True
|
||||
self, obj: Union[VectorLike, Any, BoundBox], to_from: bool = True
|
||||
):
|
||||
"""_to_from_local_coords
|
||||
|
||||
Reposition the object relative to this plane
|
||||
|
||||
Args:
|
||||
obj (Union[VectorLike, Shape, BoundBox]): an object to reposition
|
||||
obj (Union[VectorLike, Shape, BoundBox]): an object to reposition. Note that
|
||||
type Any refers to all topological classes.
|
||||
to_from (bool, optional): direction of transformation. Defaults to True (to).
|
||||
|
||||
Raises:
|
||||
|
|
@ -1788,11 +1790,12 @@ class Plane:
|
|||
)
|
||||
return return_value
|
||||
|
||||
def to_local_coords(self, obj: Union[VectorLike, "Shape", BoundBox]):
|
||||
def to_local_coords(self, obj: Union[VectorLike, Any, BoundBox]):
|
||||
"""Reposition the object relative to this plane
|
||||
|
||||
Args:
|
||||
obj: Union[VectorLike, Shape, BoundBox] an object to reposition
|
||||
obj: Union[VectorLike, Shape, BoundBox] an object to reposition. Note that
|
||||
type Any refers to all topological classes.
|
||||
|
||||
Returns:
|
||||
an object of the same type, but repositioned to local coordinates
|
||||
|
|
@ -1800,11 +1803,12 @@ class Plane:
|
|||
"""
|
||||
return self._to_from_local_coords(obj, True)
|
||||
|
||||
def from_local_coords(self, obj: Union[tuple, Vector, "Shape", BoundBox]):
|
||||
def from_local_coords(self, obj: Union[tuple, Vector, Any, BoundBox]):
|
||||
"""Reposition the object relative from this plane
|
||||
|
||||
Args:
|
||||
obj: Union[VectorLike, Shape, BoundBox] an object to reposition
|
||||
obj: Union[VectorLike, Shape, BoundBox] an object to reposition. Note that
|
||||
type Any refers to all topological classes.
|
||||
|
||||
Returns:
|
||||
an object of the same type, but repositioned to world coordinates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue