BRL-CAD
|
Implementation of edit support for brep. C functions and Cpp functions are provided. More...
Files | |
file | edit.h |
Functions | |
void * | brep_create (void) |
function below are C interface More... | |
int | brep_vertex_create (ON_Brep *brep, ON_3dPoint point) |
function below are C++ interface More... | |
bool | brep_vertex_remove (ON_Brep *brep, int v_id) |
int | brep_curve2d_make_line (ON_Brep *brep, const ON_2dPoint &start, const ON_2dPoint &end) |
bool | brep_curve2d_remove (ON_Brep *brep, int curve_id) |
int | brep_curve_make (ON_Brep *brep, const ON_3dPoint &position) |
int | brep_curve_in (ON_Brep *brep, bool is_rational, int order, int cv_count, std::vector< ON_4dPoint > cv) |
int | brep_curve_interpCrv (ON_Brep *brep, std::vector< ON_3dPoint > points) |
int | brep_curve_copy (ON_Brep *brep, int curve_id) |
bool | brep_curve_remove (ON_Brep *brep, int curve_id) |
bool | brep_curve_move (ON_Brep *brep, int curve_id, const ON_3dVector &point) |
bool | brep_curve_set_cv (ON_Brep *brep, int curve_id, int cv_id, const ON_4dPoint &point) |
bool | brep_curve_reverse (ON_Brep *brep, int curve_id) |
bool | brep_curve_insert_knot (ON_Brep *brep, int curve_id, double knot, int multiplicity) |
bool | brep_curve_trim (ON_Brep *brep, int curve_id, double t0, double t1) |
bool | brep_curve_split (ON_Brep *brep, int curve_id, double t) |
int | brep_curve_join (ON_Brep *brep, int curve_id_1, int curve_id_2) |
int | brep_surface_make (ON_Brep *brep, const ON_3dPoint &position) |
int | brep_surface_extract_vertex (ON_Brep *brep, int surface_id, double u, double v) |
int | brep_surface_extract_curve (ON_Brep *brep, int surface_id, int dir, double t) |
int | brep_surface_interpCrv (ON_Brep *brep, int cv_count_x, int cv_count_y, std::vector< ON_3dPoint > points) |
int | brep_surface_copy (ON_Brep *brep, int surface_id) |
bool | brep_surface_move (ON_Brep *brep, int surface_id, const ON_3dVector &point) |
bool | brep_surface_set_cv (ON_Brep *brep, int surface_id, int cv_id_u, int cv_id_v, const ON_4dPoint &point) |
bool | brep_surface_trim (ON_Brep *brep, int surface_id, int dir, double t0, double t1) |
bool | brep_surface_split (ON_Brep *brep, int surface_id, int dir, double t) |
int | brep_surface_create_ruled (ON_Brep *brep, int curve_id0, int curve_id1) |
int | brep_surface_tensor_product (ON_Brep *brep, int curve_id0, int curve_id1) |
int | brep_surface_revolution (ON_Brep *brep, int curve_id0, ON_3dPoint line_start, ON_3dPoint line_end, double angle=2 *ON_PI) |
bool | brep_surface_remove (ON_Brep *brep, int surface_id) |
int | brep_edge_create (ON_Brep *brep, int from, int to, int curve) |
int | brep_face_create (ON_Brep *brep, int surface) |
bool | brep_face_reverse (ON_Brep *brep, int face) |
int | brep_loop_create (ON_Brep *brep, int face_id) |
int | brep_trim_create (ON_Brep *brep, int loop_id, int edge_id, int orientation, int para_curve_id) |
Implementation of edit support for brep. C functions and Cpp functions are provided.
void* brep_create | ( | void | ) |
function below are C interface
create an empty ON_Brep. return pointer to the ON_Brep object
int brep_vertex_create | ( | ON_Brep * | brep, |
ON_3dPoint | point | ||
) |
function below are C++ interface
create a brep vertex
bool brep_vertex_remove | ( | ON_Brep * | brep, |
int | v_id | ||
) |
remove a brep vertex
int brep_curve2d_make_line | ( | ON_Brep * | brep, |
const ON_2dPoint & | start, | ||
const ON_2dPoint & | end | ||
) |
create a 2D parameter space geometric line return id of the curve2d
bool brep_curve2d_remove | ( | ON_Brep * | brep, |
int | curve_id | ||
) |
remove a curve2d from brep
int brep_curve_make | ( | ON_Brep * | brep, |
const ON_3dPoint & | position | ||
) |
create a nurbs curve using a template. position can be specified if position != NULL return id of the curve
int brep_curve_in | ( | ON_Brep * | brep, |
bool | is_rational, | ||
int | order, | ||
int | cv_count, | ||
std::vector< ON_4dPoint > | cv | ||
) |
create a nurbs curve given detailed information return id of the curve
int brep_curve_interpCrv | ( | ON_Brep * | brep, |
std::vector< ON_3dPoint > | points | ||
) |
create a cubic nurbs curve by interpolating a set of points return id of the curve method: Local cubic interpolation with C1 continuity reference: The NURBS Book (2nd Edition), chapter 9.3.4
int brep_curve_copy | ( | ON_Brep * | brep, |
int | curve_id | ||
) |
copy a curve from brep return id of the new curve
bool brep_curve_remove | ( | ON_Brep * | brep, |
int | curve_id | ||
) |
remove a curve from brep
bool brep_curve_move | ( | ON_Brep * | brep, |
int | curve_id, | ||
const ON_3dVector & | point | ||
) |
move curve along a vector.
bool brep_curve_set_cv | ( | ON_Brep * | brep, |
int | curve_id, | ||
int | cv_id, | ||
const ON_4dPoint & | point | ||
) |
set control vertex of a curve
bool brep_curve_reverse | ( | ON_Brep * | brep, |
int | curve_id | ||
) |
reverse parameterizatrion by negating all knots and reversing the order of the control vertices.
bool brep_curve_insert_knot | ( | ON_Brep * | brep, |
int | curve_id, | ||
double | knot, | ||
int | multiplicity | ||
) |
insert knots into a curve
bool brep_curve_trim | ( | ON_Brep * | brep, |
int | curve_id, | ||
double | t0, | ||
double | t1 | ||
) |
trim a curve using a parameter range
bool brep_curve_split | ( | ON_Brep * | brep, |
int | curve_id, | ||
double | t | ||
) |
split a curve at a parameter. Old curve will be deleted.
int brep_curve_join | ( | ON_Brep * | brep, |
int | curve_id_1, | ||
int | curve_id_2 | ||
) |
join the end of curve_id_1 to the start of curve_id_2. return id of the new curve, delete the two old curves.
int brep_surface_make | ( | ON_Brep * | brep, |
const ON_3dPoint & | position | ||
) |
create a nurbs curve using a template position can be specified if argc == 3 return id of the surface
int brep_surface_extract_vertex | ( | ON_Brep * | brep, |
int | surface_id, | ||
double | u, | ||
double | v | ||
) |
extract a vertex from a surface
int brep_surface_extract_curve | ( | ON_Brep * | brep, |
int | surface_id, | ||
int | dir, | ||
double | t | ||
) |
extract a curve from a surface
int brep_surface_interpCrv | ( | ON_Brep * | brep, |
int | cv_count_x, | ||
int | cv_count_y, | ||
std::vector< ON_3dPoint > | points | ||
) |
create a bicubic nurbs surface by interpolating a set of points return id of the surface method: Global cubic interpolation with C2 continuity reference: The NURBS Book (2nd Edition), chapter 9.2.5
int brep_surface_copy | ( | ON_Brep * | brep, |
int | surface_id | ||
) |
copy a surface from brep return id of the new surface
bool brep_surface_move | ( | ON_Brep * | brep, |
int | surface_id, | ||
const ON_3dVector & | point | ||
) |
move surface to a new position
bool brep_surface_set_cv | ( | ON_Brep * | brep, |
int | surface_id, | ||
int | cv_id_u, | ||
int | cv_id_v, | ||
const ON_4dPoint & | point | ||
) |
set control vertex of a curve
bool brep_surface_trim | ( | ON_Brep * | brep, |
int | surface_id, | ||
int | dir, | ||
double | t0, | ||
double | t1 | ||
) |
trim a surface using a parameter range dir = 0: u direction dir = 1: v direction
bool brep_surface_split | ( | ON_Brep * | brep, |
int | surface_id, | ||
int | dir, | ||
double | t | ||
) |
split a surface at a parameter. Old surface will be deleted.
int brep_surface_create_ruled | ( | ON_Brep * | brep, |
int | curve_id0, | ||
int | curve_id1 | ||
) |
create a ruled surface. The two curves must have the same NURBS form knots. srf(s,t) = (1.0-t)*curveA(s) + t*curveB(s). return: if successful, id of the new surface; otherwise, -1.
int brep_surface_tensor_product | ( | ON_Brep * | brep, |
int | curve_id0, | ||
int | curve_id1 | ||
) |
create a surface by extruding a curve along another curve. return: if successful, id of the new surface; otherwise, -1.
int brep_surface_revolution | ( | ON_Brep * | brep, |
int | curve_id0, | ||
ON_3dPoint | line_start, | ||
ON_3dPoint | line_end, | ||
double | angle = 2 *ON_PI |
||
) |
create a surface by rotating a curve around an axis. return: if successful, id of the new surface; otherwise, -1.
bool brep_surface_remove | ( | ON_Brep * | brep, |
int | surface_id | ||
) |
remove a surface from brep
int brep_edge_create | ( | ON_Brep * | brep, |
int | from, | ||
int | to, | ||
int | curve | ||
) |
create a brep edge
int brep_face_create | ( | ON_Brep * | brep, |
int | surface | ||
) |
create a brep face
bool brep_face_reverse | ( | ON_Brep * | brep, |
int | face | ||
) |
reverse a brep face
int brep_loop_create | ( | ON_Brep * | brep, |
int | face_id | ||
) |
create a brep face loop
int brep_trim_create | ( | ON_Brep * | brep, |
int | loop_id, | ||
int | edge_id, | ||
int | orientation, | ||
int | para_curve_id | ||
) |
create a trim of a loop