GitHubGitHub Stars
v0.3.02026-10-24Pre-releaseCurrent

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 import need 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 import reads them back.

Added

  • Sketch extensions (ADR-0032): radii as solver unknowns (fixedRadius = false), the constraints radius, diameter, equalRadius, tangent (line/circle and circle/circle) and angle, and SolvedSketch.radius(ref). SketchFeature makes 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 import reports them per body.
  • Persistent naming of generated edges (ADR-0033): GeneratedEdges addresses 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-011 in scripts).
  • Undo/redo: FeatureHistory with add, remove, replace and move over immutable snapshots.
  • Placement-aware render, preview and GLB (ADR-0035). The JSON output gains geometry.instanceCount and geometry.distinctShapeCount; an invalid placement becomes a placement_invalid notice 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.compound combines 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 import reports colour (sRGB) and layers per part, per body and per styled face, the declared length unit and a presentation summary. New error KSTEP-I-013 (unit cannot be resolved).
  • Export of colours and layers (ADR-0039): shape(...), style(...) and styleFaces(...) give a part or single faces an sRGB colour and a layer name. kstep render shows the part colour (SVG, PNG, GLB). New codes KSTEP-S-012 to KSTEP-S-015. Parts without a style are written exactly as before.

Changed

  • kstep import runs the import in a supervised worker process (ADR-0038). A timeout (60 s), an out-of-memory error or an output overflow become limit_exceeded (KSTEP-I-010); a crash or incomplete report becomes read_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): GeneratedRole has new values, so an exhaustive when in third-party code needs new branches; SolvedSketch.extrudeFeature and revolveFeature now return Feature.
  • 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 import command. 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 as read_failed.
v0.2.02026-10-22Pre-release

Geometry export and import, sketches, edge selection

Third pre-release. kSTEP now exports placed assembly geometry, reads STEP files back, and gains boolean operations, a sketch DSL and geometric edge selection. Geometry features need the native bridges, which the release zip does not contain.

Availability

  • The GitHub release carries a platform-independent, JVM-only kstep-cli-0.2.0.zip (about 86 MB, it bundles the Kotlin compiler for *.kstep.kts scripts) and a SHA-256 checksum. Nothing is published to Maven Central or Homebrew.
  • Geometry, sketches and kstep import need 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.

Added

  • kstep export merges the geometry of registered shapes into the Part 21 file; --require-geometry exits with code 1 and writes no file unless geometry was merged. A merge failure no longer produces a structure-only file.
  • Placed assembly geometry: place(...) writes placements so that OpenCascade and FreeCAD import the components of an assembly, not only the root.
  • kstep import <file.step> reads STEP files (kSTEP, OpenCascade, FreeCAD) and reports product structure, volume, faces, bounding box and placed occurrences; --validate checks the AP242 entities and --render draws the result. Hardened input handling: regular files only, 50 MB cap, external document references rejected.
  • Geometry operations: union, difference, intersection, cylinders, holes, revolve and chamfer, each with a feature-history case.
  • A sketch DSL (points, lines, arcs, circles, PlaneGCS constraints). Degrees of freedom are analysed before the solver runs, so redundant or contradictory constraints are named. Circle and arc radii are fixed measures in this version.
  • Geometric edge selectors (parallel to a direction, by type, at the maximum of a direction, longest, and more) replace opaque edge indices; selected edges are tracked through later operations via OpenCascade’s modification history.
  • New error codes KSTEP-S-006 to KSTEP-S-011 and KSTEP-I-001 to KSTEP-I-012.

Changed

  • The MCP server reports the real project version to clients instead of a hard-coded 0.1.0.
  • OpenCascade’s transfer banners no longer pollute standard output or --output json.

Limitations

  • Interoperability is verified with OpenCascade-based readers (OpenCascade’s typed reader and FreeCAD) only, not with other CAD/PLM systems.
  • Not included: undo/redo, radii as solver unknowns, further constraint types, persistent naming of generated edges, a sketch step of its own in the feature history and several separate outer contours in one sketch.
v0.1.12026-10-22Pre-release

Release pipeline, macOS arm64 and opt-in model validation

Second pre-release. Adds a tag-driven release pipeline, development support for macOS arm64 and opt-in whole-model validation on export. The GitHub release carries a JVM-only zip without native bridges.

Added

  • A release pipeline: pushing a vX.Y.Z tag builds kstep-cli-X.Y.Z.zip (JVM only, without native bridges, about 86 MB) with a SHA-256 checksum and creates or updates the GitHub release. Nothing is published to Maven Central or Homebrew, and nothing is signed.
  • macOS arm64 support for the OpenCascade and PlaneGCS native bridges, for development use only: nothing is bundled, the library is unsigned, Intel Macs and Windows stay unsupported.
  • kstep export --validate: opt-in population-level validation (USEDIN, INVERSE, UNIQUE, acyclic usages) before the file is written. Findings give exit code 1 and no file; if no verdict can be reached it fails closed with KSTEP-S-005. Off by default.

Interoperability finding

  • kSTEP Part 21 files (product structure) are read by FreeCAD 1.x without error or warning; because no geometry was written at this point, it shows 0 objects. An independent reader built on OpenCascade’s typed STEP model resolves the product structure with 0 fails and 0 warnings.
  • This proves product-structure read interop with one external implementation family (OpenCascade). Geometry interop, other CAD/PLM tools, full AP242 conformance and a lossless write-back round trip remain unverified.
v0.1.02026-10-19Pre-release

First pre-release: semantic core and tooling

The first tagged release. Source code only, no published artifacts; build from source. The semantic AP242 core, STEP Part 21 tooling and the first native geometry bridges are in, the latter verified on Linux x86-64 only.

Semantic core (ISO 10303 AP242)

  • EXPRESS parser and Kotlin code generation, verified against an excerpt of the real AP242 schema (sixteen entities).
  • Transitive TYPE alias chains, enumerations (as Kotlin enum classes) and closed SELECT types (as sealed interfaces) are resolved; EXTENSIBLE and BASED_ON types are rejected with a reason.
  • WHERE rules including USEDIN/SIZEOF, INVERSE evaluation, the UNIQUE rules and the acyclic assembly check, all with size and depth limits and stable KSTEP-* error codes.

STEP Part 21 and tooling

  • STEP Part 21 reader and writer, a *.kstep.kts scripting host and the kstep export command.
  • kstep render (SVG, PNG, text, glTF/GLB), kstep asciidoc and an MCP server (kstep mcp).

Geometry and viewer

  • OpenCascade JNI bridge (boxes, extrusion, fillet, parametric feature history), PlaneGCS constraint solver bridge and an interactive Compose Desktop viewer.
  • The native bridges need system libraries and were verified on Linux x86-64 only.

Known limitations

  • No published artifacts; build from source (JDK 21).
  • Part 21 output was verified by self-round-trip only; no interoperability with external CAD/PLM tools was validated yet.
  • kstep export did not run model-level validation yet; an assembly cycle was not detected on export.
  • QUERY and general EXPRESS functions are not evaluated; the AP242 schema is a vendored excerpt, not the full standard.
  • The LLM benchmark is deferred.

All releases on GitHub