Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Added

- `Helix(start, radius, pitch, turns, wire_radius, axis=..., left_handed=...)`: a helical
wire of round cross-section with hemispherical ends, e.g. the winding of an RF coil. Its
level set is the distance from the centreline (Newton steps along it from the
linearised minima of the nearest turns), exact within a wire radius of the wire and a
bound farther away; `centreline(t)`, `wire_length`, volume and surface area.
- `PolarRepeat(source, count, axis=..., origin=...)`: ``count`` copies of a 3D shape about
an axis, evaluated by folding the point's angle into the first sector, so its cost does
not grow with ``count`` (the slits of a Faraday shield: ``tube - PolarRepeat(slit, 24)``;
the cut cells of 24 slits as fast as of one).
- A Numerics section in the docs (header and sidebar): an overview of the geometry
(`docs/src/content/docs/numerics/index.mdx`, with the main cards) and one page per module,
from the shapes to the grids (starlight-theme's `methodcard: { pages: true }`).
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/getting-started/geometry-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ and where `level_set_exact` is true it is the Euclidean signed distance.
| `Aperture2D` | exact while the plates do not touch |
| `Cylinder`, `Tube`, `Cone`, `Torus` (any axis, with or without fillets) | exact |
| `SlantedTube` | the larger of the uncut tube's and the cut plane's: exact on the faces, a bound near the cut's rim |
| `Helix` | the distance from the centreline minus the wire's radius: exact within a wire radius of the wire, a bound farther away |
| `PolarRepeat` (copies about an axis) | the source's, the least over the point's sector and its two neighbours: a bound |
| `a \| b`, `a & b`, `a - b` | `min(a, b)`, `max(a, b)`, `max(a, -b)`: a bound, not exact |
| rotations, translations, reflections, uniform scaling | exact if the source is |
| nonuniform scaling, shears | the source's times the smallest stretch: a bound |
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/numerics/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ distances of boxes, segments, capped cones and tori:
[Tube](/simgeometry/numerics/objects-tube/), [Cone](/simgeometry/numerics/objects-cone/),
[Torus](/simgeometry/numerics/objects-torus/), and the
[SlantedTube](/simgeometry/numerics/objects-slanted-tube/), a bound near its cut;
- the [Helix](/simgeometry/numerics/objects-helix/), a helical wire (an RF coil), its
distance found by Newton steps along the centreline;
- [Booleans, affine transforms and sections](/simgeometry/numerics/operations/), whose level
sets are bounds, and [collections](/simgeometry/numerics/collection/) of labelled objects.

Expand Down
4 changes: 4 additions & 0 deletions src/simgeometry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Cylinder,
FunctionObject2D,
FunctionObject3D,
Helix,
Line,
Polygon,
Polyline,
Expand All @@ -26,6 +27,7 @@
Triangle,
Tube,
)
from simgeometry.operations import PolarRepeat
from simgeometry.simulation_domain import SimulationDomain

# simgeometry's regions stay off unless the application enables the "simgeometry" tag.
Expand All @@ -38,6 +40,7 @@
__all__ = [
"GeometryCollection",
"Grid",
"PolarRepeat",
"SimulationDomain",
"Aperture2D",
"Aperture3D",
Expand All @@ -47,6 +50,7 @@
"Cylinder",
"FunctionObject2D",
"FunctionObject3D",
"Helix",
"Line",
"Polygon",
"Polyline",
Expand Down
2 changes: 2 additions & 0 deletions src/simgeometry/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from simgeometry.objects.cuboid import Cuboid
from simgeometry.objects.cylinder import Cylinder
from simgeometry.objects.function_object import FunctionObject2D, FunctionObject3D
from simgeometry.objects.helix import Helix
from simgeometry.objects.line import Line
from simgeometry.objects.polygon import Polygon
from simgeometry.objects.polyline import Polyline
Expand All @@ -31,6 +32,7 @@
"Cylinder",
"FunctionObject2D",
"FunctionObject3D",
"Helix",
# 1D objects
"Line",
"Polygon",
Expand Down
Loading
Loading