bitbybit.dev v1.0.0-rc.1
    Preparing search index...

    Class OCCTAssemblyQuery

    Index

    Constructors

    • Parameters

      • occWorkerManager: OCCTWorkerManager

      Returns OCCTAssemblyQuery

    query

    • Get all parts and assemblies in the document.

      Parameters

      Returns Promise<DocumentPartInfo[]>

      Array of part/assembly info objects

      get parts

      false

      const parts = await occt.assembly.query.getDocumentParts({ document });
      for (const part of parts) {
      console.log(`${part.name}: ${part.type} at label ${part.label}`);
      }
    • Get the transformation of an instance label.

      Parameters

      Returns Promise<LabelTransformInfo>

      Transform info including matrix, translation, quaternion, scale

      get label transform

      false

      const transform = await occt.assembly.query.getLabelTransform({
      document,
      label: "0:1:1:1"
      });
      console.log("Translation:", transform.translation);
      console.log("Rotation (quaternion):", transform.quaternion);
    • Get detailed info about a label.

      Parameters

      Returns Promise<LabelInfo>

      Detailed label info including type, flags, children

      get label info

      false

      const info = await occt.assembly.query.getLabelInfo({
      document,
      label: "0:1:1:1"
      });
      console.log(`Type: ${info.type}, Is assembly: ${info.isAssembly}`);