Jump to content

Recommended Posts

Posted

I have trying for type simple code with LISP for create Flatten Transition Round2Circle. But have little problem to get Number of degree :( for get coordinate point (PT5, PT6, PT7 and PT8). Could someone give me the formula for solve this problem.

Layout attached

and here's my code

 

(defun DTR (X)
 (* pi (/ X 180.0))
 )
(defun c:BR2C ()
 ;Pengambilan data inti pembuatan Ducting
 (setq PanDuct (getreal"\nTentukan Panjang Ducting:")
   LeDuct (getreal"\nTentukan Lebar Ducting:")
   DiaDuct (getreal"\nTentukan Dia. Ducting:")
   TingDuct (getreal "\nTentukan Tinggi Ducting:")
   JumSeg (getreal "\nTentukan Jumlah Segment:")
   );setq
 ;Pengolahan Data
 (setq AD PanDuct
   CD LeDuct
   FH DiaDuct
   FI (/ (- CD FH)2)
   dn TingDuct
   PQ (sqrt (+(expt FI 2)(expt dn 2)))
   ); Panjang Rusuk FIP
 (setq ID (/ PanDuct 2)
   DF (sqrt (+(expt FI 2) (expt ID 2)))
   dg DF
   ng (sqrt (+(expt dn 2) (expt dg 2)))
   ); Panjang rusuk ng
 ;Pembuatan segitiga Panjang
 (setq pt1 (getpoint "nTentukan Titik Peletakan:")
   pt2 (list (+ (car pt1) ID) (cadr pt1))
   pt4 (list (- (car pt1) ID) (cadr pt1))
   pt3 (list (car pt1) (cadr(polar pt1 (DTR 90.0) PQ)))
   )
 (command "_PLINE" pt1 pt2 pt3 pt4 pt1 "")
   
 ;stuck :-(

 

Thanks,

 

UdaAf

R2C_2.dwg

Posted

It is not quite apparent what the points pt5, pt6, pt7 and pt represent in the top and side views in your drawing.

 

I don't have any formula for this but I'll give you a hint. Let's find out the real lengths of the sides of a triangle F-a-D, as it is seen in your top view, so you can construct this triangle as it will be in the development of the part.

 

We know that the distance between "F" and "a" is the true distance as it is viewed in the top view, so we have the true length of the side F-a.

 

The side F-D is a square root of the sum of the square of the distance between "F" and "D" as viewed in your top view and square of the height of the transition part.

 

The third side of the triangle is the side a-D, which again, is a square root of the sum of square of the distance between "a" and "D" as viewed in your top view and the square of the height of the transition part.

 

This is true for any next triangle in the top view in your drawing (triangles a-b-D, b-c-D, c-G-D and all the others around the circle).

 

Have fun,

Paul.

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...