Why would gluing to a FACE be illegal, when the Sketchup::Face
class itself has a #get_glued_instances()
method ?
Currently, in order for the built-in “cuts opening” feature to work, the cutting component must be glued directly to a face (this means inside a group or component,) the component must have been drawn correctly lying upon the XY cutting plane, and it’s snapto behavior setting set to anything other than none.
I’m “purty” sure we’ve complained about this over the years and have asked for cutting components that will cut multiple faces. (Ie, great for doors and windows, bolts, etc.) This would imply (I hope) gluing to the “outside” of a component.
Anyhow, … I have a Refinement project I play with from time to time, and it has the same refinement methods you show. We’ve discussed this in the past and some of us may have posted our refinement methods in those threads.
_EDIT: Evidence your thread on the subject 2 full years ago: Find faces component 'lays' on - #12 by Neil_Burkholder
So for the Sketchup::ComponentDefinition
class refinement I have a whole bunch of “get_glued_… whatever” methods to find internally glued instances that are almost verbatim what you have shown here, except they refine the definition instead of accessing it via self.parent
.
The API docs are incorrect in that they do not state that the return classes for Sketchup::ComponentInstance#glued_to()
can also be (in addition to nil
and Sketchup::Face
,) Sketchup::Group
, Sketchup::ComponentInstance
and Sketchup::Image
.
This also implies that the Sketchup::ComponentInstance#glued_to=()
can accept all these same classes as the object argument for assignement (or deassignment in the case of nil
.)
FYI, it has been requested for a long time that Sketchup::Group
get a behavior and these two gluing methods.