We recieved some faro arm data, which consists of thousands upon thousands of tiny line segements. We would like nice splines, and the options as I see:
Fit Curve: But this requires a lot of line picking
Build new splines, on top of the tiny lines, using the endpoints to define the spline.
Any other options, or suggestions?
How close do you need the spline to be to the faro data? I suggest only using the minimum amount of data to get the shape you need. Using "thousands upon thousands" of data points to define a spline will result in a nearly useless spline. The spline data itself will be very "heavy" and other features generated from the spline (a tube or freeform surface) will follow suit.
If you can get the Faro data as points, you could then use the 'Fit Curve' routine to do a best fit operation which would 'average' out the data points and give you a much simpler curve than actually using ALL the points as spline points. The simplest program, if you couldn't ger the Faro data as points directly, would be to get a file of points, either as a text file or a part file and then interactively run the 'Fit Curve' function on the results (if it's a text file, importing them first as points).
It doesn't need to be every end point of the lines precise. I have the user building splines over the lines, picking a point every so often, and making sure they lie on top, without any strange deviations. I thinkt that will work. Then I will talk to QC and see if they can output actual splines next time.
You (or someone) could write a small program to create points at the start and end of every line. It would only be about half a dozen lines of code using GRIP or SNAP.
Then you can use Spline-->Fit, and select the points by rectangle or polygon.
Here is the SNAP code to create points on all your lines:
Option Infer On Imports Snap, Snap.Create, Snap.UI.Selection Module NXJournal Sub Main() ' Create a selection dialog Dim dialog = SelectObject("Select lines") ' Allow selection of multiple lines dialog.SetFilter(Snap.NX.ObjectTypes.Type.Line) dialog.AllowMultiple = True ' Display the dialog and get a result Dim result = dialog.Show() ' Cycle through the lines, creating points For Each obj In result.Objects Dim line = CType(obj, Snap.NX.Line) Point(line.StartPoint) Point(line.EndPoint) Next End Sub End Module
Best way ugopen application.
Can you upload example of your file with 1000 and 1000 lines?
Lines in file - line-by-line, when end of line is a start next line?