I have a PickHelper tool that can draw outlines of entities. There isn’t too much data that can be obtained from the Sketchup::SectionPlane API description (the plane method’s data is useful). Section planes inherit a “bounds” method from DrawingElement, but currently a section plane’s bounding box object has its corner method returning the same point for all 8 corners. Is this documented anywhere?
Does the container containing the Section Plane have anything else (with valid size) within it ?
(Per the logged issue, a Section Plane inherits the size of it’s parent container.)
Yes I do believe it is related to the issue referenced. (And no it is not documented.)
Basically the methods inherited by Drawingelement do not “play well” within the Section Plane class.
Ie, the bounds for a Section Plane are currently problematic and need work.
The workaround is likely to use it’s parent’s bounds.
The plane method for the object returns the coefficients for the infinite plane, but it would be nice to have access to the 4 finite corners when a developer wants to outline them somehow with their own tool. I do put a rectangle on one, but it sounds like the way it behaves is not a bug, but a feature.
I update the comments at the referenced issue (574) to include a request that, if a bounding box is provided, that it include the section plane’s 4 corners.
I put a section plane on the overall model of something I was working on (not in a grouped object). It produces a valid Point3d that is somewhere within the bounds of the model, but not what appears to be the center of the section plane.
My work around for determining the section plane’s bounds center is to obtain the associated model or grouped object center point that the section plane is in (and part of) and project it onto the section plane.
Yeah, that is what I was thinking. To use the projection (distance from the parent’s bottom bounds) as a transform to adjust the parent containers lower bounds corner points so that they are the section plane’s corners.