Spareware · The kernel map

How the geometry kernel fits together, from the programs at the top down to the files at the bottom. Each box says what that part is for. The page is drawn from the kernel's own files on every change to main, so it shows what is there today.

The progress page: how far each part has come

1 The programs that use it: Spare Construct

The site: ground, roads, drainage and pipesCivil
The building: walls, floors, roofs, frames and servicesConstruct
The things that go in it: parts, fittings and furnitureWorkshop

All three are one program on one model; the plan calls Civil and Workshop its disciplines.

2 What the programs call

The kernel's one front door. Programs never reach past it, so what is behind it can change without them changing.

The one door every program usesengine-geometry
Shares work across the computer's coresgeom-pool
The 17 operations programs can call today
  • Make (6): make.box, make.cone, make.cylinder, make.prism, make.sphere, make.torus
  • Query (6): query.area, query.bounding_box, query.exactness, query.faces, query.validity, query.volume
  • Transform (5): transform.mirror, transform.move, transform.pattern, transform.rotate, transform.scale

3 Our parts, in layers

Each part leans only on the layers below it. Hold a finger on a box, or point at it, to see its job in the kernel's own words.

Layer 10 The modelling tools

Operations

Road and rail centre linesgeom-align
Checks how smooth a surface isgeom-analysis
Rounds and bevels edgesgeom-blend
One join or cut for every kind of shapegeom-combine
Turns one kind of shape into anothergeom-convert
Sections, plans and hidden lines for drawingsgeom-draw
Thickens, hollows and moves facesgeom-offset
Splits surfaces into panels and unrolls themgeom-panel
Carries sketches into the modelgeom-profile
Solves sketches with rules on themgeom-sketch
Hands curved work to solidcore, the outside enginegeom-solidcore
Ground surfaces, contours and earth volumesgeom-terrain

Layer 9 Tools the modelling tools share

Shared operation services

Makes boxes, cylinders and spheres; moves themgeom-make
Roofs from floor plansgeom-skeleton
Extrudes, revolves and sweeps profilesgeom-sweep

Layer 8 Other kinds of shape

Other representations

Laser scan points, for referencegeom-cloud
Shapes made from a formulageom-field
Smooth shapes from a rough cagegeom-subd

Layer 7 Meshes and finding things in space

Meshes and spatial

Shapes made of trianglesgeom-mesh
Distance, clearance and clashesgeom-spatial

Layer 6 Cutting and joining flat shapes

Arrangements

Drafting lines and 2D shapesgeom-2d
Joins and cuts solids exactlygeom-bool
Exact flat-faced solidsgeom-poly

Layer 5 Checking every shape

Checker

Proves a shape is soundgeom-check

Layer 4 Where shapes meet

Intersections

Where curves and surfaces crossgeom-intersect

Layer 3 How a shape's faces connect

Topology

Keeps a face's name through every changegeom-name
Faces, edges and corners of a solidgeom-topo

Layer 2 Points, lines and surfaces

Geometry

Quick search by boxes around shapesgeom-bvh
Lines, arcs and free curvesgeom-curve
Points, directions and movesgeom-math
The maths of free curves and surfacesgeom-nurbs
Flat, round and free surfacesgeom-surface

Layer 1 Exact numbers and the rules every tool keeps

Numbers and the contract

Solves sets of equationsgeom-linalg
Exact numbers and yes-or-no testsgeom-num
The rules every operation keepsgeom-op
Runs work side by side, within set limitsgeom-run

Layer Our testing tools

Times every operationgeom-bench
Throws random shapes at the kernelgeom-fuzz
Writes the files other files are made fromgeom-gen
The shared tests and their checksgeom-test

4 The two engines underneath

Every operation is listed once, under the engine that answers it today, with the class of its answer.

Our exact core

Our own crates: exact where it can be, proven where it cannot

