The Shared Foundation
Five data types carry the weight for every discipline in OcaltQL 3D & CAD. A solid model, a building, a character mesh, and a stressed bracket are all just geometry with different rules attached. OcaltQL 3D doesn’t invent a dozen sub-languages — it adds a handful of new data types that plug into verbs already established: SET, AFTER, NEW OPERATION / RUN, SET PROMISE / WAIT FOR, EXPORT.
Core Types
| Type | Represents | Native to |
|---|---|---|
?sketch | 2D curves + constraints, on a plane | SolidWorks, Fusion 360, AutoCAD |
?solid | Exact B-rep solid/surface (NURBS) | Rhino, CATIA, SolidWorks, Fusion 360, FreeCAD |
?mesh | Polygon mesh — verts, edges, faces | Blender, Maya, 3D printing, games |
?femesh | Solid discretized into elements for solving | Ansys, Abaqus |
?scene | A container that places and renders any of the above | Every viewport, ever |
Bridge Verbs
The same solid, used for two different purposes — polygon rendering and finite-element analysis:
CAD TESSELLATE ?solid TOLERANCE 0.01 SET ?mesh
AFTER SIM MESH ?solid ELEMENT SIZE 2 SET ?femesh
Geometry Picking
Selecting geometry by proximity — the same as clicking in a viewport. Used by modeling, assemblies, and simulation alike.
CAD ?solid EDGE AT x,y,z SET ?edge
AFTER CAD ?solid FACE AT x,y,z SET ?face
Scenes
A scene is the generic container everything gets placed and rendered inside — one concept instead of a separate “project” object per discipline.
NEW SCENE "name" UNITS "mm" SET ?scene
AFTER SCENE ?scene PLACE ?object AT x,y,z ROTATION x,y,z SET ?instance
NEW SCENE "Sub-Assembly" SET ?sub
AFTER SCENE ?scene PLACE ?sub AT 100,50,0 ROTATION 0,0,90
A scene is a value, so it persists like one. SCENE ?scene SAVE INTO "path.oql" writes it as native OcaltQL source text — readable and hand-editable, the same canonical stored form described on Arrays & Objects. SCENE OPEN reads it back. SCENE IMPORT brings in a scene authored elsewhere.
NEW SCENE "Ward A" UNITS "mm" SET ?scene
AFTER SCENE ?scene PLACE ?bim AT 0,0,0
AFTER SCENE ?scene SAVE INTO "/root/scenes/ward-a.oql" SET ?path
(* ...a later script... *)
SCENE OPEN "/root/scenes/ward-a.oql" SET ?scene
AFTER SCENE ?scene CAMERA AT 30,30,20 LOOKAT 10,5,3 FOV 60 SET ?cam
AFTER SCENE ?scene SAVE SET ?scene
SCENE IMPORT "/root/incoming/level.gltf" SET ?scene
AFTER SCENE ?scene SAVE INTO "/root/scenes/level.oql" SET ?path
Materials
Materials are generic — not tied to any one discipline. A window’s glass and a rendered part’s brushed metal use the same verb.
NEW MATERIAL "Brushed Steel" SET ?mat
AFTER MATERIAL ?mat BASE COLOR "0xB0B0B0" METALLIC 0.9 ROUGHNESS 0.4
AFTER ASSIGN MATERIAL ?mat TO ?object
Materials save and load the same way, which is what makes a shared material library possible — define brushed steel once, reuse it in every project.
NEW MATERIAL "Brushed Steel" SET ?mat
AFTER MATERIAL ?mat BASE COLOR "0xB0B0B0" METALLIC 0.9 ROUGHNESS 0.4
AFTER MATERIAL ?mat SAVE INTO "/root/materials/brushed-steel.oql" SET ?path
(* ...any later project... *)
MATERIAL OPEN "/root/materials/brushed-steel.oql" SET ?mat
AFTER ASSIGN MATERIAL ?mat TO ?object
?sketch (2D), ?solid (exact geometry), ?mesh (polygons), ?femesh (solver elements), and ?scene (spatial container) are the five types. Every section that follows is built from combinations of these.