FANDOM


;|
WIKI-SEGMENT-LENGTH
Returns curve or straight length of a segment.
   Edit the source code for this function at 
  Segment length (AutoLISP function)

(DEFUN
   WIKI-SEGMENT-LENGTH
                       (2DPNT1 2DPNT2 BULGE / D DELTA DOVER2 L R)
  (SETQ
    ;;Make sure points are truly 2d
    2DPNT1
     (WIKI-FLATTEN 2DPNT1)
    2DPNT2
     (WIKI-FLATTEN 2DPNT2)
    D (/ (DISTANCE 2DPNT1 2DPNT2) 2)
  ) ;_ end of setq
  (COND
    ((/= 0 BULGE)
     (SETQ
       DOVER2
        (ABS (* 2 (ATAN BULGE)))
       DELTA
        (* 2 DOVER2)
       R (/ D (SIN DOVER2))
     ) ;_ end of setq
     (* DELTA R)
    )
    (T (* D 2))
  ) ;_ end of cond
)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.