sur_exdef - Geometric procedure
Creates a surface
Description
Creates a surface from data in a text file. This is a an interface function for the import of surfaces from other systems
The function can handle the following file formats (surfaces):
- VDA-FS polynomial surfaces (for the moment only bicubic surfaces in Win95/NT)
- Bicubic surface from the surface definition system Numerical Master Geometry (NMG)
- Consurf surface from the surface definition system Numerical Master Geometry (NMG)
Syntax
sur_exdef(id, file_name, file_type, sur_type, u1, v1, u2, v2:attributes);
REF id; STRING file_name STRING file_type STRING sur_type FLOAT u1; FLOAT v1; FLOAT u2; FLOAT v2; INT surf_no; Principal parameters
id - Local identity file_name - File name file_type - Type of file (VDA-FS, NMG_F07) sur_type - Surface type (POL_SUR, CUB_SUR, CON_SUR, RAT_SUR, LFT_SUR) Optional parameters
u1 - Surface U parameter start value for trimming v1 - Surface V parameter start value for trimming u2 - Surface U parameter end value for trimming v2 - Surface V parameter end value for trimming surf_no - Requested VDA-FS surface (=0 for all surfaces) Attributes
PEN - Pen or colour number LEVEL - Level number BLANK - Visible (0) or invisible (1) SFONT - Solid boundary and dashed midcurves (0) SDASHL - Dashlength Example
sur_exdef( #2, "/usr/varkon/app/bmw/surflib/doors.VDA" , "VDA-FS" , "POL_SUR", 0 ,0 ,0 ,0 ,4 );
Extracts coefficients for surface number four (4) from the VDA-FS file doors.VDA and creates a new surface #2.
sur_exdef( #3, "/usr/varkon/surflib/gripen/wing.F07" , "NMG_F07" , "CUB_SUR" );
Creates a new surface #3 defined by coefficients in file wing.F07 on directory /usr/varkon/surflib/gripen/.
The of the file is as an output file from the surface definition system NMG.
Description of data in a NMG_F07 file with coefficients for a bicubic surface
The order of the patches:
U=0.0, V=NV U=NU, V=NV
Patch 19 Patch 20 Patch 21 Patch 22 Patch 23 Patch 24 Patch 13 Patch 14 Patch 15 Patch 16 Patch 17 Patch 18 Patch 7 Patch 8 Patch 9 Patch 10 Patch 11 Patch 12 Patch 1 Patch 2 Patch 3 Patch 4 Patch 5 Patch 6 U= 0.0, V=0.0 U=NU, V=0.0
Surface data header.
Surface name Number of patches Line 1 SUR/1 594 Example
Patch data header:
Fixed 0 No of records Patch no. Fixed 0 Surface type Fixed 0 No.of U lines No.of V lines Fixed 0 Line 2 0 48 1 0 1001 0 34 19 0 Example
Coefficients:
a00x a00y a00z 1.0 * 1.0 a10x a10y a10z U * 1.0 a20x a20y a20z U**2 * 1.0 a30x a30y a30z U**3 * 1.0 a01x a01y a01z 1.0 * V a11x a11y a11z U * V a21x a21y a21z U**2 * V a31x a31y a31z U**3 * V a02x a02y a02z 1.0 * V**2 a12x a12y a12z U * V**2 a22x a22y a22z U**2 * V**2 a32x a32y a32z U**3 * V**2 a03x a03y a03y 1.0 * V**3 a13x a13y a13z U * V**3 a23x a23y a23z U**2 * V**3 a33x a33y a33z U**3 * V**3
VARKON Homepage | Index |