Why, with xline (not a ray) I have to create two xline if I want to look for the intersecction ( GetIntersectionWith() ) for both sides.?
For example, If I have a circle and I create a xline with BasePoint in the center, with GetIntersectionWith() we will get only 1 cross point.
I know that we can do:
xl.UnitDir = vector;
and
xl.UnitDir=vector.negate;
But it is the same that create 2 rays. So, what is the benefits of using xline?
Thanks in advance.
Solved! Go to Solution.
Solved by joantopo. Go to Solution.
Is not the same this?:
Xline LineaAuxiliar = new Xline(); //LineaAuxiliar.BasePoint = new Point3d(ptBase.X, ptBase.Y, 0); //LineaAuxiliar.SecondPoint = new Point3d(segundoPunto.X, segundoPunto.Y, 0);
than:
Xline LineaAuxiliar = new Xline(); Vector3d vector = new Vector3d(segundoPunto.X - ptBase.X, segundoPunto.Y - ptBase.Y, 0); LineaAuxiliar.UnitDir = vector;
I don´t get the same results.
UnitDir is always from origin, isn´t it?
So, I have to use BasePoint and SecondPoint obligatory.
Sorry, I was wrong.
I have fixed the length to obtain Second point very far from BasePoint.