natur3 Posted September 3, 2012 Posted September 3, 2012 (edited) Hi, I am using AutoCAD 2013 and have imported the points from a text file. the points in the text file are in order meaning: X Y Z 1 2 3 4 5 6 7 8 9 The 1st row are the 1st point and the 2nd row is the 2nd point and so on. How do I connect the points using splines? So far, I am doing it manually and I have thousands of points. Regards, natur3 Edited September 3, 2012 by natur3 Quote
Dadgad Posted September 3, 2012 Posted September 3, 2012 Welcome to the forum. Sounds like you need to learn a bit about .lsp files. The very basic lisp you write will perform this incredibly tedious task in less than a minute, so invest a little time expanding your Autocad horizons ....... http://www.afralisp.net/index.php Quote
JD Mather Posted September 4, 2012 Posted September 4, 2012 What is the nature of the design (civil, architectural, mechanical)? If Mechanical - Autodesk Inventor product has built-in functionality to create spline from Excel. If you must do the work in AutoCAD - search Google for a lisp routine that will create the spline. Somehow I attached wrong image and can't delete it below. Quote
MSasu Posted September 4, 2012 Posted September 4, 2012 Since is about a single entity, I believe that there is a simpler solution; import those points in Excel (or other spreadsheet type application) and build a script for that task. It should looks like: _SPLINE 1,2,3 4,5,6 7,8,9 [i][i]{empty line}[/i][/i] [i][i]{empty line or tangent control point}[/i][/i] [i]{empty line or tangent control point}[/i] Don't forget to finish it with three empty lines to end points input and accept the default tangent at ends (if you have information about the tangents, may specify those control points instead). Quote
natur3 Posted September 4, 2012 Author Posted September 4, 2012 Thanks for the advices, especially the website. It was extremely informative and educational. Isit possible that I connect the points with a lisp/script that uses 3DPolyline and using the spline-fit command to change it into a spline. Does it makes a difference if i connect the points with a lisp/script that uses spline? Regards, natur3 Quote
hcostanzo Posted October 2, 2012 Posted October 2, 2012 This post is a bit old and I may be completely misunderstanding the problem. That being said, would a possible work around be to import the points using field to finish, explode the feature line that is created to a polyline and then convert the polyline to a spline? An odd series of commands to put together I know, but maybe it will help someone? Quote
MSasu Posted October 3, 2012 Posted October 3, 2012 What is that "field to finish" you are talking about? Is a entity specific to Civil 3D? You can try the script approach - for editing please note that can access the last added entity by inputing "_L" when asked for selection. The example below will add a polyline on the script and smooth it in next step. _PLINE 0,0 50,100 100,100 100,50 _PEDIT _L _F _REGEN 1 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.