×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

GRIP to create points
2

GRIP to create points

GRIP to create points

(OP)
Hi,

I'm looking for a compiled grip programm for creating points from an ascii file (3 coordinates on each line).

Thanks in advance

Regards

RE: GRIP to create points

Psicad,
   Use a GRIP program found in the International GRIP Library named: 'FILE2POINTS.GRS' (source code file).  If you need it compiled for you, I'm sure something can be arranged....

SS

RE: GRIP to create points

(OP)
Hi,

thanks for your answer, I found the file2points.grx directly and was able to test it.

But this programm read a file formatted like:
x1
y1
z1
x2
y2
z2
...

And my input file is formatted like:
x1 y1 z1
x2 y2 z2
...

Thanks in advance

Regards

RE: GRIP to create points

Is the delimiter between points a space character or is there something else (like a comma, tab stop, or other special character)?

RE: GRIP to create points

(OP)
The delimeter is a space character.

RE: GRIP to create points

I have been meaning to look up that grip program, but things got busy around here. However, I have thought of an alternative workaround.

You can define a spline by points (from file) delimited as you have described (one x y z point per line separated by spaces). So, create a spline using points from your file, then create a point set on the defining points, and delete the spline.

Maybe someday we will be able to import points from file directly in the point set command (makes sense to me, anyway).

RE: GRIP to create points

(OP)
Hi,

Just a problem, my file containt about 1500 points !!!
Thank's anyway
I will try and gave you a feedback
Regards
Didier

RE: GRIP to create points

Hi ,

I wrote this to read a 3-D scan file from a Mitutoyo 3D cmm-machine .Maybe it can help . Enjoy .

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$
$$ SUBROUTINE :Read_cmm_points.GRS
$$
$$ FUNCTIE: Programma leest 3-D punten van een aangeduide scan-file van
$$          een Mitutoyo 3-D meetmachine en zet deze modelling op het
$$          scherm in de vorm van punten.
$$
$$
$$ GEBRUIKTE BESTANDEN : aangeduide scan-file.dat
$$
$$ Example input file format :
$$ -----------------------------
$$ #00:GEOPAK-WIN Scanning
$$ #02:kanaal_A
$$ #04:ZX(Y)
$$ #05:Cls
$$ #06:MM
$$ #12:  -57.36521  110.27753  -64.24180     0.00112    0.00000   -1.00000
$$ #12:  -57.36471  110.32947  -64.24111     0.00135    0.00000   -1.00000
$$ #12:  -57.36521  110.38151  -64.24141     0.00161    0.00000   -1.00000
$$ #12:  -57.36421  110.43046  -64.24122    -0.00016    0.00000   -1.00000
$$ #12:  -57.36472  110.48066  -64.24053    -0.00056    0.00000   -1.00000
$$ #12:  -57.36472  110.53987  -64.24131     0.00004    0.00000   -1.00000
$$ #12:  -57.36472  110.59114  -64.24211    -0.00158    0.00000   -1.00000
$$ #12:  -57.36522  110.65192  -64.24140     0.00006    0.00000   -1.00000
$$ #12:  -57.36522  110.70269  -64.24170    -0.00155    0.00000   -1.00000
$$ #12:  -57.36473  110.76114  -64.24200     0.00143    0.00000   -1.00000
$$ #12:  -57.36473  110.81561  -64.24129    -0.00009    0.00000   -1.00000
$$ #12:  -57.36523  110.87476  -64.24058     0.00149    0.00000   -1.00000
$$ #12:  -57.36423  110.92300  -64.24038    -0.00164    0.00000   -1.00000
$$ #12:  -57.36524  110.97405  -64.24019    -0.00162    0.00000   -1.00000
$$ #12:  -57.36474  111.03577  -64.23947    -0.00001    0.00000   -1.00000
$$ #12:  -57.36523  111.08461  -64.23926    -0.00309    0.00000   -1.00000
$$ #12:  -57.36525  111.14470  -64.23956    -0.00004    0.00000   -1.00000
$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
NUMBER/SRESP,aantal,xyz(3),xpunt,ypunt,zpunt
STRING/cmmfile(80),lijn(132)
ENTITY/PNTS(10000)
DATA/cmmfile,'PUNTEN.DAT'
st1:
  TEXT/'Geef file naam (vb : P:\BLE\PUNTEN.DAT)',cmmfile,RESP,DEFLT
  JUMP/STOP:,STOP:,RESP
  IF/LENF(cmmfile)==0,JUMP/ST1:
  FHREAD/cmmfile,IFERR,FILERR:
    JUMP/next:
  FILERR:
    MESSG/'File niet gevonden'
  JUMP/ST1:
next:
fhread/cmmfile,iferr,filerr:
fetch/txt,2,cmmfile
reset/2
aantal = 1
loop_3:
   read/2,ifend,eof_3:,lijn
   ifthen/substr(lijn,1,4)=='#12:'
      xpunt = valf(substr(lijn,5,14))
      ypunt = valf(substr(lijn,17,14))
      zpunt = valf(substr(lijn,30,14))
      point/xpunt,ypunt,zpunt
      aantal = aantal + 1
   endif   
jump/loop_3:
eof_3:
fterm/txt,2
print/ 'Aantal gelezen punten '+ istr(aantal)
STOP: HALT




RE: GRIP to create points

(OP)
Thanks.

RE: GRIP to create points

I got a chance to look at the FILE2PTS.GRS program. The version I looked at takes points in the format:
x1,y1,z1
x2,y2,z2
.
.
.
xn,yn,zn

So, I think if you edit your file to use commas as the separator (an automatic find and replace function will make this easy) you should be good to go.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources