Change Axes in Sketchup.
-
How to change the axes of any component in sketchup using code.
-We can changes axes of any component by right click and select "change axes" menu.
-I want to change this axes using ruby code.Is there any option to do this using ruby code?
-
This is what I use
# Let 'point' be the new insertion point of the component. # Let vector=ORIGIN.point.vector_to(point) # Let tr=Geom;;Transformation.translation(vector) vector = component.transformation.origin.vector_to(new_origin) tr = Geom;;Transformation.translation(vector) component.definition.entities.transform_entities(tr.inverse, component.definition.entities.to_a) # All of the component's innards jump to suit, so the instance is now in the wrong place relative to its container's contents... # To fix any instances so the contents are placed back as they were, inside their individual container... component.definition.instances.each{ |inst| inst.transform!(tr) } component.definition.invalidate_bounds
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement