Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Tsec2nd on June 11, 2018, 06:55:51 AM
Title: question about region offset
Post by: Tsec2nd on June 11, 2018, 06:55:51 AM
I am not sure I can express the questin clearly because of my poor english. So please see the attached file ,maybe you can understand what I mean.
I need you help to offset diffrent regions.The out loops offset towards outside,the innerloop offset towards inside and the regions which only have one loop offset towards inside.
It would be grateful for any idea.
Title: Re: question about region offset
Post by: ribarm on June 11, 2018, 07:40:12 AM
It is easier to do it manually... Do you want to offset every exploded region and therefore created polylines by the same amount of offset distance inside/outside? One more thing, why do you need this if I may ask? It looks to me like masochistic task for programming and resulting effect is minor unless something more concrete is an issue...
Title: Re: question about region offset
Post by: Tsec2nd on June 11, 2018, 08:25:05 AM
Yes,I want offset every exploded region by the same distance in diffrent direction(outside or inside). It is used under specified conditions.
Title: Re: question about region offset
Post by: ribarm on June 11, 2018, 02:54:18 PM
OK... Here you are, but next time you are on your own...
Title: Re: question about region offset
Post by: ribarm on June 11, 2018, 05:08:36 PM
You haven't asked for it, but if you need opposite offsets it is slightly different... Plus you must have A2012+ (CONVTOSURFACE command and THICKEN command)...
Title: Re: question about region offset
Post by: Tsec2nd on June 11, 2018, 10:07:42 PM
Dear Sir, Thank you for your warmhearted help.I'll take some time to digest it because I am not familiar with 3D commands.Thanks again!
Taner
Title: Re: question about region offset
Post by: ribarm on June 13, 2018, 12:09:33 PM
I've hasetated to post 2 more offseting codes because of the issue I described here : http://www.theswamp.org/index.php?topic=54245.msg588507#msg588507
But as I figured where the problem was, I am glad that now I can post (vla-offset) versions... So 2 more caases are solved : offseting complex region inside - all offsets are one way (not alternative like it was requested and solved by using 3D operations); and offseting complex region outside - also one way...
Note that those 2 codes are exactly the same, only difference is sign : (if (> ar arp) ... ) for inside and (if (< ar arp) ... ) for outside...
Regards, M.R.
Title: Re: question about region offset
Post by: ribarm on June 13, 2018, 12:10:30 PM
Title: Re: question about region offset
Post by: ScottMC on June 17, 2018, 07:13:18 PM
Q: My guess why this code won't work using my A2K is age, but in changing the "(vl-cmdf "_.JOIN" ss)" to pljoin was a not a solution and just doesnt even see the command.. Hopes are this works for the newer users as regions are useful! Makes me dig and learn.
Title: Re: question about region offset
Post by: ssdd on June 17, 2018, 10:41:45 PM
ribarm :smitten:
Title: Re: question about region offset
Post by: ribarm on June 18, 2018, 07:29:16 AM
Title: Re: question about region offset
Post by: ScottMC on January 23, 2021, 02:29:03 PM
What is the simplest way to flip the region to get it toward the "Z+" direction. Would a "reverse" be able? Like this tool alot! and here's the var list: ( / en la obj s1 3ds r regl reg 3dsl es s di or-var1 po1 po2 or-var2 method1 )