Hello,
I am trying to export the geometries from BIMVision, and stucked on the method of viewer::get_geometry(). I guess the APIs should work because there is a plugin named as STL Exporter. Does anyone have any information about these APIs? Code example would be much appreciated!
Charles
Anna Answered question 28 February 2019
Hello,
Please have a look at the below code:
//pseudocode for C++ (03)
std::vector<viewer::Face> faces;
viewer::OBJECT_ID id;
viewer::PLUGIN_ID pid;
//…
if(viewer::first_geometry(pid, obj))
do
{
unsigned int faces_count = viewer::get_geometry(pid, NULL, 0);
if(faces_count > 0)
{
faces.resize((size_t)faces_count);
viewer::get_geometry(pid, &faces[0], faces_count);
//…
}
} while(viewer::next_geometry(pid));
//…
Best regards,
Anna
Anna Answered question 28 February 2019