Move point?
-
(newb question here)
With "ComponentInstance" and "tranformation" you can move a selected component around.
Is there a way to move a selected point around? Or does it get complicated by having to select an edge, then find the points in it to move?
-
You can move Instances/Groups, Points and Vertices.
You apply transformations to most but for vertices you must use another method
'Transformations' can be points, translations, rotations and scaling etc...tr=Geom::Transformation.translation([0,0,1])### =='changes' something; here == move it up 1 unit...
group.transform!(tr)### =='changes' the group by 'tr', up 1 unit...
or
point.transform!(tr)### =='changes' point by 'tr', up 1 unit...but for a vertex or vertices you need to use...
entities.transform_entities(tr,[vertices])here an array (list) of vertices have 'tr' applied...
or
entities.transform_by_vectors([vertices],[vectors])you take an array of vertices and apply an array of vectors to do the translation...
So for one vertex
entities.transform_by_vectors([vertex],[[0,0,1]])### moves vertex by vector up 1 unit in Z...You can also apply these 'entities.transform....' methods to any collection of 'things' like an array of group.entities...
-
Very cool! Thanks for the examples, TIG!
The difference between 'point' and 'vertex' is construction point vs. edge point?
-
ConstructionPointis a construciton pointEntity.
Vertexis the end points of Edges.Point3dis just a point in 3d space. -
...and
vertex.positionreturns the point in space that the vertex is
-
Awesome -- all very helpful bits of info!
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