Action:
|
Creates a B-spline surface from a collection of control points and knot vectors.
|
|
Prototype:
|
bs3_surface bs3_surface_from_ctrlpts (
|
|
|
int degree_u,
|
// degree in u
|
|
|
logical rational_u,
|
// rational in u
|
|
|
int form_u,
|
// type in u
|
|
|
int& pole_u,
|
// pole in u
|
|
|
int num_ctrlpts_u,
|
// number of control
|
|
|
|
|
// points in u
|
|
|
int degree_v,
|
// degree in v
|
|
|
logical rational_v,
|
// rational in v
|
|
|
int form_v,
|
// type in v
|
|
|
int& pole_v,
|
// pole in v
|
|
|
int num_ctrlpts_v,
|
// number of control
|
|
|
|
|
// points in v
|
|
|
const SPAposition
|
// position control
|
|
|
|
ctrlpts[],
|
// points
|
|
|
const double weights[],
|
// weights
|
|
|
double,
|
// tolerance to determine
|
|
|
|
|
// if two control points
|
|
|
|
|
// are the same
|
|
|
int num_knots_u,
|
// number of knots in u
|
|
|
const double knots_u[],
|
// knots in u
|
|
|
int num_knots_v,
|
// number of knots in v
|
|
|
const double knots_v[],
|
// knots in v
|
|
|
double knot_tol
|
// tolerance to determine
|
|
|
|
|
// if two knots are the
|
|
|
|
|
// same
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "baseutil/logical.h"
|
|
#include "baseutil/vector/position.hxx"
|
|
#include "kernel/spline/bs3_srf/bs3surf.hxx"
|
|
#include "kernel/spline/sg_bs3s/sps3srtn.hxx"
|
|
Description:
|
The spline is defined by the given sequence of control points and knots. If the argument rational_u is TRUE, the surface is rational in the u parameter; if FALSE, it is not. Similarly, for rational_v.
|
|
|
The argument form_u specifies whether the surface is open (0), closed (1), or periodic (2) in the u direction. Similarly for form_v.
|
|
|
The argument pole_u indicates whether or not the surface has a singularity at the u-min or u-max parameter boundaries according to the following:
|
|
|
|
0
|
= No singularity at u-min or u-max boundary
|
|
|
|
1
|
= Has a singularity at the u-min boundary
|
|
|
|
2
|
= Has a singularity at the u-max boundary
|
|
|
|
3
|
= Has a singularity at both boundaries
|
|
|
Similarly for pole_v.
|
|
|
The control points are contained in an array of positions. The v index varies first. That is, a row of v control points for the first u value is found first. Then, the row of v control points for the next u value. If the surface is rational in either parameter, it is considered a rational surface and the associated weights are in the array of doubles. The values in this array are in the same sequential order as the control points.
|
|
|
The point_tol tolerance value determines when two control points are identical and the knot_tol tolerance value performs the same function for the knot sequence.
|
|
Limitations:
|
The knots input have to be in an strictly increasing order.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/spline/sg_bs3s/sp3srtn.hxx
|
|
Effect:
|
Changes model
|