Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unigraphics NX2: Spline and point data file

Status
Not open for further replies.

hvk

Aerospace
Jan 16, 2006
8
Hello all,

With Unigraphics NX2, I try to create a surface using "Thru Curves" option. To define this surface, I need about 200 splines. In Pro/Engineering, I know how to use only one .IBL file (point data file) to create curves. However, in Unigraphics NX2, it seems to me that I need to have up to 200 point-data files to create 200 separated splines.
My question is that is there a way to create 200 splines with only one point-data file, and what the format should be for this file?
Thanks for your help.

Regards,
hvk
 
Replies continue below

Recommended for you

You can write a XYZ in excel and import that into NX via Spline -> Through Points -> Points from file.
You have to save your Excel file without any headers and as a *.txt file.
 
Thanks ewh. However, I've already tried the same way you show me (and save the point data file with extension .dat).
But I got only 1 spline go all the points, although I need 200 separated splines. Some help resouces said that the data file should be formated like this:

Row 1
x1 y1 z1
x2 y2 z2
x3 y3 z3

Row 2
x4 y4 z4
x5 y5 z5
x6 y6 z6

Row 3
x7 y7 z7
x8 y8 z8
x9 y9 x9

....
and so on.

I did try. But it seems to me that NX2 doesn't understand this kind of format.

Any ideas?
Thanks

hvk
 
You're correct. I don't know any way to do what you need other than doing 200 times, unless there is some programming involved.
 
If it is a must that you need to create the surface using 'thru curves' option then the best work around
i could think of is that create the surface using 'from cloud points' option, and then take section at the relevant heights and reproduce your surface using thru curve. To input the points to create the surface using 'from cloud points' option do has you did by creating the single spline, and create the point by using 'redefine spline points' option from the points set menu.

 
Thanks dlad.
I tried your way, using "from cloud points", but I got an undesirable surface.

Regards,
hvk
 
HVK,
Here's an option that may work, although it will take some work to set up. You will, however, be able to use this on other parts so there is a good return on the work involved.
We use this for our impellors, and I don't see why this method can't be used in your application. In a nutshell, your using an excel file to drive a series of associated points in a sketch. These points drive a series of splines, which define the blade geometry (we use a combination of 'through curve' and 'swept' features to create sheets and then sew them together for the solid of the blades...).
Each point is defined by 3 values (x,y,z -or- radius, theta, z), and UG gets these values from a linked excel file. If you want to change the spline geometry, just re-link UG to the new spreadsheet and update the part (tis a bit more complicated than this but you get the idea).
In your situation, from what I understand so far (and I likely need more info btw), I'd create 1 sketch with all the points so your only dealing with 1 .xls file. You can have as many splines as you want associated with these points, and you can re-associate the splines to different points.
If your interested in this approach, let me know and I'll try to be more specific.

SS
 
Hi Shadowspawn,

Wow! Thanks a lot. It seems to me your approach is the way to go.

But before go to the details, first I'd like to know how to "LINK" NX2 with its point data on spreadsheet, given that I've already put all point data into a NX2 spreadsheet? I think I should use "splines thru points" to create splines, then use "Free Form Feature -->Thru curves" to define a surface, since our points are not laid out on the same plane. Thus, they can not be put into one sketch. (You might think of points that define an impeller blade. These points define many splines, and there splines define blade surface).

Please help. I really appreciate your help.

Regards,
hvk
 
I feel that you want to do whatever it takes to avoid creating surfaces straight from the point data. In the past, UGS instructors have told people to avoid using From Point Cloud by itself if at all possible. This isn't to say it will be any easier, but surfacing seems to be a garbage in/garbage out operation in NX. If your splines aren't high quality, then don't expect your surfaces to be either. You may wish to keep that in mind as you work with these points and any splines you create from them.

Tim Flater
Senior Designer
Enkei America, Inc.
 
Hi nkwheelguy,

Thanks for your best practice on "surface from point cloud". I don't think surface from point cloud is what i'm looking for.

In fact, I have very high quality data points to define surfaces. And I actually used these data points in Pro/Engineering to create datum curves and surfaces afterward.

So I guess the problem here is how to format these data points into NX2 spreadsheet then link it with the model in order to create splines. It seems Shadowspawn have a good solution and I'm still waiting to hear from her/him.

Again, I appreciate your response.

Regards,
hvk



 
Hi,
only a little bit of maths underlying the splines/surfs creation: in just a few words, the more the points, the higher the order of the spline / FF-surf, the higher the risk of local "self-oscillation" of the splines / isocurves.
My personal advice, which may or may not work in your case, is to reduce as far as possible the number of points, and control the geometry via first and/or second derivative conditions (i.e. tangencies / curvatures). In a model of a Francis turbine, which I created for my amusement, I use hermitian splines with only two nodes each, but with tangency and curvature control at each end of segment. I found my method must be something like what is described in an old post from "Cloche" in this thread.

