-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component.glue_to can't assign component (only faces) #111
Comments
This is a limitation of the current API. To support this we'd have to allow for an instance path to be provided in order to correctly attach to faces across nested instances. |
OK thanks. There are no work arounds as far as I know. |
+1 for implementing this. (It's basically in the GUI <-> API parity realm.) |
Just to clarify. I'm talking about component instances. window_component.glued_to == wall_component
true
window_component
#<Sketchup::ComponentInstance:0x00019f51426070>
wall_component
#<Sketchup::ComponentInstance:0x00019f51489d28>
window_component.glued_to = wall_component
ArgumentError: wrong type - expected Sketchup::Face |
Judging from the model behavior and current getter return value no instance path is needed. It only glues to faces or instances in the same drawing context, not nested entities. In time it could be cool to place a vase on a shelf in a bookcase, without being inside the bookcase component, and have it moved when the shelf moves, but just exposing what is already there to the Ruby API is enough in most cases. |
We want to add support for instance path to this like we did for attaching dimensions. |
Before reworking the core, would it be possible to just expose what is already supported to the API? |
Reworking the core? What do you mean? The core already uses instance paths - it's just the API that didn't expose that. |
Is this logged internally as something that could be implemented without having glue-to support instance paths? I need the existing functionality in SketchUp for a project but it isn't exposed to the API. I don't want to glue to any individual face inside of a group/component, just the group/component as a whole, as you already can do from the UI. |
hmm... maybe you are right. I might be confusing it with dimension-attachments. |
Yup I can verify that dimensions reference geometry inside a group/component but glued objects never reference entities inside the object they are glued to. |
I looked at the source, and it's not using instance paths at all. It's using a direct relationship to another entity. No 3d point references. |
This is great news! Then it should be relatively simple to expose it. |
And |
This is also needed in the C API for exporters/importers, e.g. to map SketchUp gluing to 3ds Max parenting. |
Has this been looked at any more? I'm using the work around posted here. https://forums.sketchup.com/t/bug-in-glued-to/74535/43?u=neil_burkholder This work around is a real pain because the original component is replaced, and this causes issues with references to deleted entities. |
I'll bump it internally. |
A big thank you for implementing this in 2021.1 |
When placing a component in the UI it can be glued to either a face or another component.
When assigning the glued_to in the API however an error is displayed.
Expected result is that the window component would be glued_to the wall compoent.
The text was updated successfully, but these errors were encountered: