help with ruby
locating points p3 p4 with p1 and p2
as shown in Figure
Please attach the image properly…
Eu mesmo lendo um pouco consegui.
não sei se existe outra maneira.
vetor = p1.vector_to(p2)
a = vetor.axes
v1 = a
v2 = a
v3 = a
p3 = p1.offset(v1,B)
p4 = p3.offset(v2,C)
Obrigado TIG pelo seu interesse.
C (in your example) are undefined.
More explanation of what you are attempting to do, is needed.
Do you want p3 to be mid point between p4 and p2?
Do you want p3 to be on a line between the direction of A and C?
Can you explain in more details please to what you are doing?
Considering the segment p1 p2 as being the z axis and the other two segments being x and y axis. What I am trying to achieve is to define p1 and p2 using the cursor and give values to B and C. With the intent to create a shape which is going to be extruded along the z axis.
defines the first vector.
I assume you want it to be ‘flat’ ?
If so, after
p1 is picked, get
p2 and then change:
Now you have a ‘flat vector’.
The ‘up’ vector is simply set up using:
Now to find
Now you have the three vectors and four points needed ?
v12, v13, v14 p1, p2, p3, p4