Answers 17 operations.

  • ExactCertifiedApproximate Make boxes, cylinders, cones, spheres and tori; move, rotate, mirror and scale G101 Programs call it as make.box, make.cone, make.cylinder, make.prism, make.sphere, make.torus, transform.mirror, transform.move, transform.pattern, transform.rotate, transform.scale.
  • ExactCertifiedApproximate Ask a body about its faces, edges and points G102 Programs call it as query.area, query.bounding_box, query.exactness, query.faces, query.validity, query.volume.
  • Exact Unite and subtract flat-faced solids, any number at once G131
  • Exact Find rooms and space boundaries G137
  • Exact Cut many openings in one go G138
  • Exact Say whether a point is inside a mesh G147
  • Exact Unite and subtract meshes G148
  • Exact Slice meshes and wrap them in hulls G149
  • Exact Grow one flat solid by another (Minkowski sum) G150
  • Exact Triangulate with fixed edges G153
  • ExactCertified Where two curves cross G163
  • ExactCertified Where a curve meets a surface G164
  • ExactCertified Where planes, spheres, cylinders and cones meet each other G165
  • Certified Where any two quadric surfaces meet G166
  • ExactCertified Where tori, revolved and extruded surfaces meet G167
  • Certified Where any two free-form surfaces meet G170
  • Certified Simplify and remesh a mesh G300

solidcore

