Drawing vector perpendicular to a line

Hi there,

At first I#d like to draw a line, which connects two opposed point (px and py).
I used AnyDrawLine, the p0 should be the same point as anyrefframe (px) and p1 should be a second point (py). But I dont get it done that p1 is somehow connected to py.

Secondly Id like to have a vector perpendicular to that line. My problem is how to I refer to that line?

thanks mates!

Hi Haukeee

I think this is a bug…

I have tested the object a bit and it appears that if there are no other draw object in the view, it can not focus correctly on the object and it disappears. If you add for example an AnyDrawRefFrame ti works. The reason is probably that the bounding box of the anydrawline object is not correct.

Thanks for making us a aware of this bug, it will be correct for the next release.

Concerning the second question i have created a small model that should do what you are requesting, please see below, i hope this solves the problem otherwise please let us know.

Best regards
Søren

AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame drw={ScaleXYZ={1,1,1}*0.3;};
};

AnyFixedRefFrame GlobalRef2 = {
  AnyDrawRefFrame drw={ScaleXYZ={1,1,1}*0.3;};
  Axes=RotMat(pi*0.5,z);
};  

 
AnyVec3 Vector={1,0,0};


AnyDrawLine line1 ={
  AnyFixedRefFrame &ref=.GlobalRef;
  p0={0,0,0};
  p1=.Vector;
  Line.Thickness=0.02; 
};


AnyDrawVector line2 ={
  AnyFixedRefFrame &ref=.GlobalRef2;
  Vec=.Vector;
   Line.Thickness=0.02; 
  GlobalCoord=Off;
  
};