How to draw a line by direction and base point3D using C#

How to draw a line by direction and base point3D using C#

kite15
Advocate Advocate
1,170 Views
3 Replies
Message 1 of 4

How to draw a line by direction and base point3D using C#

kite15
Advocate
Advocate

Hi,

Is there any function by which we can create an unbound line object by direction and a base point?

The line can be created by two points. Is there any option to create any line by direction also?

Line ln = new Line(BasePoint, SecondPoint);

Thanks in advance

 

0 Likes
1,171 Views
3 Replies
Replies (3)
Message 2 of 4

norman.yuan
Mentor
Mentor

Maybe, you want a Ray?

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 4

_gile
Consultant
Consultant

Hi,

In addition to what @norman.yuan said.

Your question is not very clear. An "unbound line" may be a Ray (which has a start point and extends to infinity in one direction) or an Xline (which extends to infinity in both directions).

Both types have a constructor which take a (start) point and a vector (direction).

A Line is a linear segment which has a StartPoint, an EndPoint and a Length property, so it can't be defined with only one point and a vector.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 4 of 4

kite15
Advocate
Advocate

Thank all of you, for your suggestions.

 

0 Likes