How to accurately obtain the geometric model information of components in 2D mode in Forge Viewer

recently found in the project that the viewer.fitToView () method in 2D mode is invalid because there is no model.getData (). InstanceTree in 2D. Therefore, I want to find the geometric model information of each component in the model, calculate the bounding box, and make a method similar to fitToView . How to accurately obtain the geometric model information of the component in 2D mode?

Feb.18,2022

can refer to: https://codeshelper.com/a/11.


I don't know if this is the source code, but the coordinates of components in 2D can be found. Please search the parsePointsArray method globally. In this method, the coordinate values of the model are put into a variable. If you can find out the storage rules of these coordinates, If you save it, you will find the complete coordinate values of the component. In this way, after calculating the bounding box, we can realize the function of component fitToView in 2D mode.
if it is not found, you can look for relevant information one by one during the 2D loading process.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b374c6-2c07b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b374c6-2c07b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?