Is there any example about geometry-related APIs?

249 viewsQuestions and Answers
0

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

Answered question
1

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

Answered question
You are viewing 1 out of 1 answers, click here to view all answers.