Add_dimension_linear with group transformation
-
I am looking for a way to get the dimension to move with the group after I apply a transform.
model = Sketchup.active_model
entities = model.entities
model1 = Sketchup.active_modeltk_group = Sketchup.active_model.entities.add_group
pt201 = [0,0,0]
pt202 = [10,0,0]
pt203 = [10,10,0]
pt204 = [0,10,0]dim = entities.add_dimension_linear pt201, pt202, [0, 0, 10]
tk_group.entities.add_face pt201, pt202, pt203, pt204
new_transformation = Geom::Transformation.new([30,0,0])
tk_group.transform! new_transformation -
@issamal said:
I am looking for a way to get the dimension to move with the group after I apply a transform.
model = Sketchup.active_model
entities = model.entities
model1 = Sketchup.active_modeltk_group = Sketchup.active_model.entities.add_group
pt201 = [0,0,0]
pt202 = [10,0,0]
pt203 = [10,10,0]
pt204 = [0,10,0]dim = entities.add_dimension_linear pt201, pt202, [0, 0, 10]
tk_group.entities.add_face pt201, pt202, pt203, pt204
new_transformation = Geom::Transformation.new([30,0,0])
tk_group.transform! new_transformationJust put the dimension in the group
model = Sketchup.active_model entities = model.entities model1 = Sketchup.active_model tk_group = Sketchup.active_model.entities.add_group pt201 = [0,0,0] pt202 = [10,0,0] pt203 = [10,10,0] pt204 = [0,10,0] tk_group.entities.add_face pt201, pt202, pt203, pt204 dim = tk_group.entities.add_dimension_linear pt201, pt202, [0, 0, 10] new_transformation = Geom;;Transformation.new([30,0,0]) tk_group.transform! new_transformation -
Thanks. That was really helpful.
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