Other way: write a least-squares "smoothing" routine to optimize your cloud before passing it to UG: you would then be sure that all your points do belong to a coherent surface; in this case, there is no reason why UG should create an ondulated surface...

I find the advice of linking to Excel very valuable; I'd like to try it myself if I had clear how it takes to do this... Shadowspawn, help! ;-)

Regards
 
One more option to import the points, (not sure if this will help in this case) is to create a spline through points, and you will get aone long "zig-zag" spline. Now create a point set, and use the spline defining points option. Now you will have a ton of points, that you can then sort them as needed, and manually create splines through the sorted points. Kind of stinks, but it works. The only other option is to write a GRIP tool to do exactly what you need... It can certainly be done in GRIP.

-Derek
DL Engineering Services
specializing in CAD Design Consultation Services
 
Do you have all your points in one file now?
What format are they in?
 
A few more questions to add to my previous post.
How many points per spline (is it fixed or does it vary)? What degree spline do you want as output? Open splines, closed splines, or mixed?
 
Hello all,

I'm very happy since this forum is very responsive, although I'm very new to this group. Thanks all for your great inputs.

cbrn:
Your Math approach is very interesting, although it cannot be applied in my case, since it might take more time to understand and develop. However, I might need your advice in another case. Thanks cbrn.

demco:
I've already tried the way you showed me. But this approach seems very tedious, especially in the case of controling more than 2000 points! You mentioned about writing GRIP. It is really a good idea. But I think I will consider it as my last approach. Thanks demco.

cowski:
Yes, I do have all my points in one file. The format is very simple: x, y, z. Each spline has 10 fixed points. I'd like the spline opened. Thanks cowski.

Regards,
hvk


 
Here is a quick and dirty grip program for your application (it is a modified file2pts.grs program). I have not done much error checking with it and it could be more general, but here it is.

Code:
$$
$$ PROGRAM: SPLINE_10.GRS
$$
$$ KEYWORDS:
$$
$$ ABSTRACT:
$$   THIS PROGRAM CREATES POINTS FROM DATA IN A TEXT FILE.
$$   THE DATA MUST BE X,Y,Z VALUES, SEPARATED BY COMMAS.
$$
$$ RELEASE HISTORY:
$$   09-FEB-06 INITIAL RELEASE
$$
$$ Required Subroutines: (None)
$$
$$ AUTHOR: 
$$
$$ SYSTEM TYPE: ALL
$$
NUMBER/SRESP,PCNT,PC(3),I
STRING/FNAMEX(80)
ENTITY/PNTS(10000),SPPNTS(10)
DATA/FNAMEX,'POINTS.DAT'
$$
$$ ASK FOR FILENAME, MAKE SURE IT EXISTS:
$$
ST1:
  TEXT/'FILENAME FOR POINT INPUT',FNAMEX,RESP,DEFLT
  JUMP/STOP:,STOP:,RESP
  IF/LENF(FNAMEX)==0,JUMP/ST1:
$$
  FHREAD/FNAMEX,IFERR,FILERR:
    JUMP/ST2:
  FILERR:
    MESSG/'FILE DOES NOT EXIST'
  JUMP/ST1:
$$
$$ ASK FOR POINTS:
$$
ST2:
  FETCH/TXT,2,FNAMEX,IFERR,NOFET:
  RESET/2
  PCNT=0
  RLOOP:

    DO/RDPTS:,I,1,10
    READ/2,IFEND,EOF2:,PC
    SPPNTS(I)=POINT/PC
    RDPTS:
    BCURVE/SPPNTS,DEGREE,3

  JUMP/RLOOP:
  $$
  EOF2:
    FTERM/TXT,2

  JUMP/STOP:
$$
NOFET:
  MESSG/'COULD NOT FETCH FILE'
JUMP/ST1:
STOP: HALT

The program reads 10 points at a time and creates a spline through the points. If your point data represents the poles (instead of through points) we can accommodate that. Also, the splines are degree 3, if you need a different degree that can be changed as well.

If you need a compiled version, leave an email address and I can send it to you.
 
Hi cowski,

Thank you for the GRIP code. You're very helpful. I'll try to use it and let you know soon.

Regards,
hvk

 
HVK,
I apologize for my absense from the boards and leaving you hanging. In short, I quit my job and relocated to a warmer climate that pays a bit more. I'm by no means settled into my new position yet, but I'll be happy to explain what I can if you still need help.

SS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor