| ||||
|
#1
| ||||
| ||||
| Converting Spline to Polyline In order to create a dxf file for CNC cut panels, I have been asked to convert all the lines to polylines. This is a simple matter for lines and arcs - one simply uses the PEDIT command and at the prompt "object is not a polyline", "would you like to convert it", you hit Y. But for splines it's not such a simple matter - at least not that I've found so far... The easiest I've come across is to do a WMFOUT, then WMFIN, scale x2, then EXPLODE once, thus creating a 2D polyline. Anyone got a simpler method? Any flaws in my method(s)?
__________________ Will Imaginocean Yacht Design Logic will get you from A to B... Imaginocean will take you everywhere else... www.imaginocean.net |
|
#2
| |||
| |||
| Simpler? The method I've used is simple but it is probably not simpler. I've used Autocadr12 for many years but never heard of metafiles before your post. I haven't tried them yet either. My method has been to use the object snap set to end and draw line segments rather perpendicular to the spline at each endpoint along the spline. When I have all these drawn I just erase the spline and draw a polyline connecting the endpoints of the lines I have drawn. This can be a little tedious if it is a very long spline. Now a question for you. Why does the imported metafile need to be scaled x2? Also, do you know why it becomes a polyline when it is exploded? If you explode a spline it ends up just a bunch of little line segments. I'm trying to pick your brain a little here because I haven't turned up much about metafiles by checking my references. Thanks. |
|
#3
| ||||
| ||||
| The splines in this instance are made up of a lot of segments - so it would indeed be very tedious to essentially recreate it manually. My experience with metafiles is not much greater than yours - I have no idea why the resulting import requires scaling up - other than it is otherwise 1/2 the size! R12..... next you'll be telling me you have to pedal to get your computer started ![]() I came across the method by searching one of the multitude of AutoCAD help forums. It's not all that complicated I admit, and does appear to give accurate results....
__________________ Will Imaginocean Yacht Design Logic will get you from A to B... Imaginocean will take you everywhere else... www.imaginocean.net |
|
#4
| ||||
| ||||
| Maybe import the file into Rhino than export as .dxf. You will be asked if you want splines or polylines. I think? Not at home so I can't check the idea.
__________________ "The hand feeds the mind." Weston Farmer |
|
#5
| ||||
| ||||
| Or simply save your DWG as a R12 DXF file. In release 12 there were no splines yet, so all your splines will be automatically converted to polylines. Your CNC shop will definitely be able to read that. |
|
#6
| ||||
| ||||
| Martijn-vE... well now aren't you a clever fella!! It works! And converts the whole lot into polylines in one hit.... I owe you a beer! For those giving it a try, this is how I did it.. save as .dxf R12 open a new document and DXFIN the R12 file. save as whatever .dwg you want (in my case AutoCAD 2004) One question though - it converts them into 3D polylines. This being a 2D document, does that matter?
__________________ Will Imaginocean Yacht Design Logic will get you from A to B... Imaginocean will take you everywhere else... www.imaginocean.net |
|
#7
| ||||
| ||||
| 2D polylines are merely 3D polylines with all z coordinates set to zero. It shouldn't make any difference at all. |
|
#8
| |||
| |||
| So!!! No more laughing at Autocadr12? I've been designing boats entirely within Autocad since 1987 using Autolisp routines written by my brother that give me splines and accurate ruling lines for chined hulls plus panel development and more. I have had very little desire to change to anything else even today. Although I do use Freeship to quickly conjure up looks at my next notion for a design. |
|
#9
| |||
| |||
| By the way, I actually was able to do this in Autocadr9 or r10 (I can't remember which) but I use r12 because it's object snap is so much better. |
|
#10
| |||
| |||
| Or you can download this Lisp that gives you the chance to define the length of the segments when converting from spline to polyline: http://www.dotsoft.com/public/spl2pl.vlx |
|
#11
| ||||
| ||||
|
__________________ Will Imaginocean Yacht Design Logic will get you from A to B... Imaginocean will take you everywhere else... www.imaginocean.net |
|
#12
| ||||
| ||||
| From my experience, sometimes u have to redraw them for the CNC software. Generally u are better off with arcs and lines. In autocad a spline is not good for export (even within acad they are not good) and depending on the CAM software polylines are not good either. always save them as R12.dxf. it all depends on how much grief u want to give the person who is to receive the files. better to put some effort into giving them good data, esp. if they want to nest it for quick machining. For example if u have a polyline to give curvature then what you actually have is a heap of small straight segments and the machine head will stop-start continuously and it will take forever. a method i once used when extracting 3D models into 2D files for machining was to redraw over them using a scaled viewport in a layout. hopefully the CAM software is better these days, but they certainly used to be temperamental.. cheers |
|
#13
| ||||
| ||||
| i've used every release since r13, and u know autocad will always be autocad. they keep adding so much stuff to it. i'm on 2009 (r17?) now and i dont see the point. its all based around 3D and the 3D modeling tools suck so bad. r12 was probably the best version, i'd like to see how that runs! |
|
#14
| |||
| |||
| What about the Flatten command? When importing from Rhino having used Make2D, often straight lines are registered as splines. I use Flatten to turn them into lines. But remember that polylines, while they can be curved, they only approximate a spline. I can guess this is what happens when you export to AutoCAD12 too. You should lay the two version over each other to decided if that is OK for what you are doing I tried a really bendy line and the deviation was not more than .25% as far as I could see. On a hull line it was down around .1% of the length between any two points. |
|
#15
| |||
| |||
| I've never had to convert files to CNC, so you'll only get a blank stare from me. But reading the AutoLisp posts there were a fair amount of discussion regarding these very same problems and workarounds. One of the threads concerned a commercial utility that traced splines using only straight lines segments fitted by their BULGE settings. I don't know if thats CNC friendly, but it's a heck of alot less vertices required to follow a noodly spline. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Spline or Bezier....that is the question | Raykenn | Boat Design | 14 | 04-16-2007 05:24 PM |
| How many spline weights do I need? | Smoothride | Boat Design | 12 | 10-22-2006 09:42 PM |
| Spline Weights | Guest | Boat Design | 32 | 11-30-2005 03:40 AM |
| windshield glazing spline???? | tealcreek | Materials | 1 | 11-08-2005 09:23 PM |
| Need spline weights? | 8knots | Boat Design | 8 | 04-05-2005 12:01 AM |