TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Crookedmonk on April 05, 2018, 10:25:48 AM

Title: CLOSED PLINE OFFSET WITH EXPLODE
Post by: Crookedmonk on April 05, 2018, 10:25:48 AM
I am sure its here, but I can not find it. One of my colleagues is looking for a lisp that will offset a closed polyline and explode the original polyline but not the newly created one.

Thank you in advance.
Monk
Title: Re: CLOSED PLINE OFFSET WITH EXPLODE
Post by: Andrea on April 05, 2018, 02:37:47 PM
Hello,..

I'm just curious to know why you need to explode the selected pline ?
may you explain more ?
Title: Re: CLOSED PLINE OFFSET WITH EXPLODE
Post by: MP on April 05, 2018, 03:34:39 PM
4 more "why"s to go.
Title: Re: CLOSED PLINE OFFSET WITH EXPLODE
Post by: mjfarrell on April 05, 2018, 04:17:46 PM
My question would be, why are you not drawing the polyline you want first, and NOT needing to offset it at all?
If that result is what you are after....

As well as; why are you exploding the original polyline?

Sounds like a work flow issue, not a programming one.
Title: Re: CLOSED PLINE OFFSET WITH EXPLODE
Post by: Crookedmonk on April 05, 2018, 04:23:39 PM
We add processing compensation to the original feature. If something goes astray during the process we need something to compare it to. So if we don't start with a "Master polyline line" we have nothing to compare. Thus the need for an offset or compensation as we call it.

"As well as; why are you exploding the original polyline?"

In our case we usually have to tweak certain areas or features in order for them to finish through the process correctly. Some features need will eventually need more some will need less compensation. So eventually we will need to explode the original down the road anyways. But once we find the correct compensations, we can expect high repeatability.
Title: Re: CLOSED PLINE OFFSET WITH EXPLODE
Post by: BIGAL on April 06, 2018, 08:18:02 PM
Try this

Code: [Select]
(defun c:ploff ( / obj)
(setq obj  (car (entsel "\nPick pline ")))
(command "offset" (getdist "Enter distance") obj (getpoint "pick side") "")
(command "explode" obj)
)
(c:ploff)
Title: Re: CLOSED PLINE OFFSET WITH EXPLODE
Post by: Crookedmonk on April 09, 2018, 09:57:34 AM
Thanks Bigal. He will appreciate this I am sure.