Sketch extensions, persistent edge naming, undo/redo, colours and layers
Fourth pre-release. Sketches gain radii as solver unknowns and several contours, edges created by operations can be named and followed, feature histories support undo/redo, render and GLB draw placed assemblies, and STEP import and export handle colours and layers. Geometry features still need the native bridges, which the release zip does not contain.
Availability
- The GitHub release is a pre-release with a platform-independent, JVM-only CLI zip and a SHA-256 checksum. Nothing is published to Maven Central or Homebrew.
- Geometry, sketches and
kstep importneed the native bridges. The zip is built without them and reports a clear “unavailable” error; build from source with a system OpenCascade (Linux x86-64, or macOS arm64 via Homebrew) to use them.
Highlights
- Sketches: circle and arc radii can be solver unknowns, new constraints (radius, diameter, equal radius, tangent, angle) are available, a sketch is a re-solving step of the feature history, and several separate outer contours in one sketch become several bodies.
- Persistent naming: the edges an extrude, revolve, fillet, chamfer, boolean or hole generated can be addressed by what they are, so a parameter change keeps hitting the same logical edges. A feature history supports undo/redo.
- Placed assemblies in render:
kstep render,kstep asciidoc, the preview and GLB draw every instance of a placed assembly at its position. - Colours and layers: STEP export writes part and face colours and layer names;
kstep importreads them back.
Added
- Sketch extensions (ADR-0032): radii as solver unknowns (
fixedRadius = false), the constraintsradius,diameter,equalRadius,tangent(line/circle and circle/circle) andangle, andSolvedSketch.radius(ref).SketchFeaturemakes a parametric sketch a step of a feature history that is re-solved on rebuild. - Several separate outer contours in one sketch become several bodies in one shape (at most 32). STEP export writes them as one representation with several solids;
kstep importreports them per body. - Persistent naming of generated edges (ADR-0033):
GeneratedEdgesaddresses the edges an extrude or revolve generated from profile or sketch sources. ADR-0034 extends this to edges generated by fillet, chamfer, boolean and hole. Naming is strict: a source without an image or a wrong count is an error (KSTEP-S-011in scripts). - Undo/redo:
FeatureHistorywith add, remove, replace and move over immutable snapshots. - Placement-aware render, preview and GLB (ADR-0035). The JSON output gains
geometry.instanceCountandgeometry.distinctShapeCount; an invalid placement becomes aplacement_invalidnotice card. Limits: 4096 instances, depth 64. - Mirror and scale as shape operations (ADR-0036), including steps in the feature history that keep named edges. The scale factor lies within 1e-6 to 1e6.
OcctKernel.compoundcombines separate bodies into one shape (at most 32). - Face and vertex selection and
nearest(point)(ADR-0037):Faces.all,Faces.nearest,Vertices.*,Edges.nearest(smallest geometric distance, ties are all returned). shell(...)hollows a solid with a positive wall thickness inward or outward. An edge named before an inward shell is followed through it; an outward shell cannot be tracked and is refused with the reason. The wall must be thinner than half the smallest extent, the input has at most 200 faces. Needs one more OpenCascade toolkit,TKOffset.- Import of colours, layers and units (ADR-0038):
kstep importreports colour (sRGB) and layers per part, per body and per styled face, the declared length unit and a presentation summary. New errorKSTEP-I-013(unit cannot be resolved). - Export of colours and layers (ADR-0039):
shape(...),style(...)andstyleFaces(...)give a part or single faces an sRGB colour and a layer name.kstep rendershows the part colour (SVG, PNG, GLB). New codesKSTEP-S-012toKSTEP-S-015. Parts without a style are written exactly as before.
Changed
kstep importruns the import in a supervised worker process (ADR-0038). A timeout (60 s), an out-of-memory error or an output overflow becomelimit_exceeded(KSTEP-I-010); a crash or incomplete report becomesread_failed(KSTEP-I-009). With--output json, stdout is always exactly one JSON document. Cost: about 0.08 s per import.- A representation without any B-Rep is now
no_content(KSTEP-I-011) instead of a part with volume 0. - Breaking (source):
GeneratedRolehas new values, so an exhaustivewhenin third-party code needs new branches;SolvedSketch.extrudeFeatureandrevolveFeaturenow returnFeature. - Documentation: the README is a short entry point; the details moved into focused documents under
docs/.
Fixed
- Export: a part colour together with a face colour no longer aborts with “unexpected entity OVER_RIDING_STYLED_ITEM”.
- Import: files crafted to make OpenCascade run for a very long time or crash (very deep product structures, assembly “diamonds”, huge numbers of layers, colours or styled items, override and mapped-item chains) now end in a structured error, mostly within a second. A length unit with conversion factor 0 no longer yields geometry of size 1e100.
Limitations
- Pre-release. The release zip is JVM-only and contains no native bridges, so geometry, sketches, import and the new naming and selection features need a local build with a system OpenCascade. Nothing is on Maven Central or Homebrew.
- PMI is not supported. A pocket or hole from a face, draft and thickening are open (planned as Q2). The inner wall of a shell cannot be named.
- Not exported: transparency, edge and curve colours, instance colours of assembly components. Face colours and layers are not drawn in the preview or GLB; layer names are limited to printable ASCII.
- Interoperability is verified with OpenCascade-based readers (OpenCascade’s typed reader and FreeCAD) only. Windows and Intel Macs are not covered.
- The worker process protects only the
kstep importcommand. Library callers of the importer run in-process without a time or memory bound, and the MCP server has no import tool. A native memory failure inside OpenCascade is a crash that is reported asread_failed.