@bitbybit-dev/occt
Version:
Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.
64 lines (63 loc) • 2.54 kB
TypeScript
import { BitbybitOcctModule, Handle_TDocStd_Document, TopoDS_Shape } from "../../../bitbybit-dev-occt/bitbybit-dev-occt";
import { OccHelper } from "../../occ-helper";
import * as Inputs from "../../api/inputs";
import * as Models from "../../api/models";
/**
* OCCT Assembly Query for querying assembly document data.
*
* This class provides methods for:
* - Querying document parts and assemblies
* - Getting shapes from labels
* - Retrieving label colors and transforms
* - Getting detailed label info
* - Retrieving full assembly hierarchy
*
* All methods use document handles directly (no global document storage).
*/
export declare class OCCTAssemblyQuery {
private readonly occ;
private readonly och;
constructor(occ: BitbybitOcctModule, och: OccHelper);
/**
* Get all parts and assemblies in a document.
*
* @param inputs - Document handle
* @returns Array of part/assembly info objects
*/
getDocumentParts(inputs: Inputs.OCCT.DocumentQueryDto<Handle_TDocStd_Document>): Models.OCCT.DocumentPartInfo[];
/**
* Get a shape from a label in a document.
*
* @param inputs - Document handle and label
* @returns The shape at the given label
*/
getShapeFromLabel(inputs: Inputs.OCCT.DocumentLabelQueryDto<Handle_TDocStd_Document>): TopoDS_Shape;
/**
* Get the color of a label in a document.
*
* @param inputs - Document handle and label
* @returns Color info including hasColor, r, g, b, a
*/
getLabelColor(inputs: Inputs.OCCT.DocumentLabelQueryDto<Handle_TDocStd_Document>): Models.OCCT.LabelColorInfo;
/**
* Get the transformation of an instance label.
*
* @param inputs - Document handle and label
* @returns Transform info including matrix, translation, quaternion, scale
*/
getLabelTransform(inputs: Inputs.OCCT.DocumentLabelQueryDto<Handle_TDocStd_Document>): Models.OCCT.LabelTransformInfo;
/**
* Get detailed info about a label.
*
* @param inputs - Document handle and label
* @returns Detailed label info including type, flags, children
*/
getLabelInfo(inputs: Inputs.OCCT.DocumentLabelQueryDto<Handle_TDocStd_Document>): Models.OCCT.LabelInfo;
/**
* Get full assembly hierarchy as structured data.
*
* @param inputs - Document handle
* @returns Assembly hierarchy with all nodes
*/
getAssemblyHierarchy(inputs: Inputs.OCCT.DocumentQueryDto<Handle_TDocStd_Document>): Models.OCCT.AssemblyHierarchyResult;
}