BRL-CAD
nurb_xsplit.c File Reference
#include "common.h"
#include "bio.h"
#include "vmath.h"
#include "nmg.h"
#include "raytrace.h"
#include "nurb.h"
Include dependency graph for nurb_xsplit.c:

Go to the source code of this file.

Functions

struct face_g_snurb * rt_nurb_s_xsplit (struct face_g_snurb *srf, fastf_t param, int dir)
 
struct edge_g_cnurb * rt_nurb_c_xsplit (struct edge_g_cnurb *crv, fastf_t param)
 

Detailed Description

Subdivide a nurb surface by inserting a multiple knot of of the surface order in a given direction and return the resulting surfaces.

Definition in file nurb_xsplit.c.

Function Documentation

struct face_g_snurb* rt_nurb_s_xsplit ( struct face_g_snurb *  srf,
fastf_t  param,
int  dir 
)

Algorithm

Given a parametric direction (u or v) look at the direction knot vector and insert a multiple knot of parametric direction surface order. This is somewhat different than rt_nurb_split in that the surface is give a parametric value at which to split the surface. rt_nurb_kvmult does the right thing in inserting a multiple knot with the correct amount. Separate the surface and return the two resulting surface.

Definition at line 53 of file nurb_xsplit.c.

References bu_free(), BU_LIST_APPEND, bu_malloc(), rt_nurb_calc_oslo(), rt_nurb_free_oslo(), rt_nurb_kvcopy(), rt_nurb_kvextract(), rt_nurb_kvmult(), and rt_nurb_map_oslo().

Here is the call graph for this function:

struct edge_g_cnurb* rt_nurb_c_xsplit ( struct edge_g_cnurb *  crv,
fastf_t  param 
)

rt_nurb_c_xsplit()

Split a NURB curve by inserting a multiple knot and return the result of the two curves.

Algorithm:

Insert a multiple knot of the curve order. A parameter is give for the knot value for which the curve will be split.

Definition at line 226 of file nurb_xsplit.c.

References bu_free(), BU_LIST_APPEND, bu_malloc(), rt_nurb_calc_oslo(), rt_nurb_free_oslo(), rt_nurb_kvextract(), rt_nurb_kvmult(), and rt_nurb_map_oslo().

Referenced by nurb_c_to_bezier(), and rt_clip_cnurb().

Here is the call graph for this function: