Hello.
I have started using the SketchUp C API to import SKP files into our standalone app.
Is there a way within the API to access what SketchUp considers a “Surface” which appears to be a set of connected faces.
I don’t see a way in the API to get the surfaces - knowing that some faces are connected instead of all being independent would greatly increase our performance when making polygonal meshes from the faces.
The edges between “surface” faces are softened and/or smoothed.
The “surface” feature is a GUI feature and I do not think either API (Ruby nor C) has a “get surface” method / function.
So within any entities collection (model, group or component) you would need to filter the faces you get back. It might be easier to collect the edges, and filter out any that are not softened or smoothed. Then get the faces that share the remainder. You’ll need to decide whether you also need the unsoftened / unsmoothed border edges.
Another possibility is to go via the EdgeUse. If you have a face that is part of a surface, having a smoothed / softened edge, then you get the next connected edge from the edge’s EdgeUse object and from that the connected face. … And so on.
It was a second thought because any entities collection might have more than 1 independent “surface” feature. The 1st suggestion would treat them all as one, which might lead to an erroneous import.