Skip to main content

@buerli.io/buerligons

Buerligons, the CAD app on buerli and ClassCAD (sketches, features, parts and assemblies), as one React component. With it comes what a host needs to open and save documents of its own, and to set the look of the 3D view.

What it exposes​

The host connects with buerli's own init (@buerli.io/classcad) and any client; Buerligons prepares each client itself. The app fills its container, which needs a size. A host that keeps its documents itself opens and saves them with an EditorController and renders <Buerligons welcome={false} />.

Example​

import { createRoot } from 'react-dom/client'
import { init, WASMClient } from '@buerli.io/classcad'
import { Buerligons } from '@buerli.io/buerligons'

// How a drawing reaches ClassCAD: here the engine runs in the page, with a public token of a classcad.ch account
init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }))

// The app fills its container, which needs a size
createRoot(document.getElementById('root')!).render(
<div style={{ height: '100vh' }}>
<Buerligons />
</div>,
)

API​

NameDescription
AppThe app as one React component, and its props. Every host needs it: <Buerligons /> in a container with a size, once init has connected buerli.
DocumentsOpening, saving and closing documents from the host's side, and following them in React. A host needs it when it keeps the files itself (a PDM, a portal) and renders <Buerligons welcome={false} />; the app's own File menu needs none of it.
LooksHow the 3D view draws: the realistic or the flat look, and materials for the products in the realistic look. A host needs it to switch the look from controls of its own, or to give its products the materials they are made of.