Hickoz_bro Posted May 9, 2012 Share Posted May 9, 2012 Hi guys, Got a strange problem when copying geometry that contains splines between drawings. The image below shows the results, the white dashed line shows the copy result, the blue dots are the control points, and the red line shows the copy input. It seems that the control points are correct, but the tangencies of those points, or control vertices are WAAAAAY out... Has anyone else encountered this problem? Any suggestions on how to fix it? I also get the same result when inserting the geometry as a block... Any ideas? Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 9, 2012 Share Posted May 9, 2012 Are you pasting to original coordinates? Drawings are both METRIC or IMPERIAL, meaning no template disparity between the two? Have you tried a REGEN after copying it in? Quote Link to comment Share on other sites More sharing options...
Hickoz_bro Posted May 9, 2012 Author Share Posted May 9, 2012 Nah, copied from a dxf from a supplier and pasted into our company template. Yes, tried Regen. Just noticed too, that the original spline isn't healthy either, just not nearly as obvious... ******... Going to investigate some VBA... any suggestions in the meantime? Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 9, 2012 Share Posted May 9, 2012 Not really, aside from 'GARBAGE IN, GARBAGE OUT', and I understand that the problem is not your doing, but came with the turf, if you will. The one bit of recurring advice which will never steer me wrong, and might help just about anybody is check out http://www.lee-mac.com/index.html Lee may have something there which will help you. If not with this specific issue, certainly with something else, perhaps even a larger problem. Thanks Lee! I don't use enough splines to be definitive on them, but here are the SPLINE related system variables in Autocad 2012, you might want to click on each of them and consider the ramifications of choosing different variable settings. You might want to save a .svf before you start switching too much stuff, or else take notes of what you are changing, in case you decide that you want to go back to how everything was previously. Quote Link to comment Share on other sites More sharing options...
Hickoz_bro Posted May 10, 2012 Author Share Posted May 10, 2012 Thanks for the Tip... What I ended up doing was write a simple and quite crude script to just run through the drawing and redraw ALL splines since I couldn't find a single healthy spline. It looks something like this: Sub SplineRedraw() Dim Drg As AcadDocument Dim col As New Collection Dim spl As Object Dim X1 As Integer Dim NegCol As New Collection Set Drg = Application.ActiveDocument X1 = 0 For Each spl In Drg.ModelSpace() On Error Resume Next If TypeOf spl Is IAcadSpline2 Then If Not Err = 0 Then Stop If spl.Area <= 0 Then Call NegCol.Add(spl) GoTo NextSPL End If X1 = X1 + 1 Call col.Add(spl) If Not IsEmpty(col.Item(X1).FitPoints) Then Drg.ModelSpace.AddSpline col.Item(X1).FitPoints, col.Item(X1).StartTangent, col.Item(X1).EndTangent spl.Delete End If End If NextSPL: Next spl MsgBox X1 & " Splines redrawn." End Sub I noticed that there are some VERY strange spline occurances which simply crashed AutoCAD when it queried these instances... I'm guessing, but I suspect it might have something to do with the size of the individual spline relative to the overall drawing boundaries... I've run into a similar problem in the past... Either way, I managed to get it to work by first isolating the problem splines, running the script then re-introducing any other data... Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 10, 2012 Share Posted May 10, 2012 Nice save! Do you happen to know what software created these problematic splines? Quote Link to comment Share on other sites More sharing options...
SEANT Posted May 10, 2012 Share Posted May 10, 2012 Pro-E, maybe. http://forums.autodesk.com/t5/AutoCAD-2011/Problem-with-cuve-form-Pro-E-export/td-p/2898810 Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 10, 2012 Share Posted May 10, 2012 Pro-E, maybe. http://forums.autodesk.com/t5/AutoCAD-2011/Problem-with-cuve-form-Pro-E-export/td-p/2898810 It certainly looks like you may have hit the nail right on the head there Seant! As a non forum member I was unable to give you a Kudo for that nice solution, but I wanted to. Quote Link to comment Share on other sites More sharing options...
SEANT Posted May 10, 2012 Share Posted May 10, 2012 Much appreciated, nonetheless. Quote Link to comment Share on other sites More sharing options...
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.