Some question about the polygon structure

dear all
As we know from the polygon structure,we can the vertices about the x, y axis,which as show below.

Now if I want to set the vertices about the x,z axis,can the software support to do it?If can,how can I work to realize it?

Hope to get your feedback.Thanks a lot.

You cannot change the plane where the polygon is created, but you can rotate the object:

Hello @gbaethge,
Here I have anoher question about the plygon structure.In the script,I want to change the x and y of the vertices 3, how can I do it?

Hi @zhuocheng,

You can easily change the vertices. They are defined as a n by 2 matrix, n being the number of points defining the polygon. To modify the vertices, you can first get the existing vertices, modify them and set the new vertices:

vertices = getnamed("poly", "vertices"); # get the existing vertices from the object "poly" 
vertices(3,1) = 1e-6; # x for the 3rd vertice
vertices(3,2) = 2e-6; # y for the 3rd vertice
setnamed("poly", "vertices", vertices);
1 Like