An outside modelling engine for curved work, taken in whole

  • Behind our wrapper, geom-solidcore: no part of it reaches a program.
  • Taken whole at one pinned commit, 3d0121e9b, of our own copy (https://github.com/spareware-co-op/solidcore, licence Apache-2.0).
  • Our tests are the judge: 120 stored cases, of which 24 fail by 9 named faults. An operation counts as done only when every one of our cases for it passes, on Linux and in the browser.
  • Its answers are Approximate: Its answers are compared with ours on every stored case and must fall within the stated tolerances; that is measured, not proven. The stated tolerances: checked at 4000 points along each piece of curve; every point of a meeting curve within 1e-09 of both surfaces; the curve's length within 1e-06 of the true length, as a share of it; a flat-faced volume within 1e-12 of the true volume, as a share of it; a curved volume within 1e-09 of the true volume, as a share of it.

Answers 0 operations.

    Not answered yet

    No engine answers these today: 66 operations.

    Held back by our tests (5)
    • No answer yet Unite, subtract and intersect curved solids G248 57 of 73 cases pass. Held back: fault CK-3 (ours: geom-check (; 3 cases); fault CK-4 (ours: geom-check (; 1 case); fault SC-1 (two solids 1e-7 apart joined; 1 case); fault SC-4 (a window leaving a sliver of 1e-6 above it loses the sliver; 1 case); fault SC-5 (a cylinder's cap off the height of its circle; 8 cases); fault SC-8 (a round hole's top cap written off the profile's plane; 1 case); fault WR-2 (ours: the case table (; 1 case).
    • No answer yet Extrude and revolve a profile G255 No case can run yet. Held back: 10 cases wait for the link to solidcore to offer the operation they need: revolve (9), a cylindrical box, or extrusion of a ring sector (1).
    • No answer yet Sweep a profile along a path G256 No case can run yet. Held back: 10 cases wait for the link to solidcore to offer the operation they need: sweep (10).
    • No answer yet Blend between profiles (lofts and swept blends) G259 No case can run yet. Held back: 8 cases wait for the link to solidcore to offer the operation they need: blend (6), swept blend (2).
    • No answer yet Cut spheres, cylinders and cones with a plane G390 26 of 32 cases pass. Held back: fault WR-1 (ours: geom-solidcore's interface (; 6 cases).
    Not working yet (61)

    2D (8)

    • No answer yet Find closed regions in a 2D drawing G200 Built by us, waiting to land.
    • No answer yet Unite and subtract 2D shapes G202
    • No answer yet Offset 2D lines and shapes G203
    • No answer yet Trim, extend, break and join 2D lines G204
    • No answer yet Round and bevel 2D corners G205
    • No answer yet Move, stretch and resize 2D lines G206 Built by us, waiting to land.
    • No answer yet Measure 2D distance and clearance G207
    • No answer yet Fill 2D regions with hatch patterns G210

    Blend (6)

    • No answer yet Round and bevel edges (simple cases) G263
    • No answer yet Round edges with a rolling ball G264
    • No answer yet Round edges where rounds overlap G265
    • No answer yet Round edges with a changing radius G266
    • No answer yet Smooth show-quality blends G267
    • No answer yet Round corners where edges meet G268

    Combine (1)

    • No answer yet One boolean across bodies, meshes and fields G336

    Draw (6)

    • No answer yet Cut any body with a plane G389
    • No answer yet Cut free-form bodies with a plane G391
    • No answer yet Hidden lines of flat-faced bodies G394
    • No answer yet Hidden lines of curved bodies G396
    • No answer yet Shadows and visible faces G400
    • No answer yet Perspective views G403

    Free-form (8)

    • No answer yet Extend a surface G253 Built by us, waiting to land.
    • No answer yet Smooth a subdivision surface G315
    • No answer yet Turn a subdivision surface into a body G322
    • No answer yet Edit a subdivision surface G325
    • No answer yet Turn a field into a mesh G331
    • No answer yet Divide a surface and map patterns on it G342
    • No answer yet Unroll a surface flat G343
    • No answer yet Cut a surface into flat panels G344

    Ground (7)

    • No answer yet Straight skeleton of a floor plan G271
    • No answer yet Make a roof from a floor plan G272
    • No answer yet Edit a terrain surface G365
    • No answer yet Contours, cut and fill, earth volumes G366
    • No answer yet Make a solid of the ground G367
    • No answer yet Grade the ground to a design G368
    • No answer yet Build a road corridor solid G375

    Manufacture (1)

    • No answer yet The space a moving tool sweeps through G280

    Mesh (5)

    • No answer yet Turn a body into a watertight mesh G288
    • No answer yet Display meshes at several levels of detail G290
    • No answer yet Repair a mesh G298 Built by us, waiting to land.
    • No answer yet Fill a solid with a volume mesh G303
    • No answer yet Offset, hollow and thicken a mesh G304

    Offset (6)

    • No answer yet Offset a surface G270
    • No answer yet Offset, shell and thicken flat solids G275
    • No answer yet Build up roof layers G276
    • No answer yet Offset, shell and thicken curved solids G277
    • No answer yet Add draft to faces G278
    • No answer yet Move, replace and delete faces G279

    Query (5)

    • No answer yet Say whether a point is inside a curved solid; its volume and weight G247
    • No answer yet Distance between curved bodies G293
    • No answer yet Find clashes between bodies G296
    • No answer yet When moving bodies first touch G297
    • No answer yet Check draft, gaps and flushness of surfaces G349

    Repair (2)

    • No answer yet Close near-misses between solids G249
    • No answer yet Heal and sew imported bodies G420

    Sketch (3)

    • No answer yet Solve a constrained sketch G222 Built by us, waiting to land.
    • No answer yet Drag a constrained sketch G228 Built by us, waiting to land.
    • No answer yet Turn a sketch into a profile G229

    Sweep (3)

    • No answer yet Sweep along rails and helices G257
    • No answer yet Fill a surface from a network of curves G260
    • No answer yet Lofts that unroll flat G261
    What the classes mean
    • Exact Exactly right, with no rounding. In the kernel's words: “decided entirely by exact predicates on exact data.”
    • Certified Within a stated distance, and proven. In the kernel's words: “within a proven bound ε of the true shape, with ε ≤ ε_fit unless the caller asked for more.”
    • Approximate Within a stated distance, measured but not proven. In the kernel's words: “within a measured, not proven, deviation ε. For example, a subdivision surface's extraordinary points converted to NURBS, or a mesh fitted to a scan.”

    5 Files in and out

    Format and exchange: our own file, and the files of other programs.

    Rhino model filesgeom-3dm
    Drawing files from other programsgeom-dxf
    What every file reader sharesgeom-exchange
    Our own file, saved exactlygeom-format
    Mends shapes that come in from filesgeom-heal
    Open building model filesgeom-ifc
    Land survey and road design filesgeom-landxml
    Mesh files for printing and viewinggeom-meshio
    The text inside part and building filesgeom-p21
    Engineering part filesgeom-step