Roadmap
- Skeleton (done): plugin pipeline, document writer, mesh fallback, quality gates, releases.
- Plates (done): any outline of straight sides with round through holes and rounded vertical corners.
- Parity with mesh2cad, one recogniser per pull request, each compared with mesh2cad's output (
scripts/compare-mesh2cad.sh, see Development):- (done) parameter names as mesh2cad writes them (
base_t,fillet_r,extrude_len, …), and the part kept where it is in the file - (done) hole rows, grids and bolt circles as SolidCraft patterns
- (done) counterbored and countersunk holes
- (done) blind holes
- (done) slots
- (done) bosses on the top face
- (done) polygonal cut-outs
- (done) pads and rectangular pockets (steps and other pockets later)
- (done) extrusions along X and Y
- (done) boxes with every edge rounded (
edge_fillet_r), with through holes in them; bosses on side faces still to do - (done) chamfers, drafts and the rounds at a boss's foot or a hole's rim
- combined extrusions: (done) the intersection of outlines extruded along X, Y and Z, with openings through them, straight blind cuts into them and round holes, and (done) unions of outlines stacked along an axis; holes that cross, roofs and bevels on a stack still to do
- (done) parameter names as mesh2cad writes them (
- Checking: compare the rebuilt part with the mesh through SolidCraft's
evaluate(volume and deviation), as mesh2cad does with CadQuery. - Reworkable sketches — beyond parity: every sketch fully dimensioned and constrained, so it can be reworked in SolidCraft. The concepts behind this and their sources (products and papers) are mapped in Comparable tools → Concepts from the list, applied to revmesh:
- (done for plate outlines and cut-outs, and for the stack's and combined's sketches: a stack band
k's outline asoutline_<k>_<i>_len/_angle, a combined extrusion along axisaasoutline_<a>_<i>_len/_angle, their openings ascutout_<n>_<i>_len/_angleand a combined cut's outline ascut_<n>_<i>_len/_angle) aLengthconstraint per side with its own parameter (outline_<i>_len,cutout_<n>_<i>_len) and anAnglefrom the sketch's X axis on the longest slanted side with its own parameter (outline_<i>_angle,cutout_<n>_<i>_angle) inpolygon_sketch_dimensioned/polygons_sketch_dimensioned(crates/revmesh-core/src/design/sketch.rs; parallel slanted sides share their angle and a loop's turns sum to 360°, so one angle per polygon is the independent one — and that side's length is then derived, driving both would over-constrain the sketch; likewise, when the remaining lengths and orientations already fix that side's direction, as a right triangle's legs held horizontal and vertical do for the diagonal, the longest axis-aligned side's length is derived too (dimensioned_sides_for_angle), so the angle parameter stays editable) - (done for outlines and cut-outs) arc sides in outlines and in cut-outs as
SketchCurve::Arcwith aDiameterconstraint driven byarc_<i>_d(an outline's) orcutout_<n>_arc_<i>_d(a cut-out's), the centre a free sketch point the solver places equidistant from the side's corners (like a slot's arc centres) (polygon_sketch_arcs,crates/revmesh-core/src/design/sketch.rs; recognised asProfileSpec::arcsinplate/outline.rs::outline_shapeand asCutoutSpec::arcsinplate/holes.rs::cutout_shape, which reads a cut-out's loop like an outline and accepts it only with arc sides and no rounded corners) — round outlines, D-shaped cut-outs, rounded-corner cut-outs and concave arc sides stay a mesh - (done for pockets of any straight-sided outline, for steps down from the top face several levels deep along Z, for headed holes opening on a step's level — measured from the level and drilled from it, a rounded rim filleted on the pocket's start edge — and for steps along X or Y, which the stack recogniser reads as outlines stacked along that axis) one sketch per face level: generalise
split_facesbeyond bottom and top — arbitrary pockets and steps, both written asPocket<n>Sketch+Pocket<n>cut withpocket_<n>_<i>_lenper side (recognize/to_design.rs::block_features; the levels inplate/prism.rs::step_levels, each top loop's level tagged inface_outlines, heads measured from their mouth's face instepped_hole), and with 3.12 combined extrusions - (done for every recognised kind) per-face surface deviation in the import report, computed in the sandbox at import: each recognised face's label with the farthest its mesh points lie from the ideal surface (
recognize::deviations:plate::face_deviationsfor prisms, a box rounded all over reports its rounded envelope as "rounded surface",plate::walls_deviationsper extrusion and per band for combined and stacked parts, labelledextrude <a> side <i>/band <k> side <i>;Walls::deviation; the volume within 1% stays the gate, Hausdorff incargo xtask check)
- (done for plate outlines and cut-outs, and for the stack's and combined's sketches: a stack band
- More parts, fitted robustly — from the code review of the recognisers against the references (the extracted know-how is packaged in the
revmesh-recognition-knowhowagent skill; the concept → code mapping with the sources is Comparable tools → Concepts from the list, applied to revmesh):- an arbitrary prism axis: detect the two dominant parallel planes with fixed-seed RANSAC (Schnabel et al. 2007) and rotate the mesh so their normal is +Z, instead of trying only X, Y and Z (
recognize/axis.rs) — today a part rotated in the file stays a mesh. Recognition-side only for now: SolidCraft 0.50.0's design format has origin-plane sketches and translate-only moves, so a slanted prism cannot be written parametrically at the pinned version (needs construction planes or a newer pin) - (done: a fixed-seed RANSAC circle in
plate/geometry.rs::ransac_circleaugmenting the algebraicfit_circle— 3-point minimal samples, inliers within tolerance, the iteration count adapted to the inlier ratio — behindround_holeinplate/holes.rs: a rim loop with a few corners off the circle is fitted on its inliers when at leastMIN_RING_SEGMENTS(6) of them are a strict majority of the loop, their steps stay even and the excluded corners lie within one facet's sagitta of the circle, while the ring's own edges keep the original 50° gate, so an exporter's uneven rim reads as a round hole but a real flat or lobe stays refused: in a face's own loops fewer thanMIN_HOLE_SEGMENTS(8) corners are read as a polygonal cut-out first, so a hexagon stays a cut-out there, and a D-shape's flat side and an omitted facet's long step are still one long step) robust circle fits on rim loops - (done: a torus about the known axis is a circle in the (radial, axial) profile plane, so
plate/geometry.rs::fit_torusfits it as one — least-squares circle through the round's band corners, refused when they lie on no circle — inrounded_rimfor hole rims (plate/prism.rs, with tangency to the bore's wall and to the face checked) and inround_footfor boss feet (plate/bosses.rs), replacing the per-corner averaging) analytic torus detection for the rounds at hole rims and boss feet - (done:
outline_shapeinplate/outline.rsreturns one fitted radius per rounded corner and the design writes oneFillet<g>per radius group withfillet_r_<g>/outline_fillet_r_<g>— a single shared radius keeps the plainfillet_r/outline_fillet_randFillet1) per-corner radii in outlines - hole rows at any angle (a pattern's direction is not an expression in SolidCraft — write them as single holes or on a rotated sketch)
- (done:
closed_loopsincrates/revmesh-core/src/recognize/mod.rsrefuses, before any axis is tried, a mesh whose edges are not covered by two facets in opposite directions — corners welded on a sub-tolerance grid, an exporter's T-junctions counted by their sub-edges' length — so the recognised faces close into loops; andcheck_wallsinplate/prism.rsrefuses a wall facet whose plan is not a straight line within the tolerance plus the round walls' sagitta, so walls meet their face at 90°) ComplexGen-style topology gates alongside exact-or-nothing and the volume check: recognised faces close into loops, walls meet their face at 90° plus what is still open in 3.10 and 3.12: bosses on side faces, roofs and bevels on stacks
- an arbitrary prism axis: detect the two dominant parallel planes with fixed-seed RANSAC (Schnabel et al. 2007) and rotate the mesh so their normal is +Z, instead of trying only X, Y and Z (
- Import and conversion:
- (done: the manifest requests
evaluate@0.2; in auto mode the serialised design is staged and rebuilt in the app's private sandbox (document.inspect) before it is written, and a design the app cannot open falls back to the mesh body with the reason in the loss report, coderevmesh.selfcheck; mesh-mode imports are not checked —self_checkincrates/revmesh-plugin/src/lib.rs, closing item 4 at import time) an in-sandbox self-check: request theevaluate@0.2capability, stage the produced design and rebuild it, and on feature errors fall back to the mesh body with the reason in the report - (done:
plugin.jsonacceptsstl,objandply;format.rstells the format by the file's name or its first bytes, andMeshReaderstreams all three in chunks with the same size limits asStlReader;obj.rsandply.rs(ASCII and binary little-endian) parse into the sameMeshwith localised line/record errors;import, the plugin'sread_meshandcargo xtask checktake any of them; the plugin-test fixturesblock-60x40x6.obj,block-60x40x6.plyandblock-60x40x6-bin.plyimport the STL block unchanged, andobj-bad.obj/ply-bad.plycover the error cases) OBJ and PLY input next to STL - double-precision coordinates in mesh bodies beyond the single-precision range (the design is written with
f32coordinates today,design/mod.rs) — parts far from the origin lose precision in the mesh fallback - (done:
autoaccepts 16 MiB vs 32 MiB in mesh mode —import_meshtakes the mesh by reference and clones only in the mesh/unrecognized fallback paths, andFaces.chordsis slimmed from (a, b, middle, length) to (a, b, mid_z, length); measured peak ≈ 90 MiB at 16 MiB, inside the 128 MiB budget (AUTO_MAX_BYTESincrates/revmesh-plugin/src/lib.rs); 32 MiB would need index-based face storage) a higherautoinput ceiling (16 MiB today vs 32 MiB in mesh mode,revmesh-plugin) by slimming the face and wall indexes recognition builds - (done: ASCII-STL syntax errors carry a
SyntaxReason(stl.rs) rendered in the import language viastl.syntax.reason.*in the locale catalogs; the dialog'sunitsoption (plugin.json) reads inch files as inches and scales them to millimetres in place (convert_units, range-checked afterwards), noted in the report asrevmesh.units).
- (done: the manifest requests
Converting a mesh body that is already in the open design (not just an STL file) is tracked in issue #70; the spike's findings — second package with the command-plugin world, read the body via model.mesh, write back via timeline.add / timeline.delete, selection via x-solidcraft-selection — are in research/convert-mesh-body.md.
Contributions are very welcome: bug reports, STL files that import badly, recognisers, docs. Start with CONTRIBUTING.md.