This group of API functions pertains to general surface queries for Geom surfaces, such as computing 3D location from surface coordinates, identifying curvature, and performing point projections.
Click here to return to the main page.
More...
|
vec3d | CompPnt01 (const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w) |
|
vec3d | CompNorm01 (const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w) |
|
vec3d | CompTanU01 (const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w) |
|
vec3d | CompTanW01 (const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w) |
|
void | CompCurvature01 (const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w, double &out k1, double &out k2, double &out ka, double &out kg) |
|
double | ProjPnt01 (const string &in geom_id, const int &in surf_indx, const vec3d &in pt, double &out u, double &out w) |
|
double | ProjPnt01I (const string &in geom_id, const vec3d &in pt, int &out surf_indx, double &out u, double &out w) |
|
double | ProjPnt01Guess (const string &in geom_id, const int &in surf_indx, const vec3d &in pt, const double &in u0, const double &in w0, double &out u, double &out w) |
|
void | GetUWTess01 (const string &in geom_id, int &in surf_indx, double[]@ us, double[]@ ws) |
|
vec3d[] | CompVecPnt01 (const string &in geom_id, const int &in surf_indx, double[]@ us, double[]@ ws) |
|
vec3d[] | CompVecNorm01 (const string &in geom_id, const int &in surf_indx, double[]@ us, double[]@ ws) |
|
void | CompVecCurvature01 (const string &in geom_id, const int &in surf_indx, double[]@ us, double[]@ ws, double[]@ k1s, double[]@ k2s, double[]@ kas, double[]@ kgs) |
|
void | ProjVecPnt01 (const string &in geom_id, int &in surf_indx, vec3d[]@ pts, double[]@ us, double[]@ ws, double[]@ ds) |
|
void | ProjVecPnt01Guess (const string &in geom_id, int &in surf_indx, vec3d[]@ pts, double[]@ u0s, double[]@ w0s, double[]@ us, double[]@ ws, double[]@ ds) |
|
◆ CompCurvature01()
void CompCurvature01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const double &in |
u, |
|
|
const double &in |
w, |
|
|
double &out |
k1, |
|
|
double &out |
k2, |
|
|
double &out |
ka, |
|
|
double &out |
kg |
|
) |
| |
Determine the curvature of a specified surface at the input surface coordinate point
int surf_indx = 0;
double k1, k2, ka, kg;
Print(
"Curvature : k1 " + k1 +
" k2 " + k2 +
" ka " + ka +
" kg " + kg );
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | u | U (0 - 1) surface coordinate |
[in] | w | W (0 - 1) surface coordinate |
[out] | k1 | Output value of maximum principal curvature |
[out] | k2 | Output value of minimum principal curvature |
[out] | ka | Output value of mean curvature |
[out] | kg | Output value of Gaussian curvature |
◆ CompNorm01()
vec3d CompNorm01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const double &in |
u, |
|
|
const double &in |
w |
|
) |
| |
Calculate the normal vector on the specified surface at input surface coordinate
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
Print(
"Point: ( " + norm.
x() +
', ' + norm.
y() +
', ' + norm.
z() +
' )' );
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | u | U (0 - 1) surface coordinate |
[in] | w | W (0 - 1) surface coordinate |
- Returns
- Normal vector
◆ CompPnt01()
vec3d CompPnt01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const double &in |
u, |
|
|
const double &in |
w |
|
) |
| |
Calculate the 3D coordinate equivalent for the input surface coordinate point
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
Print(
"Point: ( " + pnt.
x() +
', ' + pnt.
y() +
', ' + pnt.
z() +
' )' );
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | u | U (0 - 1) surface coordinate |
[in] | w | W (0 - 1) surface coordinate |
- Returns
- Normal vector3D coordinate point
◆ CompTanU01()
vec3d CompTanU01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const double &in |
u, |
|
|
const double &in |
w |
|
) |
| |
Calculate the vector tangent to the specified surface at input surface coordinate in the U direction
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
Print(
"Point: ( " + tanu.
x() +
', ' + tanu.
y() +
', ' + tanu.
z() +
' )' );
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | u | U (0 - 1) surface coordinate |
[in] | w | W (0 - 1) surface coordinate |
- Returns
- Tangent vector in U direction
◆ CompTanW01()
vec3d CompTanW01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const double &in |
u, |
|
|
const double &in |
w |
|
) |
| |
Calculate the vector tangent to the specified surface at input surface coordinate in the W direction
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
Print(
"Point: ( " + tanw.
x() +
', ' + tanw.
y() +
', ' + tanw.
z() +
' )' );
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | u | U (0 - 1) surface coordinate |
[in] | w | W (0 - 1) surface coordinate |
- Returns
- Tangent vector in W direction
◆ CompVecCurvature01()
void CompVecCurvature01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
double@[] |
us, |
|
|
double@[] |
ws, |
|
|
double@[] |
k1s, |
|
|
double@[] |
k2s, |
|
|
double@[] |
kas, |
|
|
double@[] |
kgs |
|
) |
| |
Determine the curvature of a specified surface at each surface coordinate point in the input arrays
int n = 5;
uvec.resize( n );
wvec.resize( n );
for( int i = 0 ; i < n ; i++ )
{
uvec[i] = (i+1)*1.0/(n+1);
wvec[i] = (n-i)*1.0/(n+1);
}
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | us | Input array of U (0 - 1) surface coordinates |
[in] | ws | Input array of W (0 - 1) surface coordinates |
[out] | k1s | Output array of maximum principal curvatures |
[out] | k2s | Output array of minimum principal curvatures |
[out] | kas | Output array of mean curvatures |
[out] | kgs | Output array of Gaussian curvatures |
◆ CompVecNorm01()
vec3d [] CompVecNorm01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
double@[] |
us, |
|
|
double@[] |
ws |
|
) |
| |
Determine the normal vector on a surface for each surface coordinate point in the input arrays
int n = 5;
uvec.resize( n );
wvec.resize( n );
for( int i = 0 ; i < n ; i++ )
{
uvec[i] = (i+1)*1.0/(n+1);
wvec[i] = (n-i)*1.0/(n+1);
}
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | us | Input array of U (0 - 1) surface coordinates |
[in] | ws | Input array of W (0 - 1) surface coordinates |
- Returns
- Array of 3D normal vectors
◆ CompVecPnt01()
vec3d [] CompVecPnt01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
double@[] |
us, |
|
|
double@[] |
ws |
|
) |
| |
Determine 3D coordinate for each surface coordinate point in the input arrays
int n = 5;
uvec.resize( n );
wvec.resize( n );
for( int i = 0 ; i < n ; i++ )
{
uvec[i] = (i+1)*1.0/(n+1);
wvec[i] = (n-i)*1.0/(n+1);
}
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | us | Input array of U (0 - 1) surface coordinates |
[in] | ws | Input array of W (0 - 1) surface coordinates |
- Returns
- Array of 3D coordinate points
◆ GetUWTess01()
void GetUWTess01 |
( |
const string &in |
geom_id, |
|
|
int &in |
surf_indx, |
|
|
double@[] |
us, |
|
|
double@[] |
ws |
|
) |
| |
Get the surface coordinate point of each intersection of the tesselated wireframe for a particular surface
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[out] | us | Output array of U (0 - 1) surface coordinates |
[out] | ws | Output array of W (0 - 1) surface coordinates |
◆ ProjPnt01()
double ProjPnt01 |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const vec3d &in |
pt, |
|
|
double &out |
u, |
|
|
double &out |
w |
|
) |
| |
Determine the nearest surface coordinate for an input 3D coordinate point and calculate the distance between the 3D point and the closest point of the surface.
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
double uout, wout;
pnt = pnt + norm;
double d =
ProjPnt01( pid, surf_indx, pnt, uout, wout );
Print(
"Dist " + d +
" u " + uout +
" w " + wout );
- See also
- ProjPnt01Guess, ProjPnt01I
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | pt | Input 3D coordinate point |
[out] | u | Output closest U (0 - 1) surface coordinate |
[out] | w | Output closest W (0 - 1) surface coordinate |
- Returns
- Distance between the 3D point and the closest point of the surface
◆ ProjPnt01Guess()
double ProjPnt01Guess |
( |
const string &in |
geom_id, |
|
|
const int &in |
surf_indx, |
|
|
const vec3d &in |
pt, |
|
|
const double &in |
u0, |
|
|
const double &in |
w0, |
|
|
double &out |
u, |
|
|
double &out |
w |
|
) |
| |
Determine the nearest surface coordinate for an input 3D coordinate point and calculate the distance between the 3D point and the closest point of the surface. This function takes an input surface coordinate guess for, offering a potential decrease in computation time compared to ProjPnt01.
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
double uout, wout;
pnt = pnt + norm;
d =
ProjPnt01Guess( pid, surf_indx, pnt, u + 0.1, w + 0.1, uout, wout );
Print(
"Dist " + d +
" u " + uout +
" w " + wout );
- See also
- ProjPnt01, ProjPnt01I
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | pt | Input 3D coordinate point |
[in] | u0 | Input U (0 - 1) surface coordinate guess |
[in] | w0 | Input W (0 - 1) surface coordinate guess |
[out] | u | Output closest U (0 - 1) surface coordinate |
[out] | w | Output closest W (0 - 1) surface coordinate |
- Returns
- Distance between the 3D point and the closest point of the surface
◆ ProjPnt01I()
double ProjPnt01I |
( |
const string &in |
geom_id, |
|
|
const vec3d &in |
pt, |
|
|
int &out |
surf_indx, |
|
|
double &out |
u, |
|
|
double &out |
w |
|
) |
| |
Determine the nearest surface coordinate and corresponding parent Geom main surface index for an input 3D coordinate point. Return the distance between the closest point and the input.
int surf_indx = 0;
double u = 0.12345;
double w = 0.67890;
double uout, wout;
int surf_indx_out;
pnt = pnt + norm;
d =
ProjPnt01I( pid, pnt, surf_indx_out, uout, wout );
Print(
"Dist " + d +
" u " + uout +
" w " + wout +
" surf_index " + surf_indx_out );
- See also
- ProjPnt01, ProjPnt01Guess
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | pt | Input 3D coordinate point |
[in] | surf_indx | Output main surface index from the parent Geom |
[out] | u | Output closest U (0 - 1) surface coordinat |
[out] | w | Output closest W (0 - 1) surface coordinat |
- Returns
- Distance between the 3D point and the closest point of the surface
◆ ProjVecPnt01()
void ProjVecPnt01 |
( |
const string &in |
geom_id, |
|
|
int &in |
surf_indx, |
|
|
vec3d@[] |
pts, |
|
|
double@[] |
us, |
|
|
double@[] |
ws, |
|
|
double@[] |
ds |
|
) |
| |
Determine the nearest surface coordinates for an input array of 3D coordinate points and calculate the distance between each 3D point and the closest point of the surface.
int n = 5;
uvec.resize( n );
wvec.resize( n );
for( int i = 0 ; i < n ; i++ )
{
uvec[i] = (i+1)*1.0/(n+1);
wvec[i] = (n-i)*1.0/(n+1);
}
for( int i = 0 ; i < n ; i++ )
{
ptvec[i] = ptvec[i] + normvec[i];
}
- See also
- ProjVecPnt01Guess
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | pts | Input array of 3D coordinate points |
[out] | us | Output array of the closest U (0 - 1) surface coordinate for each 3D input point |
[out] | ws | Output array of the closest W (0 - 1) surface coordinate for each 3D input point |
[out] | ds | Output array of distances for each 3D point and the closest point of the surface |
◆ ProjVecPnt01Guess()
void ProjVecPnt01Guess |
( |
const string &in |
geom_id, |
|
|
int &in |
surf_indx, |
|
|
vec3d@[] |
pts, |
|
|
double@[] |
u0s, |
|
|
double@[] |
w0s, |
|
|
double@[] |
us, |
|
|
double@[] |
ws, |
|
|
double@[] |
ds |
|
) |
| |
Determine the nearest surface coordinates for an input array of 3D coordinate points and calculate the distance between each 3D point and the closest point of the surface. This function takes an input array of surface coordinate guesses for each 3D coordinate, offering a potential decrease in computation time compared to ProjVecPnt01.
int n = 5;
uvec.resize( n );
wvec.resize( n );
for( int i = 0 ; i < n ; i++ )
{
uvec[i] = (i+1)*1.0/(n+1);
wvec[i] = (n-i)*1.0/(n+1);
}
for( int i = 0 ; i < n ; i++ )
{
ptvec[i] = ptvec[i] + normvec[i];
}
u0v.resize( n );
w0v.resize( n );
for( int i = 0 ; i < n ; i++ )
{
u0v[i] = uvec[i] + 0.01234;
w0v[i] = wvec[i] - 0.05678;
}
- See also
- ProjVecPnt01,
- Parameters
-
[in] | geom_id | Parent Geom ID |
[in] | surf_indx | Main surface index from the parent Geom |
[in] | pts | Input array of 3D coordinate points |
[in] | u0s | Input array of U (0 - 1) surface coordinate guesses |
[in] | w0s | Input array of W (0 - 1) surface coordinate guesses |
[out] | us | Output array of the closest U (0 - 1) surface coordinate for each 3D input point |
[out] | ws | Output array of the closest W (0 - 1) surface coordinate for each 3D input point |
[out] | ds | Output array of distances for each 3D point and the closest point of the surface |
void GetUWTess01(const string &in geom_id, int &in surf_indx, double[]@ us, double[]@ ws)
vec3d[] CompVecNorm01(const string &in geom_id, const int &in surf_indx, double[]@ us, double[]@ ws)
vec3d CompTanW01(const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w)
void ProjVecPnt01Guess(const string &in geom_id, int &in surf_indx, vec3d[]@ pts, double[]@ u0s, double[]@ w0s, double[]@ us, double[]@ ws, double[]@ ds)
vec3d[] CompVecPnt01(const string &in geom_id, const int &in surf_indx, double[]@ us, double[]@ ws)
void CompVecCurvature01(const string &in geom_id, const int &in surf_indx, double[]@ us, double[]@ ws, double[]@ k1s, double[]@ k2s, double[]@ kas, double[]@ kgs)
void CompCurvature01(const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w, double &out k1, double &out k2, double &out ka, double &out kg)
double ProjPnt01Guess(const string &in geom_id, const int &in surf_indx, const vec3d &in pt, const double &in u0, const double &in w0, double &out u, double &out w)
A class for representing 3D vectors.
void ProjVecPnt01(const string &in geom_id, int &in surf_indx, vec3d[]@ pts, double[]@ us, double[]@ ws, double[]@ ds)
vec3d CompPnt01(const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w)
AngelScript ScriptExtension for representing the C++ std::vector.
double ProjPnt01(const string &in geom_id, const int &in surf_indx, const vec3d &in pt, double &out u, double &out w)
vec3d CompNorm01(const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w)
string AddGeom(const string &in type, const string &in parent=string())
void Print(const string &in data, bool new_line=true)
double ProjPnt01I(const string &in geom_id, const vec3d &in pt, int &out surf_indx, double &out u, double &out w)
vec3d CompTanU01(const string &in geom_id, const int &in surf_indx, const double &in u, const double &in w)