construction.revolve
construction.revolve
Revolve a 2D profile around its sketch plane’s Y axis into a solid SDF.
Functions
| Name | Description |
|---|---|
| revolve | Revolve a polygon profile around the sketch plane’s local Y axis. |
revolve
construction.revolve.revolve(profile, offset=0.0, material=None)
Revolve a polygon profile around the sketch plane’s local Y axis.
Profile coordinates are (radial, height): X is the distance from the revolution axis (plus offset), Y runs along the axis. Generates a :class:~cadjoint.sdf.primitives.polygon.RevolvedPolygon sharing the profile’s vertex parameters, placed on the profile’s sketch plane.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| profile | PolygonProfile | PolygonProfile to revolve; should stay at positive radius. | required |
| offset | float | Scalar | Radial offset added before revolving. | 0.0 |
| material | Optional render material. | None |
Returns
| Name | Type | Description |
|---|---|---|
SDF solid sharing parameter references with the construction tree. A surface of revolution has no planar face to name, so solid.faces is empty and the usable reference is solid.axis — the world-space :class:~cadjoint.construction.faces.Axis it was swept around. For a plane on the curved wall, use :meth:~cadjoint.construction.sketch.SketchPlane.tangent. |
Example
# A washer: square cross-section revolved at radius 1.2
profile = PolygonProfile([[1.0, -0.2], [1.4, -0.2], [1.4, 0.2], [1.0, 0.2]])
ring = revolve(profile)