12.07.2015 Views

“Computational Civil Engineering - "Intersections" International Journal

“Computational Civil Engineering - "Intersections" International Journal

“Computational Civil Engineering - "Intersections" International Journal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

“Computational <strong>Civil</strong> <strong>Engineering</strong> 2005”, <strong>International</strong> Symposium 193wants to create the reinforcement table and also the reinforcement characteristics:name, steel grade, number of pieces, diameter. After the user inputs thisinformation, he/she will have to choose the point where the reinforcement nameshould be placed in the AutoCAD drawing.Below you can find the function which is computing the length of thereinforcement that is selected by the user. The reinforcement can be represented inthe AutoCAD drawing by one of the following types: Line, Arc, Circle, Spline,PolyLine, 3DPolyLine or Ellipse.(defun length_reinforcement (/ ss n ent itm obj l);// the user is selecting in the AutoCAD drawing the reinforcement(setq ss (ssget)lt 0tl 0n (1- (sslength ss)))(while (>= n 0)(setq ent (entget (setq itm (ssname ss n)))obj (cdr (assoc 0 ent));// the typed of the selected object is checkedl (cond((= obj "LINE")(distance (cdr (assoc 10 ent))(cdr (assoc 11 ent))))((= obj "ARC")(* (cdr (assoc 40 ent))(if (minusp (setq l (- (cdr (assoc 51 ent))(+ pi pi l) l)))(cdr (assoc 50 ent)))))((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE")(= obj "LWPOLYLINE")(= obj "ELLIPSE"))(command "_.area" "_o" itm)(getvar "perimeter"))(T 0))tl (+ tl l)n (1- n)))

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!