#pragma once #ifdef BIMCOVERSION_EXPORT #define BIMCONVDLLIMPEXP __declspec(dllexport) #else #define BIMCONVDLLIMPEXP __declspec(dllimport) #endif #include "threejs.h" #include "BIMEntity.h" // 解析3js文件 class BIMCONVDLLIMPEXP ThreeJsTools { public: // 解析ThreeJs-Json文件到对应的C++结构 static bool parse3Js(LPCTSTR pszJson , ThreeJs::GeometrySet &gs , ThreeJs::Object &obj , ThreeJs::MaterialSet &ms , ThreeJs::Metadata &meta); // 将 ThreeJs-Json 中的矩阵转为 AcGeMatrix3d static bool convert3JsMatrix2AcGeMatrix3d(const std::vector &ar, AcGeMatrix3d &mat); // 将ThreeJs-Json的faces数组转AcDbSubDMesh的faces数组 static bool convert3JsFaces2SubDMeshFaces(const std::vector &face3Js, AcArray &faceSubD); // 将ThreeJs-Json的点数组转AcGePoint3dArray static bool convert3JsPointArray2AcGePoint3dArray(const std::vector &pnts, AcGePoint3dArray &gepts); // static bool collectBimEntitiesFrom3Js(LPCTSTR pszJs, std::vector &bims); }; // 解析上华Js文件 class BIMCONVDLLIMPEXP ShJsTools { public: static bool parseShJs(LPCTSTR pszJson , ShJs::Objects &objs , AcGePoint3d &ptLeftDown , double &dLength , double &dWidth , double &dHeight); static bool collectBimEntitiesFromShJs(LPCTSTR pszJs , std::vector &bims , AcGePoint3d &ptLeftDown , double &dLength , double &dWidth , double &dHeight); static bool filterR2SFiles(LPCTSTR pszR2S, std::vector &paths, bool *bHideEw); };