TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Fabricio28 on August 10, 2016, 02:32:24 PM

Title: Pressure pipes and fittings
Post by: Fabricio28 on August 10, 2016, 02:32:24 PM
Hi,

I'm trouble to draw a pressure pipe.

I don't have any lisp to draw polylines with specific angles: 11°, 22°, 45° and 90° (that represent the elbows)

Now I can't insert my elbow's blocks to the pipes.

Anyone could help me, please?

Maybe advice the better way to do that task.

Thank in advance
Fabricio

File attached


Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 10, 2016, 02:38:06 PM
I'd use polar tracking & check relative to last segment.
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 10, 2016, 02:55:12 PM
 :-(
I'd use polar tracking & check relative to last segment.

Thank you my friend Ron!  :-D

Fabricio



Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 10, 2016, 02:56:38 PM
:(
I'd use polar tracking & check relative to last segment.

Thank you my friend Ron!  ;D

Fabricio
Glad to help :)
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 10, 2016, 03:38:14 PM
:(
I'd use polar tracking & check relative to last segment.

Thank you my friend Ron!  ;D

Fabricio
Glad to help :)

Ron,

I don't know how to set all the angles into polar tracking.


Is that right?

Thanks
Title: Re: Pressure pipes and fittings
Post by: Lee Mac on August 10, 2016, 04:01:28 PM
Use the 'Additional Angles' section of the Polar Tracking dialog.

You may also find it useful to increase APERTURE such that the polar tracking angles are acquired with greater sensitivity.
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 11, 2016, 07:07:25 AM
Use the 'Additional Angles' section of the Polar Tracking dialog.

You may also find it useful to increase APERTURE such that the polar tracking angles are acquired with greater sensitivity.

Hi Lee Mac

I can't add all the angles that I need.

I'm a little a bit confused to do that task.

Thanks
Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 11, 2016, 10:03:06 AM
Don't you just need to add 11.25?
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 11, 2016, 11:18:11 AM
Don't you just need to add 11.25?

Ron,

I don't know how to explain better my task, because my english is very poor.
So I'm attaching a dwg file as example of my task.

It is basically draw a polyline with the correct angles to add the elbows.
Using all possibilities all over 360 degrees

Thank in advance
Fabricio
Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 11, 2016, 11:43:46 AM
Strange .. the angles I use for fittings are 11.25 , 22.5, 45 & 90 all are divisible by 11.25 ??
It looks like an easy way to set the used angle is through (setvar 'polarang (angtof "11.25")), then in the options you see:
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 11, 2016, 12:35:35 PM
Strange .. the angles I use for fittings are 11.25 , 22.5, 45 & 90 all are divisible by 11.25 ??
It looks like an easy way to set the used angle is through (setvar 'polarang (angtof "11.25")), then in the options you see:

You're right my friend,
sorry, worked fine!

Can I set Polar Tracking just for some angles?

Because there are some angles that I don't wanna use, like 34°.

Thank you
Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 11, 2016, 01:09:03 PM
Strange .. the angles I use for fittings are 11.25 , 22.5, 45 & 90 all are divisible by 11.25 ??
It looks like an easy way to set the used angle is through (setvar 'polarang (angtof "11.25")), then in the options you see:
..
Can I set Polar Tracking just for some angles?
Because there are some angles that I don't wanna use, like 34°.
..
Try this: (setvar 'polarang (angtof "11.25")) & make sure you have relative to last segment checked.
Look into POLARADDANG (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-73162BAB-C98D-4159-A653-E4C7D4CB38C3), POLARMODE (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-D91628CC-9975-4DBF-8D02-10B23A6F3ED5) & POLARANG (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-0CF67F9E-F953-43D6-9227-0D56E0E693ED) variables.
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 11, 2016, 01:25:01 PM
Strange .. the angles I use for fittings are 11.25 , 22.5, 45 & 90 all are divisible by 11.25 ??
It looks like an easy way to set the used angle is through (setvar 'polarang (angtof "11.25")), then in the options you see:
..
Can I set Polar Tracking just for some angles?
Because there are some angles that I don't wanna use, like 34°.
..
Try this: (setvar 'polarang (angtof "11.25")) & make sure you have relative to last segment checked.
Look into POLARADDANG (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-73162BAB-C98D-4159-A653-E4C7D4CB38C3), POLARMODE (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-D91628CC-9975-4DBF-8D02-10B23A6F3ED5) & POLARANG (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-0CF67F9E-F953-43D6-9227-0D56E0E693ED) variables.

Quote
Try this: (setvar 'polarang (angtof "11.25")) & make sure you have relative to last segment checked.
Worked Perfect!

I'd like to draw polyline just for the correct angle.
I'm attaching a image for example, I don't have elbow for 67° and 68°.

I was wondering if is possible to set polar tracking just for the correct angles to put the elbows.

Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 11, 2016, 01:41:23 PM
I'm lost on what you're really trying to accomplish .. sorry.  :|
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 11, 2016, 02:09:24 PM
I'm lost on what you're really trying to accomplish .. sorry.  :|

Not a problem Ron,

I'm getting confused to explain my task too.



Title: Re: Pressure pipes and fittings
Post by: ChrisCarlson on August 11, 2016, 02:49:42 PM
Why not set incremental angle to 90° and add 11°, 22° and 45° as additional angles?

//Also this isn't really an AutoLISP question as it is a CAD General...
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 11, 2016, 03:36:22 PM
Why not set incremental angle to 90° and add 11°, 22° and 45° as additional angles?

//Also this isn't really an AutoLISP question as it is a CAD General...

Hi Master Shake
I've already incremented these angles and isn't working as I wish.

I'd like to draw 11°, 22°, 45° and 90°...
But I want draw this angles all over 360° .


Maybe it is not a CAD General question, I think.
because Polar Tracking isn't working as I want to.

Besides I don't know how to explain better my task.  :embarrassed2:


Title: Re: Pressure pipes and fittings
Post by: ChrisCarlson on August 11, 2016, 04:02:42 PM
Enabling relative to last segment works as expected.
Title: Re: Pressure pipes and fittings
Post by: ChrisCarlson on August 11, 2016, 04:05:50 PM
proof of concept attached.

You might want to also add the following angles -> 349, 328, 315. This will allow you to go both directions from the last point. 
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 12, 2016, 07:11:54 AM
proof of concept attached.

You might want to also add the following angles -> 349, 328, 315. This will allow you to go both directions from the last point.

Thank you very much!!

Worked perfect "go to both directions" that is the word!!.  :oops:

I've tested and worked perfect to me, you're completly right @Master_Shake my doubts is Autocad Gerenal, sorry for that.

Just that 3 angles (349, 328, 315) I'm able to draw the polyline all directions that I want?
Fantastic!

Thanks
Title: Re: Pressure pipes and fittings
Post by: ChrisCarlson on August 12, 2016, 08:06:38 AM
Set your increment angle to 90° and add the 6 additional angles.

11, 22, 45, 315, 328, 349.

Granted 180 and 270 will be options but unless you want to go a lisp routine I don't think you can set additional angles without incremental angles.
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 12, 2016, 08:48:20 AM
Set your increment angle to 90° and add the 6 additional angles.

11, 22, 45, 315, 328, 349.

Granted 180 and 270 will be options but unless you want to go a lisp routine I don't think you can set additional angles without incremental angles.

Thank you for the support Master_Shake. :)
Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 12, 2016, 09:01:06 AM
In my little world of fittings, 11.25 is the only angle you need .. not sure why you need more angles to go 'both' directions?
Glad you got it sorted though.  :)
Title: Re: Pressure pipes and fittings
Post by: ChrisCarlson on August 12, 2016, 09:21:17 AM
When relative to UCS is enabled, the last two points determine 0°. If 11/22/45 are your only options, the poly line will only go counter clockwise.
Title: Re: Pressure pipes and fittings
Post by: ronjonp on August 12, 2016, 09:51:03 AM
When relative to UCS is enabled, the last two points determine 0°. If 11/22/45 are your only options, the poly line will only go counter clockwise.
Isn't that why we're using relative to last segment? .. Either way what you told him seems to solve the problem .. I just do it differently :)
Title: Re: Pressure pipes and fittings
Post by: Fabricio28 on August 12, 2016, 02:35:07 PM
When relative to UCS is enabled, the last two points determine 0°. If 11/22/45 are your only options, the poly line will only go counter clockwise.
Isn't that why we're using relative to last segment? .. Either way what you told him seems to solve the problem .. I just do it differently :)

Thank you ron,

You helped me a lot too.