Action:
|
Creates an approximate spline surface to a procedurally defined surface.
|
|
Prototype:
|
bs3_surface bs3_surface_proc (
|
|
|
SPAinterval& u_interval,
|
// parameter range in u
|
|
|
|
|
// over which approximate
|
|
|
|
|
// surface is constructed
|
|
|
SPAinterval& v_interval,
|
// parameter range in v
|
|
|
|
|
// over which approximate
|
|
|
|
|
// surface is constructed
|
|
|
pt_eval_fn_t pt_fn,
|
// model space point
|
|
|
|
|
// evaluator
|
|
|
vec_eval_fn_t du_fn,
|
// ds/du evaluator
|
|
|
vec_eval_fn_t dv_fn,
|
// ds/dv evaluator
|
|
|
vec_eval_fn_t duv_fn,
|
// ds2/dudv evaluator
|
|
|
void* data,
|
// data to be passed to
|
|
|
|
|
// evaluators
|
|
|
double res
|
// fit resolution
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "baseutil/vector/interval.hxx"
|
|
#include "kernel/spline/bs3_srf/bs3surf.hxx"
|
|
#include "kernel/spline/sg_bs3s/sps3srtn.hxx"
|
|
Description:
|
The surface is defined over a parametric interval in u and
v. Functions are supplied by the caller to calculate points on the surface, tangent vectors, and second derivatives. This information is evaluated and used to define a surface that is a fit to the evaluated data. If an error occurs, a
NULL surface is returned.
|
|
|
The following are the type definitions of the evaluation functions used in
bs3_surface_proc.
|
|
|
The
pt_fn evaluator function for the surface must return a point on the surface at a given (u,v) value:
|
|
|
typedef logical
|
|
|
(*pt_eval_fn_t) (
|
|
// return of FALSE =>
|
|
|
|
|
|
|
|
|
// evaluation failed
|
|
|
double u,
|
|
|
|
// u param of evaluation
|
|
|
|
|
|
|
|
|
// point
|
|
|
double v,
|
|
|
|
// v param of evaluation
|
|
|
|
|
|
|
|
|
// point
|
|
|
void* data,
|
|
|
|
// data you passed to
|
|
|
|
|
|
|
|
|
// bs3_surface_proc
|
|
|
SPAposition& pt
|
|
|
// OUT: model space
|
|
|
|
|
|
|
|
|
// position
|
|
|
|
|
|
|
|
|
// at given uv location
|
|
|
);
|
|
|
The
du_fn evaluator function for the surface must return a
u-partial on the surface at a given (u,v) value. The
dv_fn evaluator function for the surface must return a
v-partial on the surface at a given (u,v) value. The
duv_fn evaluator function for the surface must return a
uv-partial on the surface at a given (u,v) value. All have the form:
|
|
|
typedef logical
|
|
|
(*vec_eval_fn_t) (
|
|
// return of FALSE =>
|
|
|
|
|
|
|
|
|
// evaluation failed
|
|
|
double u,
|
|
|
|
// u param of evaluation
|
|
|
|
|
|
|
|
|
// point
|
|
|
double v,
|
|
|
|
// v param of evaluation
|
|
|
|
|
|
|
|
|
// point
|
|
|
void* data,
|
|
|
|
// data you passed to
|
|
|
|
|
|
|
|
|
// bs3_surface_proc
|
|
|
SPAvector& vec);
|
|
// OUT: vector at given uv
|
|
|
|
|
|
|
|
|
// location
|
|
|
);
|
|
Limitations:
|
Do not give too small a value for
res, because this can result in data explosion of the approximate surface. A
res value of 0.01 seems to work best.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/spline/sg_bs3s/sps3srtn.hxx
|
|
Effect:
|
Changes model
|