Guest Posted June 7, 2013 Posted June 7, 2013 the scale is nothing is only a parameter to change the function 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)] Quote
Guest Posted June 7, 2013 Posted June 7, 2013 for scale 1:1000 we have T1 and for scale 1:5000 we have T2 . T2 > T1 we have bigger tolerαnse. Quote
Guest Posted June 7, 2013 Posted June 7, 2013 i dont want to see the BOTH tolerances but i canot aderstand how to do it . I now a few things about lisp Quote
BlackBox Posted June 7, 2013 Posted June 7, 2013 the scale is nothing is only a parameter to change the function 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)] That was not clear (to me) initially, but I understand now... Try this: (defun c:ktim (/ s a i l e v1 v2 v3) (if (setq s (ssget '((0 . "CIRCLE,ELLIPSE,*POLYLINE,SPLINE") (-4 . "<NOT") (-4 . "<AND") (0 . "POLYLINE") (-4 . "&") (70 . 80) (-4 . "AND>") (-4 . "NOT>") ) ) ) (progn (setq a 0.0) (repeat (setq i (sslength s)) (setq a (+ a (vlax-curve-getarea (ssname s (setq i (1- i)))))) ) (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)) ) ) ) (princ "\nTotal Length: ") (princ (rtos l 2 2)) (princ "\nTotal Area: ") (princ (rtos a 2 2)) (setq v1 (- (* (setq v2 (+ 1 (setq v3 (sqrt a)))) 2) a)) (setq v2 (- (* v2 4) a)) (setq v3 (/ l (* v3 4))) ;; if the scale 1: 1000 we have this ;; T = [((sqrtA) + 1)^ 2) - A] * [ L/( 4*(sqrtA)] (princ "\n Tolerance (1:1000): ") (princ (rtos (* v1 v3) 2 2)) ;; if the scale 1: 5000 we have this ;; T = [((sqrtA) + 1)^ 4) - A] * [ L/( 4*(sqrtA)] (princ "\n Tolerance (1:5000): ") (princ (rtos (* v2 v3) 2 2)) (princ "\n 10 % Area : ") (princ (rtos (* a 0.1) 2 2)) ) ) (princ) ) Quote
BlackBox Posted June 7, 2013 Posted June 7, 2013 i dont want to see the BOTH tolerances According to your example here, you DO: 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: ... but i canot aderstand how to do it . I now a few things about lisp Slow down... I'm having trouble understanding what you're after... Please post one, single, clearly written explanation (with examples?) so this doesn't become unnecessarily complicated. We're trying to help. Quote
Guest Posted June 7, 2013 Posted June 7, 2013 (edited) look the correct function is T = [Q - A] * [ L/B] Q =((sqrtA) + 2*U)^ 2) if scale is 1:1000 U=0.5 if scale is 1:1000 U=2 B = 4*(sqrt A) thats whay i write 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)] Edited June 7, 2013 by prodromosm Quote
Guest Posted June 7, 2013 Posted June 7, 2013 A= the area of a selected close polyline ,polygon ,circle anything (square meters) L= i the perimetr of this ,polygon ,circle anything (meters) Quote
Guest Posted June 7, 2013 Posted June 7, 2013 Total Length: 66.18 Total Area: 266.50 Tolerance (1:1000): -234.98 Tolerance (1:5000): -199.86 10 % Area : 26.65 -------------------------------------------------------- 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 Quote
BlackBox Posted June 7, 2013 Posted June 7, 2013 look the correct function is T = [Q - A] * [ L/B] Q =((sqrtA) + 2*U)^ 2) if scale is 1:1000 U=0.5 if scale is 1:1000 U=2 B = 4*(sqrt A) thats whay i write 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)] You seem to have some inconsistencies... I cannot help you without the correct formulae. Quote
SLW210 Posted June 7, 2013 Posted June 7, 2013 Please read the Code posting guidelines and edit your posts to include the Code in Code Tags. Quote
Guest Posted June 8, 2013 Posted June 8, 2013 Ok my friendrs i fix it many thanks for the history re correct facrion is (princ "\n for scale 1:1000: ") (princ (rtos (/ (* (- (expt (+ (sqrt a) 1) 2) a) l 0.25 ) (sqrt a)) 2 2 ) ) (princ "\n for scale 1:5000: ") (princ (rtos (/ (* (- (expt (+ (sqrt a) 4) 2) a) l 0.25 ) (sqrt a)) 2 2 ) ) Many thanks to marko_ribar ,BlackBox ,lyky and SLW210 Cheers, men nothing better than a cold beer ............... Quote
Recommended Posts
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.