BRL-CAD
Loading...
Searching...
No Matches
Editing Operations for B-Reps

Implementation of edit support for brep. C functions and Cpp functions are provided. More...

Collaboration diagram for Editing Operations for B-Reps:

Files

file  edit.h
 

Functions

voidbrep_create (void)
 function below are C interface
 
int brep_vertex_create (ON_Brep *brep, ON_3dPoint point)
 function below are C++ interface
 
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)
 

Detailed Description

Implementation of edit support for brep. C functions and Cpp functions are provided.

Function Documentation

◆ brep_create()

void * brep_create ( void  )
extern

function below are C interface

create an empty ON_Brep. return pointer to the ON_Brep object

◆ brep_vertex_create()

int brep_vertex_create ( ON_Brep brep,
ON_3dPoint  point 
)
extern

function below are C++ interface

create a brep vertex

◆ brep_vertex_remove()

bool brep_vertex_remove ( ON_Brep brep,
int  v_id 
)
extern

remove a brep vertex

◆ brep_curve2d_make_line()

int brep_curve2d_make_line ( ON_Brep brep,
const ON_2dPoint start,
const ON_2dPoint end 
)
extern

create a 2D parameter space geometric line return id of the curve2d

◆ brep_curve2d_remove()

bool brep_curve2d_remove ( ON_Brep brep,
int  curve_id 
)
extern

remove a curve2d from brep

◆ brep_curve_make()

int brep_curve_make ( ON_Brep brep,
const ON_3dPoint position 
)
extern

create a nurbs curve using a template. position can be specified if position != NULL return id of the curve

◆ brep_curve_in()

int brep_curve_in ( ON_Brep brep,
bool  is_rational,
int  order,
int  cv_count,
std::vector< ON_4dPoint cv 
)
extern

create a nurbs curve given detailed information return id of the curve

◆ brep_curve_interpCrv()

int brep_curve_interpCrv ( ON_Brep brep,
std::vector< ON_3dPoint points 
)
extern

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

◆ brep_curve_copy()

int brep_curve_copy ( ON_Brep brep,
int  curve_id 
)
extern

copy a curve from brep return id of the new curve

◆ brep_curve_remove()

bool brep_curve_remove ( ON_Brep brep,
int  curve_id 
)
extern

remove a curve from brep

Attention
the index of m_C3 is changed after remove!!!

◆ brep_curve_move()

bool brep_curve_move ( ON_Brep brep,
int  curve_id,
const ON_3dVector point 
)
extern

move curve along a vector.

◆ brep_curve_set_cv()

bool brep_curve_set_cv ( ON_Brep brep,
int  curve_id,
int  cv_id,
const ON_4dPoint point 
)
extern

set control vertex of a curve

◆ brep_curve_reverse()

bool brep_curve_reverse ( ON_Brep brep,
int  curve_id 
)
extern

reverse parameterizatrion by negating all knots and reversing the order of the control vertices.

◆ brep_curve_insert_knot()

bool brep_curve_insert_knot ( ON_Brep brep,
int  curve_id,
double  knot,
int  multiplicity 
)
extern

insert knots into a curve

◆ brep_curve_trim()

bool brep_curve_trim ( ON_Brep brep,
int  curve_id,
double  t0,
double  t1 
)
extern

trim a curve using a parameter range

◆ brep_curve_split()

bool brep_curve_split ( ON_Brep brep,
int  curve_id,
double  t 
)
extern

split a curve at a parameter. Old curve will be deleted.

◆ brep_curve_join()

int brep_curve_join ( ON_Brep brep,
int  curve_id_1,
int  curve_id_2 
)
extern

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.

Attention
the index of m_C3 is changed after join!!!

◆ brep_surface_make()

int brep_surface_make ( ON_Brep brep,
const ON_3dPoint position 
)
extern

create a nurbs curve using a template position can be specified if argc == 3 return id of the surface

◆ brep_surface_extract_vertex()

int brep_surface_extract_vertex ( ON_Brep brep,
int  surface_id,
double  u,
double  v 
)
extern

extract a vertex from a surface

◆ brep_surface_extract_curve()

int brep_surface_extract_curve ( ON_Brep brep,
int  surface_id,
int  dir,
double  t 
)
extern

extract a curve from a surface

◆ brep_surface_interpCrv()

int brep_surface_interpCrv ( ON_Brep brep,
int  cv_count_x,
int  cv_count_y,
std::vector< ON_3dPoint points 
)
extern

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

◆ brep_surface_copy()

int brep_surface_copy ( ON_Brep brep,
int  surface_id 
)
extern

copy a surface from brep return id of the new surface

◆ brep_surface_move()

bool brep_surface_move ( ON_Brep brep,
int  surface_id,
const ON_3dVector point 
)
extern

move surface to a new position

◆ brep_surface_set_cv()

bool brep_surface_set_cv ( ON_Brep brep,
int  surface_id,
int  cv_id_u,
int  cv_id_v,
const ON_4dPoint point 
)
extern

set control vertex of a curve

◆ brep_surface_trim()

bool brep_surface_trim ( ON_Brep brep,
int  surface_id,
int  dir,
double  t0,
double  t1 
)
extern

trim a surface using a parameter range dir = 0: u direction dir = 1: v direction

◆ brep_surface_split()

bool brep_surface_split ( ON_Brep brep,
int  surface_id,
int  dir,
double  t 
)
extern

split a surface at a parameter. Old surface will be deleted.

◆ brep_surface_create_ruled()

int brep_surface_create_ruled ( ON_Brep brep,
int  curve_id0,
int  curve_id1 
)
extern

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.

◆ brep_surface_tensor_product()

int brep_surface_tensor_product ( ON_Brep brep,
int  curve_id0,
int  curve_id1 
)
extern

create a surface by extruding a curve along another curve. return: if successful, id of the new surface; otherwise, -1.

◆ brep_surface_revolution()

int brep_surface_revolution ( ON_Brep brep,
int  curve_id0,
ON_3dPoint  line_start,
ON_3dPoint  line_end,
double  angle = 2 *ON_PI 
)
extern

create a surface by rotating a curve around an axis. return: if successful, id of the new surface; otherwise, -1.

◆ brep_surface_remove()

bool brep_surface_remove ( ON_Brep brep,
int  surface_id 
)
extern

remove a surface from brep

Attention
the index of m_S is changed after remove!!!

◆ brep_edge_create()

int brep_edge_create ( ON_Brep brep,
int  from,
int  to,
int  curve 
)
extern

create a brep edge

◆ brep_face_create()

int brep_face_create ( ON_Brep brep,
int  surface 
)
extern

create a brep face

◆ brep_face_reverse()

bool brep_face_reverse ( ON_Brep brep,
int  face 
)
extern

reverse a brep face

◆ brep_loop_create()

int brep_loop_create ( ON_Brep brep,
int  face_id 
)
extern

create a brep face loop

◆ brep_trim_create()

int brep_trim_create ( ON_Brep brep,
int  loop_id,
int  edge_id,
int  orientation,
int  para_curve_id 
)
extern

create a trim of a loop