Author Topic: Offsetting a line?  (Read 3101 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Offsetting a line?
« on: April 20, 2004, 02:30:21 PM »
How do I set up a lisp so i can offset a line 5mm on each side of the line?

I can get Lisp to draw the line no problem, but I can't figure out how to offset it.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

SMadsen

  • Guest
Offsetting a line?
« Reply #1 on: April 20, 2004, 03:03:45 PM »
Hint: if p1 and p2 are points of the line then (setq angle90 (+ (angle p1 p2) (/ pi 2.0))) will be an angle perpendicular to the line.

If ^that's the case then which point would (polar p1 angle90 5.0) return?

hyposmurf

  • Guest
Offsetting a line?
« Reply #2 on: April 20, 2004, 03:11:24 PM »
Cant offer you a solution but I reckon I know why you want it! :) Is it for showing pipework/circuit lines that cross each other but dont actually intersect?Would be dam helpful if there was such a lisp. :)

hudster

  • Gator
  • Posts: 2848
Offsetting a line?
« Reply #3 on: April 20, 2004, 03:21:04 PM »
ahhh a building services man, that's exactly what it's for. :D

But i'm also hoping to alter it so as to create a lisp that will automatically create a ceiling grid.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Offsetting a line?
« Reply #4 on: April 20, 2004, 03:49:33 PM »
Use the Offset Method

Quote
The distance to offset the object. The offset can be a positive or negative number, but it cannot equal zero. If the offset is negative, this is interpreted as being an offset to make a "smaller" curve (that is, for an arc it would offset to a radius that is "Distance less" than the starting curve's radius). If "smaller" has no meaning, then it would offset in the direction of smaller X, Y, and Z WCS coordinates.


This way you don't have to pick a side, just use a POSITIVE VALUE  and
then a NEGATIVE VALUE  for the offset distance.

If you want it explaned further perhaps the person who educated me on that
will offer.    S.M.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

SMadsen

  • Guest
Offsetting a line?
« Reply #5 on: April 20, 2004, 03:55:00 PM »
Aww man, that's too easy

hyposmurf

  • Guest
Offsetting a line?
« Reply #6 on: April 20, 2004, 04:17:37 PM »
Quote from: Hudster
ahhh a building services man, that's exactly what it's for. :D

You guessed right to :)

hyposmurf

  • Guest
Offsetting a line?
« Reply #7 on: May 15, 2005, 11:34:21 AM »
This thread seems to have answered the question asked.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Offsetting a line?
« Reply #8 on: May 16, 2005, 09:57:46 AM »
Hi Hudster

Visit my homepage -> Free Stuff -> Free Programs and search for 'MultiOffset'

Cheers
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18