JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
(OP)
thread561-379920: export spline data points to a file
Hi John,
I used your grip file to output the points on a spline.
It works great, thanks!! Would it be possible to increase the number of points??
Once i go above 1000,I get an error. Any help would be much appreciated!
Hi John,
I used your grip file to output the points on a spline.
It works great, thanks!! Would it be possible to increase the number of points??
Once i go above 1000,I get an error. Any help would be much appreciated!





RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
Just find the array definition line that has (1000) on it and up the value.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
ENTITY/PT_CURVE,CUR_PTS(1000)
Mark Rief
NX CAM Customer Success
Siemens PLM Software
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
This Thread also helped.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
Maybe you could point me in the right direction...
...Maybe it can be done more easily using a different method? Knowledge fusion?
Thanks in advance
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
read the points array from array length to 0
I mean from last index to 0 instead of
From 0 to last index.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
Start with zero.
any way from last index to first index.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
and use the new array.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
I'll see if I can make sense of your suggestions and get back to you.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
May be you can change this line
to go down from NUMPTS to 1
may be something like this
DO/S40:,N,NUMPTS,1,-1
$ Write Data Points to Scratch Area
DO/S40:,N,1,NUMPTS
PTXYZ=&POINT(CUR_PTS(N))
WRITE/1,USING,DATA_FORMAT,N,PTXYZ
S40:
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
I'll give it a go.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
because it reads the points in reversed.
from array index NUMPTS to array index 1
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
Works perfectly. Thanks.
Hopefully I can figure out how to make it write the points in one direction and then the other.
Thanks again!
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
Because now you have the two DO loop
The original one from 1 to numpts
And the new one from numpts to 1
Now you need a user choice input
and an IF statement to run the original DO loop
Or the new DO loop
To do this I need refresh my grip knowledge
With no promise I'll try to.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
The input window has no description.
It's just for user friendliness.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
Replace this code
CODE -->
With this code
CODE -->
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
My only problem is that the title bar of the user input gives no description - ('Enter Name of Data File','Select Curve','Have You Selected the Correct Curve?'). It still works fine, but it would be nice to see the correct prompts.
I currently have it writing the points in both directions.
My next goal is to have it output 2 files , PT_FILE+'-forward' and PT_FILE+'-reverse'.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
This file tested and working it writes 2 files
1 for forward points data
2 for reverse points data
CODE -->
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
and the grx
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
The prompts are on the Cue line
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
one file name input from the user and
make the two by adding forward for the first
and reverse for the second.
As you mentioned in your last post.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
I had it create and write another TXT,1 and WRITE/1 by copying and pasting!
I have data format set as:
CODE -->
CODE -->
I had DATA_FORMAT='N#@@@ X#@@@.@@@ Y#@@@.@@@ Z#@@@.@@@' so i could get N1, N2, N3 etc,
but instead I got N 1, N 2, N 3 etc. 'N#@' didn't fix it.
If I could remove the extra spaces, I'd be sorted.
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx
and use
partname + 'forwards'
partname + 'backwards'
RE: JohnRBaker Pts_Along_Any_Curve_to_txt-file.grx