Changing the height of an edge (line)
-
hi,
i cannot solve the following task:
if i have , let's a group of faces,
i would like to
-select the edges under a DEFINE HEIGHT (let's assume , all edges are horizontal, so start end end of the edge (line) are both at the same relative height)
-scroll thru the edges
-change the height of start and end of those edges to a new defined height
i don't find my way to it..... (result is : all bottom faces are at the ZERO-PLANE above))
thanx for helping!
stan
-
You need to transform the vertices used by the edge[s].
Remember that you only need to translate any one vertex once, so two edges that share a vertex give a 4 element array - use.uniq!
on it to remove duplicates and give the 3 vertices needed, before processing it...
See the 'entities' transformation methods:
entities_containing_the_vertices.transform_entities(transformation, array_of_vertices)
will relocate the vertices as the transformation dictates.
That will usually be a translation [vector], but it could be one of the several other transformation types...
You can also use:
entities_containing_the_vertices.transform_by_vectors(array_of_vertices, array_of_vectors)
which moves each of the vertices in the array along the specified vectors, this allows you to have a different vector for each vertex...
Again remember to remove duplicate vertices from the array before making the matching vector array, otherwise shared vertices could move twice. And you need to have two arrays of the same length ! -
hi tig,
thanx for your explanation. too high for me at the moment ( after several trials), but i keep on learning.
i solved the problem by calculation of the bottom side at 0 directly during the creation of the elements.
but one day i will also understand the vertices transormation...
regards
stan
Advertisement