Generic spatial-assembly operations exposed through AsukaDesigner.assembly.

The contract uses serializable transforms, anchors, rules, BOM lines and validation results. Native Babylon objects never cross this boundary.

interface AsukaAssemblyApi {
    applyMaterialPreset: ((surfaceId: string, presetId: string, applyOptions?: AsukaAssemblyMaterialApplyOptions, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>);
    autoPlace: ((componentId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<AsukaAssemblyPlacementResult>);
    cancelDrawing: (() => void);
    clearSurfaces: ((options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<AsukaAssemblyState>);
    configure: ((patch: Partial<AsukaAssemblyState>, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<AsukaAssemblyState>);
    connect: ((connection: Partial<AsukaAssemblyConnection>, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyConnection>);
    disconnect: ((connectionId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyConnection>);
    export: ((kind: AsukaAssemblyExportKind, options?: AsukaAssemblyExportOptions) => Promise<Blob>);
    getBom: ((options?: {
        currency?: string;
    }) => AsukaAssemblyBom);
    getBuildState: (() => AsukaAssemblyBuildState);
    getComponent: ((id: string) => null | AsukaAssemblyComponent);
    getInteractionState: (() => AsukaAssemblyInteractionState);
    getQuote: ((options?: AsukaAssemblyQuoteOptions) => AsukaAssemblyQuote);
    getState: (() => AsukaAssemblyState);
    getSurfaceMetrics: ((id: string) => null | AsukaAssemblyFloorMetrics);
    getSurfaceTransform: ((id: string) => null | AsukaAssemblySurfaceTransform);
    linkStack: ((link: Partial<AsukaAssemblyStackLink>, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyStackLink>);
    listComponents: (() => AsukaAssemblyComponent[]);
    listMaterialPresets: (() => AsukaAssemblyMaterialPreset[]);
    listStackLinks: (() => AsukaAssemblyStackLink[]);
    listSurfaces: (() => AsukaAssemblySurface[]);
    place: ((componentId: string, input?: AsukaAssemblyPlacementInput, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<AsukaAssemblyPlacementResult>);
    previewPlacement: ((componentId: string, input?: AsukaAssemblyPlacementInput) => AsukaAssemblyPlacementResult);
    removeMaterialPreset: ((presetId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<boolean>);
    removeSurface: ((id: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>);
    saveMaterialPreset: ((preset: Partial<AsukaAssemblyMaterialPreset>, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyMaterialPreset>);
    selectSurface: ((id: null | string) => null | AsukaAssemblySurface);
    setConstructionMode: ((active: boolean) => AsukaAssemblyInteractionState);
    setFloorEdgeAngle: ((floorId: string, edgeIndex: number, angleDegrees: number, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>);
    setFloorEdgeConstraint: ((floorId: string, edgeIndex: number, constraint: AsukaAssemblyFloorEdgeConstraint, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>);
    setFloorEdgeLength: ((floorId: string, edgeIndex: number, length: number, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>);
    setMoveTool: ((active: boolean) => AsukaAssemblyInteractionState);
    setRoomWallEnabled: ((floorId: string, edgeIndex: number, enabled: boolean, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>);
    startDrawing: ((input: AsukaAssemblyStartDrawingInput) => void);
    transformSurface: ((id: string, input: AsukaAssemblySurfaceTransformInput, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>);
    unlinkStack: ((linkId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyStackLink>);
    updateSurface: ((id: string, patch: AsukaAssemblySurfacePatch, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>);
    validate: (() => AsukaAssemblyValidation);
}

Properties

applyMaterialPreset: ((surfaceId: string, presetId: string, applyOptions?: AsukaAssemblyMaterialApplyOptions, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>)

Apply a reusable material to a face, surface or complete room.

autoPlace: ((componentId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<AsukaAssemblyPlacementResult>)

Find the nearest compatible anchor or valid plan position automatically.

cancelDrawing: (() => void)

Stop the active mouse construction tool.

Remove every explicitly drawn floor and wall.

Configure the room/plan and placement policies for the active 3D view.

Create an explicit connection between two compatible anchors.

disconnect: ((connectionId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyConnection>)

Remove one persisted anchor connection.

export: ((kind: AsukaAssemblyExportKind, options?: AsukaAssemblyExportOptions) => Promise<Blob>)

Export BOM CSV/JSON, quote JSON or a complete production package.

getBom: ((options?: {
    currency?: string;
}) => AsukaAssemblyBom)

Build the normalized bill of materials for the current assembly.

getBuildState: (() => AsukaAssemblyBuildState)

Return the active mouse construction tool and selected surface.

getComponent: ((id: string) => null | AsukaAssemblyComponent)

Return one assembly component by runtime product id.

getInteractionState: (() => AsukaAssemblyInteractionState)

Return the active novice-friendly placement tool.

Build a quote from BOM pricing and optional adjustments.

getState: (() => AsukaAssemblyState)

Return the persisted plan, snapping settings and current connections.

getSurfaceMetrics: ((id: string) => null | AsukaAssemblyFloorMetrics)

Measure one floor outline in renderer world units.

getSurfaceTransform: ((id: string) => null | AsukaAssemblySurfaceTransform)

Read the absolute center and orientation of one floor or wall.

Center one component above another and keep their widths synchronized.

listComponents: (() => AsukaAssemblyComponent[])

List every assembly-enabled Product 3D instance in the active view.

listMaterialPresets: (() => AsukaAssemblyMaterialPreset[])

List built-in and user-created reusable surface materials.

listStackLinks: (() => AsukaAssemblyStackLink[])

List vertical instance links in the active 3D view.

listSurfaces: (() => AsukaAssemblySurface[])

List the floors and walls explicitly created in build mode.

Place a component, applying the last valid transform when required.

previewPlacement: ((componentId: string, input?: AsukaAssemblyPlacementInput) => AsukaAssemblyPlacementResult)

Evaluate snapping, collisions, clearances and adjacency without mutating.

removeMaterialPreset: ((presetId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<boolean>)

Remove a user-created reusable surface material.

removeSurface: ((id: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>)

Remove one floor or wall.

Create or replace a reusable surface material.

selectSurface: ((id: null | string) => null | AsukaAssemblySurface)

Select one floor or wall for appearance editing.

setConstructionMode: ((active: boolean) => AsukaAssemblyInteractionState)

Enter or leave the persistent guided construction session.

setFloorEdgeAngle: ((floorId: string, edgeIndex: number, angleDegrees: number, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>)

Set one floor edge angle while preserving its length.

setFloorEdgeConstraint: ((floorId: string, edgeIndex: number, constraint: AsukaAssemblyFloorEdgeConstraint, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>)

Lock or unlock the exact length and angle of one stable floor edge.

setFloorEdgeLength: ((floorId: string, edgeIndex: number, length: number, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>)

Set one floor edge length while keeping its direction and stable corner ids.

setMoveTool: ((active: boolean) => AsukaAssemblyInteractionState)

Enable regular drag placement without requiring the Ctrl modifier.

setRoomWallEnabled: ((floorId: string, edgeIndex: number, enabled: boolean, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyFloorSurface>)

Add or remove the wall linked to one stable room edge.

startDrawing: ((input: AsukaAssemblyStartDrawingInput) => void)

Start a mouse tool for selecting, drawing or erasing surfaces.

Move or rotate a complete floor or wall without changing its dimensions.

unlinkStack: ((linkId: string, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblyStackLink>)

Remove a vertical instance link without deleting either component.

updateSurface: ((id: string, patch: AsukaAssemblySurfacePatch, options?: AsukaAssemblyMutationOptions) => AsukaMutationPromise<null | AsukaAssemblySurface>)

Update geometry or appearance for one floor or wall.

validate: (() => AsukaAssemblyValidation)

Validate the whole scene against collision, clearance and adjacency rules.