Jump to content

Recommended Posts

Posted

Hello everybody.

 

Is it possible to draw an Elbow 45 or 90 by the use of Entmake POLYLINE ?

 

Any example please ?

 

Thanking you all.

 

Michaels

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    12

  • Michaels

    11

  • The Buzzard

    9

  • alanjt

    1

Top Posters In This Topic

Posted Images

Posted

You will need to calculate the bulge for the vertices of the polyline, the bulge is the tangent of 1/4 of the included angle, so for a '45' Elbow, you need a bulge of

 

tan (pi/16) = 0.198912

 

Positive for anti-clockwise, negative for clockwise.

 

Then, you are just left to calculate the positions of the vertices.

Posted

Thanks Lee.

 

I am sorry, I am not familiar with it. Have you made any example related to the same issue ?

 

Appreciated.

Posted

Create the desired LWPolyline result and look at the DXF codes (maybe use this if need be) - investigate which DXF codes control the bulge factors (I'll give you a hint.. 42) and you soon be familiar :)

Posted

This is what I made a long time a go, but to make it to get the right direction , I used Rotate command with (entlast) function.

 

So now I am looking forward to become better with coding and specially with *Polyine entmakes' functions , it makes me nervious with its much codes.

 

(setq arc1 (getdist "\n Radious of small Elbow: "))
(setq line1(getdist "\n Width of Elbow: "))
(setq pt1 (getpoint "\n Insertion Point of Elbow: "))
(setq pt2 (list (- (car pt1) arc1)(+ (cadr pt1) arc1)))
(setq pt3 (list (car pt2) (+ (cadr pt2) line1)))
(setq pt4 (list (+ (car pt1) line1)(cadr pt1))) 
(command "_.pline" pt1 "width" 0 0 "arc" "angle" 90 pt1 pt2 "line" pt3 "arc" "angle" -90 pt4 "line" pt1 "")

 

I am using these scripts a lot in my daily works , but to make it with entmake that would open the horizon to me to go welder .:)

 

Hope you help me with it.

 

Greatly appreciated.

Posted
This is what I made a long time a go, but to make it to get the right direction , I used Rotate command with (entlast) function.

 

So now I am looking forward to become better with coding and specially with *Polyine entmakes' functions , it makes me nervious with its much codes.

 

(setq arc1 (getdist "\n Radious of small Elbow: "))
(setq line1(getdist "\n Width of Elbow: "))
(setq pt1 (getpoint "\n Insertion Point of Elbow: "))
(setq pt2 (list (- (car pt1) arc1)(+ (cadr pt1) arc1)))
(setq pt3 (list (car pt2) (+ (cadr pt2) line1)))
(setq pt4 (list (+ (car pt1) line1)(cadr pt1))) 
(command "_.pline" pt1 "width" 0 0 "arc" "angle" 90 pt1 pt2 "line" pt3 "arc" "angle" -90 pt4 "line" pt1 "")

 

I am using these scripts a lot in my daily works , but to make it with entmake that would open the horizon to me to go welder .:)

 

Hope you help me with it.

 

Greatly appreciated.

 

Michaels,

 

The attached code addresses elbows only and is a command type code. For entmake refer to the Rectangular Mechanical DuctLisp (RMD_V6) code in my signature. That code has more than just elbows. You will need to study the codes carefully as there is alot to absorb.

ELBOW.lsp

Posted
Michaels,

 

The attached code addresses elbows only and is a command type code. For entmake refer to the Rectangular Mechanical DuctLisp (RMD_V6) code in my signature. That code has more than just elbows. You will need to study the codes carefully as there is alot to absorb.

 

You also using the command "Pline" in your routine that you uploaded. :)

 

Thanks

Posted
You also using the command "Pline" in your routine that you uploaded. :)

 

Thanks

 

 

I also mentioned in my post to look at my signature for the Duct code which is entmake.

 

I am showing you both methods.

Posted

Nobody could bring me any example ? :o

Posted
Nobody could bring me any example ? :o

 

Are you kidding?

 

You got two examples.

Posted
Are you kidding?

 

You got two examples.

 

Your routine that you directed me to is a complicated one which needs to read and looking for the related points to the Entmake of that Elbow.

 

So could you please bring only the arguments of the related entmake of Polyline ?

 

Many thanks

Posted (edited)
Your routine that you directed me to is a complicated one which needs to read and looking for the related points to the Entmake of that Elbow.

 

So could you please bring only the arguments of the related entmake of Polyline ?

 

Many thanks

 

Part of the learning process is to diciper someone elses code. I did mention it was alot, But the code has a road map and the functions are labled. It does' nt get much easier than that. You have also been down this road already many times before with entmake and Lee provided you with all the clues you need. You could figure this out for yourself.

 

This code does only elbows and is entmake. I hope you get the idea this time.

ELBOW2.lsp

Edited by The Buzzard
Removed excess angle from list
Posted
Nobody could bring me any example ? :o

 

Did you not follow my advice in post #2, #4, #5 ?

Posted
Did you not follow my advice in post #2, #4, #5 ?

 

Yes I did , but I did not know what to do with the (cons 42 .....) alone without a complete entmake of Polyline . :)

Posted
Yes I did , but I did not know what to do with the (cons 42 .....) alone without a complete entmake of Polyline . :)

 

Did you see how the group 42 code (bulge) relates to the vertices and my information in post #2?

 

As far as entmaking the LWPolyline, you need to first calculate the positions of the vertices, and calculate the bulge value for each vertex (as demonstrated in post #2), then just entmake the entity using information taken from the link in post #5.

 

You keep asking for an example but really, you already have one: just draw what you want the result to be and query the return of entget to see how the bulge relates to the vertices.

Posted
Part of the learning process is to diciper someone elses code. I did mention it was alot, But the code has a road map and the functions are labled. It does' nt get much easier than that. You have also been down this road already many times before with entmake and Lee provided you with all the clues you need. You could figure this out for yourself.

 

This code does only elbows and is entmake. I hope you get the idea this time.

 

Thanks for your hard work for me .The Buzzard

 

I think I have to keep on depending on the Command Reactor for my Elbows creations at the moment .:(

 

Thanks a lot

Posted
Thanks for your hard work for me .The Buzzard

 

I think I have to keep on depending on the Command Reactor for my Elbows creations at the moment .:(

 

Thanks a lot

 

Do you mean command call?

Why would you need to use reactors to make an elbow?

The bulge factor is nothing more than an angle in radians. A straight polyline has a bulge factor of 0.0 So you will need to calculate bulge factor of the arc in the polyline. If there is something you do not understand in the code, Then please ask.

 

You asked for an example and you got one. Try to figure it out. If there is something that needs explaining, Please let me know what it is you are stuck on.

Posted
Did you see how the group 42 code (bulge) relates to the vertices and my information in post #2?

 

As far as entmaking the LWPolyline, you need to first calculate the positions of the vertices, and calculate the bulge value for each vertex (as demonstrated in post #2), then just entmake the entity using information taken from the link in post #5.

 

You keep asking for an example but really, you already have one: just draw what you want the result to be and query the return of entget to see how the bulge relates to the vertices.

No one wants to do any actual homework. :roll:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...