IFClite TypeScript API
    Preparing search index...

    Class BCFNamespace

    bim.bcf — BIM Collaboration Format (topics, viewpoints, comments, I/O). The GUID and color utility methods live in bcf-guid-color.ts's base class (module-size split, #4294).

    Hierarchy

    • BCFGuidColorBase
      • BCFNamespace
    Index
    • backend supplies the viewer's render-frame offset (viewer.getRenderFrameOffset). Without one (new BCFNamespace(), as the CLI's bcf command uses it) viewpoints are taken as already being in world coordinates.

      Parameters

      Returns BCFNamespace

    • Add a comment to a topic.

      Parameters

      • topic: unknown
      • comment: unknown

      Returns Promise<void>

    • Add a topic to a project.

      Parameters

      • project: unknown
      • topic: unknown

      Returns Promise<void>

    • Add a viewpoint to a topic.

      Parameters

      • topic: unknown
      • viewpoint: unknown

      Returns Promise<void>

    • Convert viewer camera state to BCF orthogonal camera. viewToWorldScale is required — it is the view extent the library returns verbatim (#4294).

      Parameters

      • camera: unknown
      • viewToWorldScale: unknown

      Returns Promise<unknown>

    • Convert viewer camera state to BCF perspective camera.

      Parameters

      • camera: unknown

      Returns Promise<unknown>

    • Convert BCF clipping plane to viewer section plane. bounds is required — the library needs it to compute a percentage position (#4265). Accepts the SDK's tuple AABB or the library's object-shaped bounds.

      Parameters

      • clippingPlane: unknown
      • bounds: AABB | BcfViewerBounds

      Returns Promise<unknown>

    • Convert an IDS validation report into BCF topics (one topic per failed spec).

      Parameters

      Returns Promise<unknown>

    • Create a new BCF project.

      Parameters

      • Optionaloptions: { name?: string; version?: "2.1" | "3.0" }

      Returns Promise<unknown>

    • Create a new topic.

      Parameters

      Returns Promise<unknown>

    • Create a BCF viewpoint from viewer camera/section state.

      Converts the SDK's tuple-based camera/x-y-z sectionPlane shapes (bim.viewer.getCamera()/getSection()) into @ifc-lite/bcf's object-based ViewerCameraState/ViewerSectionPlane shapes. Throws IncompleteCameraStateError for a camera missing position/target/up, and MissingSectionBoundsError for an enabled section plane with no bounds — see #4251.

      camera, sectionPlane and bounds are read in the viewer's frame, the one bim.viewer.getCamera()/getSection() return. The viewpoint is written in IFC world coordinates, as BCF requires: for a georeferenced model the viewer draws shifted towards the origin, the backend's render-frame offset is added to the camera and clipping-plane positions (#4879). With no viewer (or no shift) the offset is zero.

      Parameters

      Returns Promise<unknown>

    • Extract viewer state from a BCF viewpoint.

      Converts @ifc-lite/bcf's object-based camera/sectionPlane (down/front/side axis) back into the SDK's tuple camera / x/y/z sectionPlane shapes, so the result round-trips straight into bim.viewer.setCamera()/setSection() — the same conversion createViewpoint() performs in reverse (#4251). Pass bounds (the model's AABB) to also recover sectionPlane; without it @ifc-lite/bcf cannot place a clipping plane and sectionPlane is omitted, matching createViewpoint()'s own bounds requirement.

      The viewpoint is read as IFC world coordinates and the result is in the viewer's frame, ready for setCamera(): the backend's render-frame offset is subtracted (#4879). A viewpoint written by ifc-lite before #4806, still in the render frame, is recognised against bounds and kept as it is.

      Parameters

      • viewpoint: unknown
      • Optionalbounds: AABB

      Returns Promise<ExtractedViewpointState>

    • Returns Promise<string>

    • Returns Promise<string>

    • Parameters

      • guid: string

      Returns Promise<string>

    • Parameters

      • guid: string

      Returns Promise<boolean>

    • Parameters

      • uuid: string

      Returns Promise<boolean>

    • Convert BCF orthogonal camera to viewer camera state.

      Parameters

      • orthogonal: unknown

      Returns Promise<unknown>

    • Parameters

      • argb: string

      Returns Promise<{ a: number; b: number; g: number; r: number }>

    • Convert BCF perspective camera to viewer camera state.

      Parameters

      • perspective: unknown

      Returns Promise<unknown>

    • Read a BCF file (ZIP archive) into a BCF project structure.

      Parameters

      • data: ArrayBuffer | Blob

      Returns Promise<unknown>

    • Convert viewer section plane to BCF clipping plane. bounds is required — the library needs it to place an absolute location (#4265). Accepts the SDK's tuple AABB or the library's object-shaped bounds.

      Parameters

      • section: unknown
      • bounds: AABB | BcfViewerBounds

      Returns Promise<unknown>

    • Parameters

      • r: number
      • g: number
      • b: number
      • Optionala: number

      Returns Promise<string>

    • Update the status of a topic.

      Parameters

      • topic: unknown
      • status: string
      • modifiedAuthor: string

      Returns Promise<void>

    • Parameters

      • uuid: string

      Returns Promise<string>

    • Write a BCF project to a downloadable Blob (ZIP archive).

      Parameters

      • project: unknown

      Returns Promise<Blob>