Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-06-21, 08:06 PM   #1
smiller
Member
 
smiller's Avatar
 
Join Date: 2002-09
Location: NW Indiana
Posts: 19
smiller is starting their journey
Default Calculate a curve?

Dose anyone have a lisp or a calc. program that will give you curve data by entering 2 items of the curve like the Delta and Chord Length? Any help would be grateful!
__________________
J. Scott Miller, Sr. Engineering Tech. (smiller@danchharner.com)
Danch, Harner & Associates
1643 Commerce Srive
South Bend, IN 46628
(574) 234-4003 FAX (574) 234-4119
smiller is offline   Reply With Quote
Old 2004-06-22, 02:07 AM   #2
paulmcz
Active Member
 
Join Date: 2003-11
Location: YUL
Posts: 74
paulmcz is going the right waypaulmcz is going the right waypaulmcz is going the right way
Default

...what kind of a curve?
paulmcz is offline   Reply With Quote
Old 2004-06-22, 02:30 PM   #3
smiller
Member
 
smiller's Avatar
 
Join Date: 2002-09
Location: NW Indiana
Posts: 19
smiller is starting their journey
Talking RE: Calculate a curve?

Standard curve......just looking for a cogo calc program that will give you the curve data like if you enter the chord length and the delta it should give you the radius, etc........
__________________
J. Scott Miller, Sr. Engineering Tech. (smiller@danchharner.com)
Danch, Harner & Associates
1643 Commerce Srive
South Bend, IN 46628
(574) 234-4003 FAX (574) 234-4119
smiller is offline   Reply With Quote
Old 2004-06-22, 02:43 PM   #4
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default RE: Calculate a curve?

Maybe?

Code:
 

(defun C:CurveData ()
 (setq sngChordLength (getdist "\nEnter ChordLength: ")
       sngDeltaAngle  (* pi (/ (getdist "\nEnter Delta Angle in Degrees: ") 180.0))
       sngRadius      (/ sngChordLength 
                         2.0
                         (sin (/ sngDeltaAngle 2.0))                       
                      )
 )
)
peter is offline   Reply With Quote
Old 2004-06-22, 02:57 PM   #5
stig.madsen
100 Club
 
Join Date: 2000-12
Posts: 126
stig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightly
Default

Oh, a standard curve is a circular curve?

Here's one with chord lenght and arc height:
Code:
(defun C:ARCC (/ ch s ch2 ang)
  (and (setq ch (getdist "\nChord length: "))
       (setq s (getdist "\nArc height: "))
       (setq ch2 (/ ch 2.0))
       (mapcar 'princ (list "\nIncluded angle = " (setq ang (* 4.0 (atan (/ s ch2))))
                            " rad (" (* (/ 180.0 pi) ang) " deg)\nRadius = "
                            (/ (+ (expt ch2 2.0) (expt s 2.0)) (* 2.0 s))))
  )
  (princ)
)
... or to draw it:

Code:
(defun C:ARCH (/ p1 p2 s ch2 angr angd rad)
  (cond ((and (setq p1 (getpoint "\nChord start point: "))
              (setq p2 (getpoint p1 "\nChord end point: "))
              (not (equal p1 p2))
              (setq s (getdist
                        (mapcar (function (lambda (m n) (/ (+ m n) 2.0))) p1 p2)
                        "\nHeight of arc: "
                      )
              )
         )
         (setq ch2   (/ (distance p1 p2) 2.0)
               angr (* 4.0 (atan (/ s ch2)))
               angd (* (/ 180.0 pi) angr)
               rad  (/ (+ (expt ch2 2.0) (expt s 2.0)) (* 2.0 s))
         )
         (command "ARC" p1 "E" p2 "A" angd)
         (princ (strcat "\nRadius: " (rtos rad)))
        )
  )
  (princ)
)
stig.madsen is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exceeded iteration limit when evaluating curve earld AutoCAD 3D (2006 or below) 2 2004-06-03 04:30 PM
Curved Text! Can I automatically curve text around object? Darrel Odom Revit Architecture - General 5 2004-04-29 07:22 PM
Anyone know how to cut out a flat plate and then curve it? Darrel Odom Revit Architecture - General 16 2004-04-15 02:00 PM
Calculate Room Volume Michael Coviello Revit Architecture - Tips & Tricks 1 2003-11-14 12:07 AM


All times are GMT +1. The time now is 01:25 PM.