Hi all !
I’m actually struggeling with SU regarding the transormations. I’m writing a scene clean up tool for my company that merge component instances geometries together into a new definition which is instanciated at the same previous instances positions.
Everything runs pretty well except that the final definition has the right pivot point but the geometries aren’t at the right place. Maybe I’m not doing it right but here are my steps :
Here is for exemple a wall top plates set that I need to merge together in a single instance (have a look at the transformations).
First I’m grouping the components instances together into a group and I’m moviving them to the origin (assuming that the definition pivot point will be at the origin when creating the new definition) in the way I want it to be. Then I’m exploding the meta group to keep only the instances at the right place at the model root (see also transformations.
Then I’m targetting my merging code that process the boolean merge operation for each geometry LOD group of the components. The result is quite strange, the pivot point is right where I wanted it to be but hte geometry has moved (inside my merginig code I’m performing transormations but shouldn’t lead to that result and has been check many times on other cases).
So I started to dig into what hapened and using a break point just before the merging operation I was checking the component transformations that was observed at step 2. And I was suprised and confused that the transformation weren’t the same…
The transformations observed at step 4 when analyzing code is consistant with the ones at step 1 (instances at their original positions) but unconsistant with the ones observed at step 2 in Sketchup. Tracking the instances transformation step by step in the debugger leads me observing that the instances transformations never change even if the meta group encapsulating them is moved and exploded.
So some few questions :
- Does it feels normal to you ?
- If Sketchup is working that way, what is the go way to perform the merging operation ?
Thanks for reading me so far and I hope someone will have a clue for me 'cause I’m really lost right now