Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Web SDK API reference
The stable preview contract is aetheris/web-editor-contract/1.
Aetheris.create(options?)initializes the runtime. Options:worker(trueuses a dedicated module Worker),wasmUrl, and a diagnostics callback.cad.info()andcad.capabilities()report package/runtime/contract versions and support flags.cad.compile(source, { sourceName?, signal? })returns{ model, diagnostics }; compiler failures are values, not thrown private exceptions.cad.language.complete(source, offset, { sourceName?, sourceRevision })returns bounded partial-source field help for Helix and Loft. The caller must provide a nonempty revision token. The JSON-safe result containsdocument,revision,context,replaceStart,replaceLength,fields, andmissingRequiredFields. Each field hasname,type,required,meaning, optionaldefault, and optionalchoices. Unsupported contexts return no fields. This operation does not build geometry.model.tree,properties,mesh,diagnostics,revision, andchangesare the current valid snapshot.model.entity(id)andmodel.property(id)inspect public records.model.setProperty(id, { value, unit })validates and rebuilds a source-backed scalar property.model.setSource(source)replaces source and rebuilds transactionally.model.rebuild()rebuilds the current source plus overrides.model.resolveSelection(...)andselectionForEntity(...)translate selection in both directions.model.selectorCandidates('Face' | 'Edge')returns source-addressable selectors from the compiled geometry source map. Candidates carry the source reference, semantic key, output role, qualification, and build revision. Runtime-only, unstable, ambiguous, and selector-less topology is excluded. The candidates describe the last valid compiled snapshot, so an editor must not apply them to a different source revision.model.exportSTEP()returnsUint8Array;exportSTEPBlob()returns a browserBlob.model.exportFormatslists format identifiers, labels, descriptions, availability and rejection reasons for the compiled product kind.model.exportArtifacts(['step', 'glb'])returns download records withfileName,mediaTypeandbytes: Uint8Array. A single format returns its native file; multiple formats return one ZIP containing all selected artifacts. Preparation is atomic: an unsupported export throws with its diagnostic and returns no partial download. Supported identifiers arestep,glb,usda,stl,obj,pdf,svg,pptx. Assemblies support STEP/GLB/USDA; Scenes support GLB/USDA; mesh and automatic drawing exports currently require a part. Automatic drawings retain the drawing compiler's completeness and PMI checks, and do not invent missing manufacturing requirements. Exports require a successful current build. Presentation exports use the static authored pose, not a sampled animation or the viewport camera.model.dispose()andcad.dispose()release managed sessions.
Unexpected failures throw AetherisError with stable code, safe message, and optional developer details. See the shipped index.d.ts for exact readonly record types.
Pattern source projection
cad.language.patterns(source, { sourceName, sourceRevision, projectRoot, projectDocuments }) returns firmament-patterns/1: finite layouts, authored
Pattern mappings, reachable control node ids, shared consumers, diagnostics and
compiler-evaluated keyed rows. Included declarations resolve through the existing
module graph. validationLevel: "LayoutResolvedNotBuilt" describes layout
resolution, not geometry admission; compile the complete candidate project before
committing an edit.
Rows expose their value and expansion associations. authored is present only
for directly authored keyed Set entries; generated/derived rows are read-only.
Point coordinates are local values and preserve Point2/Point3 dimensionality.
The response retains its document and revision for stale-response checks.
Use ordinary language.edit operations to change the source:
setValueedits a Static initializer or scalar Function expression.setFieldedits a Series/Linear/Stations input or other authored field.setSetEntryedits one authored Static Set value by node andfieldkey, retaining the key itself.setPatternSourceandsetPatternBodyedit the collection expression and keyed mapping;insertDeclarationcreates ordinary layout/Pattern declarations.
These edits parse their result. Complete compiler Preview remains responsible for binding, feature/capability admission and geometry construction. See Patterns for the language and Helios workflow.