View Full Version : Draw an ARC by length, not cord length
melanie.santer
2006-03-18, 07:13 PM
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 :roll:
jaberwok
2006-03-18, 07:57 PM
Hi Melanie.
1 - not that I know of.
2 - you can change apparent opacity by changing screening value when plotting.
Mike.Perry
2006-03-19, 09:19 PM
Hi
Below is posted with kind permission from Charles Alan Butler ( CAB )...
;;;===================[ 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
a_meteni
2006-03-19, 09:56 PM
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
rkmcswain
2006-03-19, 11:50 PM
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.
(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)
)
melanie.santer
2006-03-21, 04:35 PM
Thank you everyone for your help :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.