Showing results for 
Search instead for 
Do you mean 
Reply

how can i draw clamped b-spline curves with control points using parasolid API functions ?

Hi everyone,

 

I am using parasolid API functions to draw some clamped B-spline curves with control points. to make it clamp Im using non uniform knot type so  I can define multiple knot values to make it clamp, but with that Im getting bad knot error;

following is my code 

double vertex_2[12] = {0, 2, 0, 1, 3, 0, 2, 2, 0, 3, 3, 0};

double knot_2_nu[7] = {0, 0, 1.75, 2, 2.5, 3.75, 4.5};
int knot_mult_2[7] = {1, 1, 1, 1, 1, 1, 1};

 

bcurve_sf.degree = 2;
bcurve_sf.n_vertices = 4;
bcurve_sf.vertex_dim = 3;
bcurve_sf.is_rational = PK_LOGICAL_false;
bcurve_sf.vertex = vertex_2_nu;
bcurve_sf.form = PK_BCURVE_form_unset_c;
bcurve_sf.n_knots = 7;
bcurve_sf.knot_mult = knot_mult_2;
bcurve_sf.knot = knot_2_nu;
bcurve_sf.knot_type = PK_knot_non_uniform_c;
bcurve_sf.is_periodic = PK_LOGICAL_false;
bcurve_sf.is_closed = PK_LOGICAL_false;
bcurve_sf.self_intersecting = PK_LOGICAL_false;


PK_BCURVE_create(&bcurve_sf, &bcurve);