Cheers, Black Box...
Cheers, Marko is not working now Command: (LOAD "C:/Users/Prodromos/Desktop/ktimtel.lsp") C:KTIM
Command: ktim
** Scale must be "1:1000" or "1:5000"
Command:
!!!!!!!!!!!!!!!!!!!!!!!!!! but i still need help because i confused a) if the scale 1: 1000 we have this T = [((sqrtA) + 1)^ 2) - A] * [ L/( 4*(sqrtA)]
b) if the scale 1: 5000 we have this T = [((sqrtA) + 4)^ 2) - A] * [ L/( 4*(sqrtA)]
something is wrong here because
for A=266.50sqm and L=66.18 m calculate a) T=8.526 and the correct is T = 34.10
b) T=37.144 and the correct is T = 148.58
here is the code
--------------------------------
(defun c:ktim (/ a l i s) (if (setq s (ssget '((0 . "CIRCLE,ELLIPSE,*POLYLINE,SPLINE") (-4 . "") ) ) ) (progn (setq a 0.0) (repeat (setq i (sslength s)) (setq a (+ a (vlax-curve-getarea (ssname s (setq i (1- i)))))) );;; (progn (setq l 0.0) (repeat (setq i (sslength s)) (setq e (ssname s (setq i (1- i))) l (+ l (vlax-curve-getdistatparam e (vlax-curve-getendparam e)) ) ) )(textscr) (princ "\nTotal Length: ") (princ (rtos l 2 2));;; ) (princ "\nTotal Area: ") (princ (rtos a 2 2));;; ) (princ "\n Tolerance 1:1000: ") (princ (rtos (/ (* (- (* (+ (sqrt a) 1) (+ (sqrt a) 1)) a) l) (* (sqrt a) 4) 2 2 ) ) )(princ "\n Tolerance 1:5000: ") (princ (rtos (/ (* (- (* (+ (sqrt a) 4) (+ (sqrt a) 4)) a) l) (* (sqrt a) 4) 2 2 ) ) ) (princ "\n 10 % Area : ") (princ (rtos (* a 0.1) 2 2)) ) ) (princ))(vl-load-com)(princ)
How are you determining your scale (1:1000 vs. 1:5000)?
As I mentioned at the bottom of this post, I could only speculate that you were using Annotative Scale... Perhaps you're using DimScale?
In any event, without knowing which scale to check for the two specific values you requested, there's no way to ensure that the calculation is accurate.
more information is needed, so that we're not confused. Select objects:
Total Length: 66.18
Total Area: 266.50
Tolerance 1:1000: 8.526
Tolerance 1:5000: 37.144
10 % Area : 26.65
Command: Please fix your post(s) to use
Ohhhhh! You want to see BOTH tolerances.
页:
1
[2]