# Drawing A Line Segment Between Two Points

**URL:** https://forum.highend3d.com/t/drawing-a-line-segment-between-two-points/1573
**Category:** Maya
**Tags:** mel
**Created:** [April 2, 2008, 3:42pm UTC](https://forum.highend3d.com/t/drawing-a-line-segment-between-two-points/1573 "2008-04-02T15:42:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![daviddoria](https://forum.highend3d.com/user_avatar/forum.highend3d.com/daviddoria/32/54687_2.png) [@daviddoria](https://forum.highend3d.com/u/daviddoria)
#### Post date: [April 2, 2008, 3:42pm UTC](https://forum.highend3d.com/t/drawing-a-line-segment-between-two-points/1573/1 "2008-04-02T15:42:31Z")

</div>

Is there a way to draw a line segment specified by two points?

something like

polySphere -r 2

but instead of a sphere, this:

polyLineSeg -p1 (x1, y1, z1) -p2 (x2, y2, z1)

Please let me know.

Thanks!

David

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [April 2, 2008, 3:59pm UTC](https://forum.highend3d.com/t/drawing-a-line-segment-between-two-points/1573/2 "2008-04-02T15:59:37Z")

</div>

Theres no such thing as line of a polygon

Try turning mayas show what i do command, ie turn echo all on.

Then take the curve drawing tool (ep or cp does not matter). Tell it to be linear (double click on the tool icon). insert 2 points with the tool and exit. Then look at what the script log tells you. , then extrude something along that line, Quite suppriseingly maya wirets the aswer for you.

Doing this exercise should help you immensely more than someone telling you the answer for the question asked.

Asme applies if you intend to manually build polygons with mel.

---

<div class="post-metadata">

### Author: ![daviddoria](https://forum.highend3d.com/user_avatar/forum.highend3d.com/daviddoria/32/54687_2.png) [@daviddoria](https://forum.highend3d.com/u/daviddoria)
#### Post date: [April 2, 2008, 4:55pm UTC](https://forum.highend3d.com/t/drawing-a-line-segment-between-two-points/1573/3 "2008-04-02T16:55:55Z")

</div>

ah of course the degenerate curve is a line!!

this does what I needed in case anyone else is looking:

curve -d 1 -p 0 0 0 -p 10 10 0 -name myline
