]]>

]]>

]]>

]]>

]]>

Hi all,I am studying mechanical engineering and now I am doing my diploma thesis.I have to programm a new command in Rhino and I have read the Rhino Script, yet. And programmed some easy commands. So I have to create a command to transform a coordinate system. I try to explain my problem now.I have two objects with the same number of control points. The control points are moved with a coordinate transformation (see figure).So I have all the coordinates before and after the transformation. And I would like to have the Transformation matrix/matrices for these control point. I thought about it. If I now take only one control point of each object and want to set a transformation matrix for this, I only have 3 equations and up to 9 unknowns. When I select two control points of each object and I get a transformation matrix for the edge. Then I have 6 equations but still up to 9 unknowns.Now I have discovered a third possibility. I have nearly the same system like above, but only painted.The control points before the transformation are described by a (x,y)-coordinate system and the afterwards by (b,a)-coordinate system. First I consider only one quad. The requirement which must be given, since only the points are looked at, it must be either straight connections between points.The formula for the example in the figure before is: When I set all the equations, I have 8 equations with 8 unknowns and solve the system of equations. In the end I get the 4x2 Matrix (figure 3) as Transformationmatrix for the quad is shown in the second figure.Now I need a programming code in Rhino that I always select the four to a quad adjacent points with which I can calculate a transformation matrix. If I take the first picture I need a command, which, if the user select the hole object, takes first the points 1,2,3,5, second 3,4,6,8 and third the points 4,5,6,7 in a loop. Can anyone help me?Tanks a lot in advanceBettinaSee More