Skip to main content

Crate rscad_openscad

Crate rscad_openscad 

Source

Modules§

bool
bool vector mask types.
boolean
color
container
degrees
dynamic
Dynamically-typed CSG object tree.
eval
OpenSCAD evaluator: parsed AST → rscad_core::DynamicObject scene.
export
f32
f32 vector, quaternion and matrix types.
f64
f64 vector, quaternion and matrix types.
feature
Sub-object (face/edge) topology for direct modeling.
geometric
i8
i8 vector types.
i16
i16 vector types.
i32
i32 vector types.
i64
i64 vector types.
import
isize
isize vector types.
material
PBR surface-finish material data.
objects
operations
sketch
2D sketch data model: points, entities (lines, circles, arcs), and constraints, plus closed-profile extraction for the CSG backends.
swizzles
Traits adding swizzle methods to all vector types.
transformations
u8
u8 vector types.
u16
u16 vector types.
u32
u32 vector types.
u64
u64 vector types.
usize
usize vector types.

Structs§

Affine2
A 2D affine transform, which can represent translation, rotation, scaling and shear.
Affine3
A 3D affine transform, which can represent translation, rotation, scaling and shear.
Affine3A
A 3D affine transform, which can represent translation, rotation, scaling and shear.
ArrayContainer
BVec2
A 2-dimensional bool vector mask.
BVec3
A 3-dimensional bool vector mask.
BVec4
A 4-dimensional bool vector mask.
BVec3A
A 3-dimensional SIMD vector mask.
BVec4A
A 4-dimensional SIMD vector mask.
Centered
Circle
Creates a circle at origin
CircularEdge
A verified full-circle edge (rim), in frame coordinates.
Color
Colored
CsgLeaves
Flattened analytic model of one tree: primitive leaves + boolean structure.
Cube
Cylinder
DAffine2
A 2D affine transform, which can represent translation, rotation, scaling and shear.
DAffine3
A 3D affine transform, which can represent translation, rotation, scaling and shear.
DMat2
A 2x2 column major matrix.
DMat3
A 3x3 column major matrix.
DMat4
A 4x4 column major matrix.
DQuat
A quaternion representing an orientation.
DVec2
A 2-dimensional vector.
DVec3
A 3-dimensional vector.
DVec4
A 4-dimensional vector.
Degrees
Difference
Direction
EdgeFeatureData
Payload of an EdgeFeature node: which edges to feature and how. Edges are re-resolved against the current child geometry every evaluation, so the feature follows parameter edits; unresolvable edges are skipped.
EdgeSel
An edge, identified as the intersection curve of two faces. Stored in canonical (sorted) order so the same edge always compares equal.
Empty
Error
ExtractedTransforms
Result of peeling off top-level transforms from a DynamicObject tree.
FaceRef
A face of a specific leaf, addressed structurally (survives node-id churn and scene save/load).
GeomLeaf
A primitive leaf with its accumulated world transform.
HitBoundary
One surface crossing along a ray.
HitSpan
A solid stretch of the ray: enter.t < exit.t.
I8Vec2
A 2-dimensional vector.
I8Vec3
A 3-dimensional vector.
I8Vec4
A 4-dimensional vector.
I16Vec2
A 2-dimensional vector.
I16Vec3
A 3-dimensional vector.
I16Vec4
A 4-dimensional vector.
I64Vec2
A 2-dimensional vector.
I64Vec3
A 3-dimensional vector.
I64Vec4
A 4-dimensional vector.
ISizeVec2
A 2-dimensional vector.
ISizeVec3
A 3-dimensional vector.
ISizeVec4
A 4-dimensional vector.
IVec2
A 2-dimensional vector.
IVec3
A 3-dimensional vector.
IVec4
A 4-dimensional vector.
Intersection
LeafPath
Structural address of a leaf inside a subtree, independent of node ids.
LowerReport
What a lowering pass did — callers log/report the skip count.
LoweredMasks
Masks for one lowering pass, in the child’s frame: sub cuts material (chamfers, convex fillets), add fills it in (concave ring fillets).
Mat2
A 2x2 column major matrix.
Mat3
A 3x3 column major matrix.
Mat4
A 4x4 column major matrix.
Mat3A
A 3x3 column major matrix.
MaterialData
Surface-finish parameters for a PBR material, applied by the Material wrapper node.
Mirror
Offset
Pattern
PatternCircular
PatternLinear
PatternRuntime
Plane
Point2D
Point3D
Polygon
A polygon with a fixed number of points. Now openscad uses points to initialize polygons which is fine but not very ergonomic.
PolygonDynamic
Profile
Closed profile loops extracted from a sketch, ready for the CSG backends.
Projection
Quat
A quaternion representing an orientation.
Radians
Report
Contains a [Frame] stack consisting of Error contexts and attachments.
Rotate
Scale
SceneFile
A scene file containing one or more named CSG trees.
SketchData
A 2D sketch: points, entities, and the constraints between them.
SketchEntity
SketchIntersection
An intersection between two entities, as found by SketchData::nearest_intersection.
SketchPoint
A free point in sketch coordinates.
Sphere
Square
StraightEdge
A verified straight edge on the final solid, in the evaluation frame.
Translate
TwoContainer
U8Vec2
A 2-dimensional vector.
U8Vec3
A 3-dimensional vector.
U8Vec4
A 4-dimensional vector.
U16Vec2
A 2-dimensional vector.
U16Vec3
A 3-dimensional vector.
U16Vec4
A 4-dimensional vector.
U64Vec2
A 2-dimensional vector.
U64Vec3
A 3-dimensional vector.
U64Vec4
A 4-dimensional vector.
USizeVec2
A 2-dimensional vector.
USizeVec3
A 3-dimensional vector.
USizeVec4
A 4-dimensional vector.
UVec2
A 2-dimensional vector.
UVec3
A 3-dimensional vector.
UVec4
A 4-dimensional vector.
Union
Vec2
A 2-dimensional vector.
Vec3
A 3-dimensional vector.
Vec4
A 4-dimensional vector.
Vec3A
A 3-dimensional vector.
Xor

Enums§

Axis
Convexity
Whether material bends away from (convex) or wraps around (concave) an edge, on the final solid.
CsgExpr
Boolean structure over leaf indices into CsgLeaves::leaves.
DynamicObject
A dynamically-typed CSG object node.
EdgeFeatureKind
Which feature an EdgeFeature node applies to its edges.
EdgeGeom
Resolved edge geometry, in the evaluation frame.
EdgeReject
Why an edge candidate did not resolve. Frontends surface message verbatim.
EulerRot
Euler rotation sequences.
FaceTag
A face of a supported primitive, named in the primitive’s local frame.
LeafPrim
A supported primitive in its local frame.
OffsetType
PatternType
SketchConstraint
Geometric constraints between sketch points and entities.
SketchEntityKind
Geometry carried by a sketch entity.

Constants§

DEFAULT_ARC_SEGMENTS
Default tessellation density (segments per full circle) used when a consumer has no better setting.
DEFAULT_METALLIC
Default metallic factor applied when no material is assigned.
DEFAULT_ROUGHNESS
Default perceptual roughness applied when no material is assigned.

Traits§

Angle
AsDegrees
AsRadians
CenterObject
CircleExt
ColorExt
ColorFormat
ColorObject
CubeInit
DifferenceObject
ErrorCC
FloatExt
A trait for extending f32 and f64 with extra methods.
IntersectionObject
LinearPatternObject
MirrorObject
Number
Object
OffsetObject
OpenscadCodegen
ProjectionObject
ResultExt
Extension trait for Result to provide context information on Reports.
RotateObject
ScaleObject
SquareExt
ThreeDimensional
ToDynamic
Convert a statically-typed rscad-core object into a DynamicObject.
Transformation
TranslateObject
TwoContainerObject
TwoDimensional
UnionObject
Vec2Swizzles
Vec3Swizzles
Vec4Swizzles
XorObject

Functions§

