×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Explode Spline

Explode Spline

Explode Spline

(OP)
Is it possible to explode a spline contour?? If so, how do I go about doing so. The explode command doesn't work. Thanks for your help in advance.

RE: Explode Spline

This routine will convert a spline into a pline; not exactly though. Thanks to an unknown author

CODE

(defun C:SPLINE2PLINE (/ SPLINES PLINETYPE OSMODE I SPL ED CODEPAIR)
  (if
    (setq SPLINES (ssget (list (cons 0 "spline"))))
     (progn
       (if
         (zerop (setq PLINETYPE (getvar "plinetype")))
          (setvar "plinetype" 1)
          ) ;if
       (setq OSMODE (getvar "osmode"))
       (setvar "osmode" 0)
       (setq I 0)
       (while
         (setq SPL (ssname SPLINES I))
          (setq    I  (1+ I)
                ED (entget SPL)
                ) ;setq
          (command ".pline")
          (foreach
               CODEPAIR
                       ED
            (if
              (= 10 (car CODEPAIR))
               (command (cdr CODEPAIR))
               ) ;if
            ) ;foreach
          (command "")
          (command ".pedit" "l" "s" "")
          ) ;while
       (if PLINETYPE
         (setvar "plinetype" PLINETYPE)
         )
       (setvar "osmode" OSMODE)
       ) ;progn
     ) ;if
  (princ)
  ) ;defun

____________________
Acad2005, Terramodel

RE: Explode Spline

(OP)
Now I have another question....how do I use a routine?

RE: Explode Spline

First copy/paste the above code into Notepad. Save the file as spline2pline.lsp in the support directory of AutoCad.
At the command line type (load"spline2pline") to load the lisp routine. To invoke the command type spline2pline at the command line.

____________________
Acad2005, Terramodel

RE: Explode Spline

Save a copy of the file before you De-spline, you won't like the results.  

Contours should be created using plines and arcs with elevations.  You'll agree once you de-spline.

A spline is an approximate depiction of curved path through the actual vertices, pline and arcs are precise paths, from point to a point.  What looks like a nice smooth slope now will become a jumble of lines, and be virtually unuseable.

For this project, unfortunately, you are stuck with the splines, which can't be manipulated reliably. You'll have to actually redraw the ones you need to offset or measure the areas.  SOME of the vertices MIGHT be on a Z location equal to the elevation, but check carefully.

Engineering is the practice of the art of science - Steve

RE: Explode Spline

You can covert a spline to a polyline using the Express Tools "FLATTEN" command.  There is also a free routine to do this at www.dotsoft.com.

RE: Explode Spline

(OP)
Thank you everyone, I got the part figured out and burnt.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources