Results 1 to 6 of 6

Thread: Draw an ARC by length, not cord length

  1. #1
    Active Member melanie.santer's Avatar
    Join Date
    2005-10
    Location
    Orange County, CA
    Posts
    67

    Default Draw an ARC by length, not cord length

    Hello all,
    Does anyone know how to draw and arc and specify the ARC length, not the chord length? Or can this even be done?

    Also, is there an opaque setting for solid hatches

    Thanks
    Last edited by melanie.santer; 2006-03-18 at 06:20 PM.

  2. #2
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,048

    Default Re: Draw an ARC by length, not cord length

    Hi Melanie.

    1 - not that I know of.

    2 - you can change apparent opacity by changing screening value when plotting.
    John B

    "With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion." - Steven Weinberg.

  3. #3
    Administrator Mike.Perry's Avatar
    Join Date
    2001-03
    Posts
    13,499

    Default Re: Draw an ARC by length, not cord length

    Hi

    Below is posted with kind permission from Charles Alan Butler ( CAB )...

    Code:
    ;;;===================[ ArcByLength.lsp ]========================
    ;;; Author:   Charles Alan Butler
    ;;; Version:  1.2 Nov. 17, 2005   
    ;;; Purpose: To draw an arc from chord & arc length
    ;;; Restrictions:
    ;;;  Arc length must greater than the chord length
    ;;;==============================================================
    (defun c:arcbyl (/ arc_angle arc_length chord_length end_point arc_radius
    				 start_point usercmd useros
    				)
      (setq usercmd (getvar "CMDECHO"))
      (setvar "CMDECHO" 0)
      (setq useros (getvar "osmode"))
    
      ;; x-x-x-x-x-x-x-x-x-x-x-x
      ;;   returns the factor   
      ;; x-x-x-x-x-x-x-x-x-x-x-x
      (defun factor (arc_length chord_length / k n c e)
    	(setq k (/ chord_length arc_length))
    	(setq n 0)
    	(repeat 6
    	  (if (= n 0)
    		(setq c (sqrt (- 6 (* 6 k))))
    		(setq c (- c (/ (- (sin c) (* k c)) (- e k))))
    	  )
    	  (setq e (cos c))
    	  (setq n (1+ n))
    	)
    	c
      )
    
      ;;  |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
      ;;		 S t a r t   o f   R o u t i n e		   
      ;;  |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
    
      (if (and
    		(setq start_point (getpoint "\nPick start point. "))
    		(setq end_point (getpoint "\nPick end point."))
    		(setq arc_length (getdist "\nEnter arc length. "))
    		(and (setq chord_length (distance start_point end_point))
    			 (or (< arc_length (* chord_length 6))
    				 (not (prompt "\n**  Warning, Large arc length used.  **"))))
    		(or (> arc_length chord_length)
    			(prompt "\n***  Arc length too short.  **"))
    	  )
    	(progn
    	  (if (setq arc_angle (* 2 (factor arc_length chord_length)))
    		(progn
    		  (setq arc_radius (/ arc_length arc_angle))
    		  (setvar "osmode" 0)
    		  (command "_.arc" start_point "EN" end_point "A" (* 180.0 (/ arc_angle pi)))
    		)
    	  )
    	  (setvar "osmode" useros)
    	)
    	(prompt "\n***  Error in user input. Command terminated.  ***")
      )
      (princ)
    )
    (prompt "\nArc By Length loaded, Enter ArcByL to run.")
    (princ)
    Have a good one, Mike

  4. #4
    Active Member a_meteni's Avatar
    Join Date
    2002-12
    Location
    Cairo
    Posts
    52

    Default Re: Draw an ARC by length, not cord length

    1- You can type LENGTHEN on the Command Line and choose TOTAL and type the required length then choose your Arc and it will be lengthen or shorten to the required lenght
    2- Try to change Disply Order to the desired option
    Regards

  5. #5
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,539

    Default Re: Draw an ARC by length, not cord length

    Quote Originally Posted by melanie.santer
    Hello all,
    Does anyone know how to draw and arc and specify the ARC length, not the chord length?
    Good old fashioned geometry.
    Say your arc length is 115.6 and your radius is 50

    Delta = Arc Length/Radius

    D=115.6/50

    D=2.312 (in radians)

    Below is how to draw it.

    Command: arc
    Specify start point of arc or [Center]: c
    Specify center point of arc: <pick point>
    Specify start point of arc: 50
    Specify end point of arc or [Angle/chord Length]: a
    Specify included angle: 2.312r

    Command: list
    Select objects: Specify opposite corner: 1 found
    Select objects:
    ARC Layer: "0"
    Space: Model space
    Handle = 12cd
    center point, X=8640.9655 Y=5577.4069 Z= 0.0000
    radius 50.0000
    start angle 51
    end angle 184
    length 115.60


    Here is a bit of lisp code to make it easier.

    Code:
    (defun c:al ()
     (setq c (getpoint "\n Pick center point "))
     (setq s (getpoint c "\n Pick start point "))
     (setq l (getdist "\n Enter arc length"))
     (setq d (/ (* 180.0 (/ l (distance c s))) pi))
     (command "._arc" "_c" c s "_a" d) 
    )

  6. #6
    Active Member melanie.santer's Avatar
    Join Date
    2005-10
    Location
    Orange County, CA
    Posts
    67

    Default Re: Draw an ARC by length, not cord length

    Thank you everyone for your help

Similar Threads

  1. How do I draw an arc of specific length?
    By ukdodger in forum AutoCAD 3D (2006 or below)
    Replies: 5
    Last Post: 2011-03-02, 09:18 PM
  2. LISP to draw polyline with specified segment length
    By bhughes.211978 in forum AutoLISP
    Replies: 8
    Last Post: 2010-08-31, 09:45 PM
  3. Arc length??? Any way to draw to an exact length?
    By fhoffnar in forum AutoCAD General
    Replies: 9
    Last Post: 2007-10-15, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •