MLightCAD
    Preparing search index...

    Variable AcTrGeometryUtilConst

    AcTrGeometryUtil: {
        geBox2dToThreeBox2d: (from: AcGeBox2d) => Box2;
        geBox2dToThreeBox3d: (from: AcGeBox2d) => Box3;
        geBox3dToThreeBox3d: (from: AcGeBox3d) => Box3;
        goBox3dToGeBox2d: (from: AcGeBox3d) => AcGeBox2d;
        threeBo2dToGeBox2d: (from: Box2) => AcGeBox2d;
        threeBox3dToGeBox2d: (from: Box3) => AcGeBox2d;
        threeBox3dToGeBox3d: (from: Box3) => AcGeBox3d;
    } = ...

    Utility object containing geometry conversion functions between Three.js and CAD geometry types.

    This utility provides bidirectional conversion functions for bounding boxes:

    • Between 2D and 3D bounding boxes
    • Between Three.js and CAD geometry coordinate systems
    • Cross-dimensional conversions (2D ↔ 3D)

    Type Declaration

    • geBox2dToThreeBox2d: (from: AcGeBox2d) => Box2

      Converts CAD geometry AcGeBox2d to Three.js Box2

    • geBox2dToThreeBox3d: (from: AcGeBox2d) => Box3

      Converts CAD geometry AcGeBox2d to Three.js Box3 (Z=0)

    • geBox3dToThreeBox3d: (from: AcGeBox3d) => Box3

      Converts CAD geometry AcGeBox3d to Three.js Box3

    • goBox3dToGeBox2d: (from: AcGeBox3d) => AcGeBox2d

      Converts CAD geometry AcGeBox3d to CAD geometry AcGeBox2d

    • threeBo2dToGeBox2d: (from: Box2) => AcGeBox2d

      Converts Three.js Box2 to CAD geometry AcGeBox2d

    • threeBox3dToGeBox2d: (from: Box3) => AcGeBox2d

      Converts Three.js Box3 to CAD geometry Box2d (ignores Z)

    • threeBox3dToGeBox3d: (from: Box3) => AcGeBox3d

      Converts Three.js Box3 to CAD geometry AcGeBox3d

    // Convert Three.js box to CAD geometry
    const threeBox = new THREE.Box3();
    const cadBox = AcTrGeometryUtil.threeBox3dToGeBox3d(threeBox);

    // Convert CAD geometry box to Three.js
    const cadBox2d = new AcGeBox2d();
    const threeBox2d = AcTrGeometryUtil.goBox2dToThreeBox2d(cadBox2d);

    // Cross-dimensional conversion
    const threeBox3d = new THREE.Box3();
    const cadBox2d = AcTrGeometryUtil.threeBox3dToGeBox2d(threeBox3d);