I am bringing 3 parts (components) which are placed such that if all 3 are exploded and then all selected and made a single component. I have not been able to accomplish this with the API. Any suggestions
Keith
combining components into 1 component
6 posts
• Page 1 of 1
Re: combining components into 1 componentI worked on this some more and found a Solution.
Created a new layer added each comp to that layer exploded each comp cleared selection added all entities on the layer to the selection added selection to new group cleared selection added group to selection I could now make the group a solid I did not need a component at this point.
Re: combining components into 1 component
1. Create a group 2. Add instances of each component to the group and explode 3. Convert group to component.
Re: combining components into 1 componentI will try Mitch's code. Question there are 2 constantans I am not familiar with in your code. SKETCHUP_CONSOLE.clear and IDENTITY.
The problem with my version is that the entities that make up the final are on the Components layer not layer0. In the code I thought I was moving them back to layer0 but it didn't work and it didn't flag an error.
Thanks Keith
Re: combining components into 1 component
SKETCHUP_CONSOLE.clear simply clears the Ruby Console so any errors that occur will be more obvious. IDENTITY is the same as Geom::Transformation.new().
Re: combining components into 1 componentThanks Mitch your code worked very well once I figured out the transformation I needed. The code also left the component entities on Layer0 which was a problem for my code.
The forum is an amazing source of info thanks to the many people who are willing to share their knowledge. Keith
6 posts
• Page 1 of 1
|