iCAx开思工具箱

标题: grip开发的一个问题 [打印本页]

作者: maomao521    时间: 2006-5-9 09:36
标题: grip开发的一个问题
通过给定点的三维坐标生成B样条曲面,请教文件“COORDS” 放到那个目录下阿,我的程序编译能通过,只是在UG里面执行的时候出现错误,程序如下:
Through Points Example
This example program creates a multi-patch surface through the point coordinates contained in the text file "COORDS". The program prompts the user to enter the desired number of rows for the surface. The program then places the same number of points into each row and creates the surface through them.

$$
$$  Declarations
$$   
    NUMBER/ROW(500),NUM(3)
    ENTITY/P(200), BS   
    $$
$$
$$ Geometry Definition
$$
    L10:   
    PARAM/'ENTER # of rows','# OF ROWS',R,RESP
    JUMP/L10:,TERM:,,RESP
    $$
    DOPEN
    FETCH/TXT,1,'COORDS'
    RESET/1
    L20:
    READ/1,IFEND,END:,NUM
    K=K+1
    P(K)=POINT/NUM
    JUMP/L20:
    END:
    A=K/R
    L30:
    J=J+1
    ROW(J)=A
    IF/J==R,JUMP/CONT:
    JUMP/L30:
    CONT:
$$
$$ B-Surface Definition
$$
    BS=BSURF/P(1..K),ROW(1..R)
    $$
    TERM:HALT


执行时出现的错误是说为“coods”未找到,文件中坐标点是什么格式阿?应该把它放到那个目录下呢?恳请那位前辈帮忙
作者: 黄瓜    时间: 2006-5-9 17:56
NUMBER/ROW(500),NUM(3)
    ENTITY/P(200), BS   
    $$
$$
$$ Geometry Definition
$$
    L10:   
    PARAM/'ENTER # of rows','# OF ROWS',R,RESP
    JUMP/L10:,TERM:,,RESP
    $$
    DOPEN
    FETCH/TXT,1,'c:\COORDS.dat'  $$example




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3