bvec2
Creates a 2-dimensional bool vector mask.
bvec3
Creates a 3-dimensional bool vector mask.
bvec4
Creates a 4-dimensional bool vector mask.
bvec3a
Creates a 3-dimensional bool vector mask.
bvec4a
Creates a 4-dimensional bool vector mask.
csg_aabb
Evaluation-frame AABB over every leaf (probe scaling).
dmat2
Creates a 2x2 matrix from two column vectors.
dmat3
Creates a 3x3 matrix from three column vectors.
dmat4
Creates a 4x4 matrix from four column vectors.
dquat
Creates a quaternion from x, y, z and w values.
dvec2
Creates a 2-dimensional vector.
dvec3
Creates a 3-dimensional vector.
dvec4
Creates a 4-dimensional vector.
i8vec2
Creates a 2-dimensional vector.
i8vec3
Creates a 3-dimensional vector.
i8vec4
Creates a 4-dimensional vector.
i16vec2
Creates a 2-dimensional vector.
i16vec3
Creates a 3-dimensional vector.
i16vec4
Creates a 4-dimensional vector.
i64vec2
Creates a 2-dimensional vector.
i64vec3
Creates a 3-dimensional vector.
i64vec4
Creates a 4-dimensional vector.
isizevec2
Creates a 2-dimensional vector.
isizevec3
Creates a 3-dimensional vector.
isizevec4
Creates a 4-dimensional vector.
ivec2
Creates a 2-dimensional vector.
ivec3
Creates a 3-dimensional vector.
ivec4
Creates a 4-dimensional vector.
leaf_face_tags
Face tags a leaf primitive exposes (candidate enumeration).
leaf_flipped
Per-leaf orientation: true when the leaf sits under an odd number of Difference subtrahend positions, so its surfaces bound the final solid with inverted normals (hole walls).
lower
Lower data against child: subtract the cut masks, union the fill masks, or pass the child through unchanged when nothing resolves.
lower_masks
The masks for data against child, in the child’s frame. Unresolvable/unsupported edges are skipped and counted.
mat2
Creates a 2x2 matrix from two column vectors.
mat3
Creates a 3x3 matrix from three column vectors.
mat4
Creates a 4x4 matrix from four column vectors.
mat3a
Creates a 3x3 matrix from three column vectors.
profile_loops
Extract closed loops from the sketch’s lines and arcs (chained through shared or Coincident endpoints) plus standalone circles.
quat
Creates a quaternion from x, y, z and w values.
resolve_edge
Resolve the edge where faces (leaf_a, face_a) and (leaf_b, face_b) meet on the final solid. See the module docs for what resolves and why things reject.
signed_area
Signed loop area (positive = counter-clockwise = outer boundary after profile_loops normalization).
u8vec2
Creates a 2-dimensional vector.
u8vec3
Creates a 3-dimensional vector.
u8vec4
Creates a 4-dimensional vector.
u16vec2
Creates a 2-dimensional vector.
u16vec3
Creates a 3-dimensional vector.
u16vec4
Creates a 4-dimensional vector.
u64vec2
Creates a 2-dimensional vector.
u64vec3
Creates a 3-dimensional vector.
u64vec4
Creates a 4-dimensional vector.
usizevec2
Creates a 2-dimensional vector.
usizevec3
Creates a 3-dimensional vector.
usizevec4
Creates a 4-dimensional vector.
uvec2
Creates a 2-dimensional vector.
uvec3
Creates a 3-dimensional vector.
uvec4
Creates a 4-dimensional vector.
vec2
Creates a 2-dimensional vector.
vec3
Creates a 3-dimensional vector.
vec4
Creates a 4-dimensional vector.
vec3a
Creates a 3-dimensional vector.

Type Aliases§

AabbHint
Callback supplying a conservative local-space AABB for a subtree this module cannot evaluate analytically (sketch/extrude/revolve/offset based). Returning None drops the subtree from the model (it stops occluding).
Heptagon
Hexagon
Octagon
Pentagon
Result
SketchId
Stable identifier for sketch points and entities (one shared id space).
SquarePolygon
Triangle