Expand description
§FerroCAD Part workbench (ferrocad_part)
The first module built on the document-object SPI. It registers two things with
ferrocad_core:
Part::Feature— an object type with aShapeand aPlacement, viaferrocad_core::object_registry::ObjectType;Part::Fillet/Part::Chamfer— parametric dress-up features whoseexecuteresolves their selected edge names through the base shape’s lineage first and the backend’s positional names second, expands them to tangent chains, and writes the rebuilt shape to their outputShape;Part::PropertyPartShape— a property value type holding aferrocad_geom::Shape, via [ferrocad_core::extension];Part::PropertyTopoShapeList— the list counterpart, holding an orderedVec<Shape>(upstreamPropertyTopoShapeList).
Part depends only on the seam (ferrocad_geom), never on a concrete kernel:
the application composes it with one — ferrocad_part::register(Arc::new(OcctBackend::new())).
That is what lets the kernel be replaced (or swapped per edition) without touching
Part, and keeps ferrocad_core geometry-agnostic. See docs/architecture/occt-integration.md.
§Building
The library needs no kernel. Its tests use OCCT through a dev-dependency, so they still need OCCT 7.8+; the crate is not a default member.
Re-exports§
pub use ferrocad_curves;
Structs§
- Shape
List Property - A list of kernel shapes, held as a
Property::Extension(upstreamPart::PropertyTopoShapeList). - Shape
Property - A shape-valued property.
Enums§
- Resolve
Element Error - Why a stored sub-element name could not be turned into a kernel sub-shape.
Constants§
- BOX_
TYPE Part::Box: a parametric box (Length×Width×Height).- CHAMFER_
TYPE Part::Chamfer’s registered type id.- COMMON_
TYPE - COMPOUND_
TYPE - CONE_
TYPE Part::Cone:Radius1at the base,Radius2atHeight, along the placement’s Z axis.- CUT_
TYPE - CYLINDER_
TYPE Part::Cylinder:Radius×Height, growing along the placement’s Z axis.- FILLET_
TYPE Part::Fillet’s registered type id.- FUSE_
TYPE - MULTICOMMON_
TYPE - MULTIFUSE_
TYPE - REGULAR_
POLYGON_ TYPE Part::RegularPolygon: a closed wire ofPolygonedges atCircumradius.- SHAPE_
LIST_ TYPE_ NAME - The registered type name of the shape-list property.
- SPHERE_
TYPE Part::Sphere: a sphere ofRadiuscentred on the placement’s base.- TYPE_
NAME - The registered property type name.
Functions§
- backend
- The injected geometry backend.
- make_
box - A convenience box from the injected backend (what a script’s
Part.makeBoxcalls). - make_
shape_ list_ property - Wrap a
ShapeListPropertyas aProperty::Extensionvalue. - make_
shape_ property - Wrap a
ShapePropertyas aProperty::Extensionvalue. - register
- Compose Part with a geometry backend and register its types. Idempotent; an application calls this once at startup with the kernel it wants.
- resolve_
element_ in - Resolve
nameagainstshape, consultinglineagefirst. - shape_
list_ of - Borrow the
ShapeListPropertyinsideproperty, if it is one. - shape_
of - Borrow the
ShapePropertyinsideproperty, if it is one.