BRL-CAD
Loading...
Searching...
No Matches
edit.h File Reference
#include "common.h"
#include <float.h>
#include "vmath.h"
#include "bn/mat.h"
#include "bu/parse.h"
#include "bu/avs.h"
#include "bv/defines.h"
#include "rt/defines.h"
#include "rt/db_internal.h"
Include dependency graph for edit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rt_edit
 
struct  rt_edit_menu_item
 
struct  rt_edit_param_desc
 
struct  rt_edit_cmd_desc
 
struct  rt_edit_opt_desc
 
struct  rt_edit_prim_desc
 
struct  rt_constraint_edit_param_ref
 
struct  rt_constraint_edit_violation
 
struct  rt_constraint_edit_metric
 
struct  rt_constraint_edit_tolerances
 
struct  rt_constraint_edit_op
 
struct  rt_constraint_edit_result
 
struct  rt_constraint_edit_ctx
 

Macros

#define RT_EDIT_DEFAULT   -1
 
#define RT_EDIT_IDLE   0
 
#define RT_EDIT_MAXPARA   20
 
#define RT_EDIT_MAXSTR   5
 
#define RT_EDIT_MAXSTR_LEN   512
 
#define RT_PARAMS_EDIT_TRANS   1
 
#define RT_PARAMS_EDIT_SCALE   2
 
#define RT_PARAMS_EDIT_ROT   3
 
#define RT_PARAMS_EDIT_PICK   5
 
#define RT_MATRIX_EDIT_ROT   6
 
#define RT_MATRIX_EDIT_TRANS_VIEW_XY   7
 
#define RT_MATRIX_EDIT_TRANS_VIEW_X   8
 
#define RT_MATRIX_EDIT_TRANS_VIEW_Y   9
 
#define RT_MATRIX_EDIT_TRANS_MODEL_XYZ   14
 
#define RT_MATRIX_EDIT_SCALE   10
 
#define RT_MATRIX_EDIT_SCALE_X   11
 
#define RT_MATRIX_EDIT_SCALE_Y   12
 
#define RT_MATRIX_EDIT_SCALE_Z   13
 
#define ECMD_CLEAR_CLBKS   0
 
#define ECMD_PRINT_STR   10
 
#define ECMD_PRINT_RESULTS   20
 
#define ECMD_EAXES_POS   30
 
#define ECMD_REPLOT_EDITING_SOLID   40
 
#define ECMD_VIEW_UPDATE   50
 
#define ECMD_VIEW_SET_FLAG   60
 
#define ECMD_MENU_SET   70
 
#define ECMD_MENU_REFRESH   71
 
#define ECMD_GET_FILENAME   80
 
#define RT_EDIT_PARAM_SCALAR   1
 
#define RT_EDIT_PARAM_INTEGER   2
 
#define RT_EDIT_PARAM_BOOLEAN   3
 
#define RT_EDIT_PARAM_POINT   4
 
#define RT_EDIT_PARAM_VECTOR   5
 
#define RT_EDIT_PARAM_STRING   6
 
#define RT_EDIT_PARAM_ENUM   7
 
#define RT_EDIT_PARAM_COLOR   8
 
#define RT_EDIT_PARAM_MATRIX   9
 
#define RT_EDIT_PARAM_NO_LIMIT   (-DBL_MAX)
 

Typedefs

typedef int(* rt_constraint_edit_validate_t) (struct bu_ptbl *violations, const struct rt_db_internal *ip, const struct rt_constraint_edit_ctx *ctx)
 
typedef int(* rt_constraint_edit_project_apply_t) (struct rt_constraint_edit_result *out, struct rt_db_internal *ip, const struct rt_constraint_edit_op *op, const struct rt_constraint_edit_ctx *ctx)
 
typedef fastf_t(* rt_constraint_edit_score_delta_t) (const struct rt_db_internal *before_ip, const struct rt_db_internal *after_ip, const struct rt_constraint_edit_metric *metric)
 

Enumerations

enum  rt_constraint_edit_policy { RT_CONSTRAINT_EDIT_REJECT = 0 , RT_CONSTRAINT_EDIT_WARN_ONLY , RT_CONSTRAINT_EDIT_SNAP , RT_CONSTRAINT_EDIT_SNAP_IF_WITHIN_TOL }
 
enum  rt_constraint_edit_severity { RT_CONSTRAINT_EDIT_INFO = 0 , RT_CONSTRAINT_EDIT_WARN , RT_CONSTRAINT_EDIT_ERROR }
 
enum  rt_constraint_edit_op_kind {
  RT_CONSTRAINT_EDIT_OP_MOVE_POINT = 0 , RT_CONSTRAINT_EDIT_OP_ADD_POINT , RT_CONSTRAINT_EDIT_OP_INSERT_POINT , RT_CONSTRAINT_EDIT_OP_DELETE_POINT ,
  RT_CONSTRAINT_EDIT_OP_SET_OD , RT_CONSTRAINT_EDIT_OP_SET_ID , RT_CONSTRAINT_EDIT_OP_SET_BEND , RT_CONSTRAINT_EDIT_OP_SCALE_OD ,
  RT_CONSTRAINT_EDIT_OP_SCALE_ID , RT_CONSTRAINT_EDIT_OP_SCALE_BEND
}
 

Functions

struct rt_editrt_edit_create (struct db_full_path *dfp, struct db_i *dbip, struct bn_tol *, struct bview *v)
 
void rt_edit_destroy (struct rt_edit *s)
 
void rt_edit_reset (struct rt_edit *s)
 
int rt_edit_reinit (struct rt_edit *s, struct db_full_path *dfp, struct db_i *dbip, struct bn_tol *tol, struct bview *v)
 
int rt_edit_set_opt (struct rt_edit *s, const char *key, const char *val)
 
const charrt_edit_get_opt (struct rt_edit *s, const char *key)
 
void rt_edit_set_str (struct rt_edit *s, int index, const char *str)
 
struct rt_edit_maprt_edit_map_create (void)
 
void rt_edit_map_destroy (struct rt_edit_map *)
 
int rt_edit_map_clbk_set (struct rt_edit_map *em, int ed_cmd, int mode, bu_clbk_t f, void *d)
 
int rt_edit_map_clbk_get (bu_clbk_t *f, void **d, struct rt_edit_map *em, int ed_cmd, int mode)
 
int rt_edit_map_clear (struct rt_edit_map *m)
 
int rt_edit_map_copy (struct rt_edit_map *om, struct rt_edit_map *im)
 
void rt_get_solid_keypoint (struct rt_edit *s, point_t *pt, const char **strp, fastf_t *mat)
 
void rt_edit_set_edflag (struct rt_edit *s, int edflag)
 
int rt_edit_knob_cmd_process (struct rt_edit *s, vect_t *rvec, int *do_rot, vect_t *tvec, int *do_tran, int *do_sca, struct bview *v, const char *cmd, fastf_t f, char origin, int incr_flag, void *u_data)
 
void rt_knob_edit_rot (struct rt_edit *s, char coords, char rotate_about, int matrix_edit, mat_t newrot)
 
void rt_knob_edit_tran (struct rt_edit *s, char coords, int matrix_edit, const vect_t tvec)
 
void rt_knob_edit_sca (struct rt_edit *s, int matrix_edit)
 
void rt_edit_process (struct rt_edit *s)
 
void rt_edit_snap_point (point2d_t pt, const struct rt_edit *s)
 
int rt_edit_checkpoint (struct rt_edit *s)
 
int rt_edit_revert (struct rt_edit *s)
 
int rt_edit_prim_desc_to_json (struct bu_vls *out, const struct rt_edit_prim_desc *desc)
 
int rt_edit_type_to_json (struct bu_vls *out, int prim_type_id)
 
void rt_constraint_edit_violation_init (struct rt_constraint_edit_violation *v)
 
void rt_constraint_edit_violation_free (struct rt_constraint_edit_violation *v)
 
void rt_constraint_edit_result_init (struct rt_constraint_edit_result *r)
 
void rt_constraint_edit_result_clear (struct rt_constraint_edit_result *r)
 
void rt_constraint_edit_result_free (struct rt_constraint_edit_result *r)
 

Detailed Description

NOTE!!! This API is a work in progress as we migrate and consolidate editing code from MGED, libged and other codes to a unified common implementation in LIBRT. Until this notice is removed, there are NO guarantees of API stability with this code!

Design notes:

Aside from the X/Y/Z-only scale operations, the "generic" operations for both sed and oed seem to differ primarily in that the former update the wireframe and primitive parameters immediately, and the latter manipulate only the matrix until the final step. In the oed case, the altered primitive wireframes are handled by using the working matrix to distort the existing draw solids.

It feels like there should be some sort of consolidation possible here - in the case where an operation (sed or oed) doesn't need a new wireframe, reusing an existing one is a sensible approach. For operations on large combs, which may involve thousands of large wireframes, reuse is key. Rather than have two "modes", what we should do instead is have the edit operations themselves determine if a new wireframe is needed. If not, then no matter what the op is we should try to reuse an existing wireframe (if one is available from the app) and only generate one if the app does not have the one we need available. That may allow us to completely eliminate the distinction between sed and oed, and treat comb edits like any other primitive edits by using functab methods (semi-related is the attempt to make a comb tess method in d1dc6a4fae8).

Such changes would involve a significant update to the MGED drawing logic, which uses a very simple UP/DOWN flag trick to turn existing solid wireframes into the edit wireframes (and comes with some significant limitations as well). What we really need is a way for a scene obj to reference another scene obj and override specific values, so we can point to an existing scene obj and use it for edit drawing without having to do anything to the original obj except flagging it as involved (so the main update pass knows to skip drawing it.) Commit de2c0da2d4a has a bit of what would be needed for that to work, but there's a lot more to think about both in the original and new draw cycles. To properly have the edit drawing independent of other uses of geometry in a scene while still enabling vlist reuse (which the new drawing path isn't really doing properly) we may need to have all comb instances define themselves in a scene as an object that references another scene object which isn't drawn but holds the data defining the vlist. Then the instance obj would just hold the matrix and any override info for color, etc. Need to check how MGED is handling comb instances now, the new drawing layer I think is just creating a new bv_scene_obj for each instance with its own vlist...

Definition in file edit.h.

Macro Definition Documentation

◆ RT_EDIT_DEFAULT

#define RT_EDIT_DEFAULT   -1

Definition at line 87 of file edit.h.

◆ RT_EDIT_IDLE

#define RT_EDIT_IDLE   0

Definition at line 88 of file edit.h.

◆ RT_EDIT_MAXPARA

#define RT_EDIT_MAXPARA   20

Maximum number of parameters that can be supplied via e_para in a single rt_edit operation. This must be large enough to hold all parameters for the most complex single command (currently ECMD_SKETCH_APPEND_BEZIER, which needs one slot per control-point index; degree 15 → 16 indices).

Definition at line 99 of file edit.h.

◆ RT_EDIT_MAXSTR

#define RT_EDIT_MAXSTR   5

Definition at line 103 of file edit.h.

◆ RT_EDIT_MAXSTR_LEN

#define RT_EDIT_MAXSTR_LEN   512

Definition at line 104 of file edit.h.

◆ RT_PARAMS_EDIT_TRANS

#define RT_PARAMS_EDIT_TRANS   1

Definition at line 114 of file edit.h.

◆ RT_PARAMS_EDIT_SCALE

#define RT_PARAMS_EDIT_SCALE   2

Definition at line 115 of file edit.h.

◆ RT_PARAMS_EDIT_ROT

#define RT_PARAMS_EDIT_ROT   3

Definition at line 116 of file edit.h.

◆ RT_PARAMS_EDIT_PICK

#define RT_PARAMS_EDIT_PICK   5

Definition at line 127 of file edit.h.

◆ RT_MATRIX_EDIT_ROT

#define RT_MATRIX_EDIT_ROT   6

Definition at line 141 of file edit.h.

◆ RT_MATRIX_EDIT_TRANS_VIEW_XY

#define RT_MATRIX_EDIT_TRANS_VIEW_XY   7

Definition at line 153 of file edit.h.

◆ RT_MATRIX_EDIT_TRANS_VIEW_X

#define RT_MATRIX_EDIT_TRANS_VIEW_X   8

Definition at line 154 of file edit.h.

◆ RT_MATRIX_EDIT_TRANS_VIEW_Y

#define RT_MATRIX_EDIT_TRANS_VIEW_Y   9

Definition at line 155 of file edit.h.

◆ RT_MATRIX_EDIT_TRANS_MODEL_XYZ

#define RT_MATRIX_EDIT_TRANS_MODEL_XYZ   14

Definition at line 163 of file edit.h.

◆ RT_MATRIX_EDIT_SCALE

#define RT_MATRIX_EDIT_SCALE   10

Definition at line 178 of file edit.h.

◆ RT_MATRIX_EDIT_SCALE_X

#define RT_MATRIX_EDIT_SCALE_X   11

Definition at line 179 of file edit.h.

◆ RT_MATRIX_EDIT_SCALE_Y

#define RT_MATRIX_EDIT_SCALE_Y   12

Definition at line 180 of file edit.h.

◆ RT_MATRIX_EDIT_SCALE_Z

#define RT_MATRIX_EDIT_SCALE_Z   13

Definition at line 181 of file edit.h.

◆ ECMD_CLEAR_CLBKS

#define ECMD_CLEAR_CLBKS   0

Definition at line 437 of file edit.h.

◆ ECMD_PRINT_STR

#define ECMD_PRINT_STR   10

Definition at line 438 of file edit.h.

◆ ECMD_PRINT_RESULTS

#define ECMD_PRINT_RESULTS   20

Definition at line 439 of file edit.h.

◆ ECMD_EAXES_POS

#define ECMD_EAXES_POS   30

Definition at line 440 of file edit.h.

◆ ECMD_REPLOT_EDITING_SOLID

#define ECMD_REPLOT_EDITING_SOLID   40

Definition at line 441 of file edit.h.

◆ ECMD_VIEW_UPDATE

#define ECMD_VIEW_UPDATE   50

Definition at line 442 of file edit.h.

◆ ECMD_VIEW_SET_FLAG

#define ECMD_VIEW_SET_FLAG   60

Definition at line 443 of file edit.h.

◆ ECMD_MENU_SET

#define ECMD_MENU_SET   70

Definition at line 444 of file edit.h.

◆ ECMD_MENU_REFRESH

#define ECMD_MENU_REFRESH   71

Definition at line 445 of file edit.h.

◆ ECMD_GET_FILENAME

#define ECMD_GET_FILENAME   80

Definition at line 446 of file edit.h.

◆ RT_EDIT_PARAM_SCALAR

#define RT_EDIT_PARAM_SCALAR   1

Parameter type codes for struct rt_edit_param_desc single fastf_t; QDoubleSpinBox / QSlider

Definition at line 560 of file edit.h.

◆ RT_EDIT_PARAM_INTEGER

#define RT_EDIT_PARAM_INTEGER   2

truncated fastf_t; QSpinBox

Definition at line 561 of file edit.h.

◆ RT_EDIT_PARAM_BOOLEAN

#define RT_EDIT_PARAM_BOOLEAN   3

!NEAR_ZERO(val); QCheckBox

Definition at line 562 of file edit.h.

◆ RT_EDIT_PARAM_POINT

#define RT_EDIT_PARAM_POINT   4

point_t (3 fastf_t); 3x QDoubleSpinBox

Definition at line 563 of file edit.h.

◆ RT_EDIT_PARAM_VECTOR

#define RT_EDIT_PARAM_VECTOR   5

vect_t (3 fastf_t); 3x QDoubleSpinBox

Definition at line 564 of file edit.h.

◆ RT_EDIT_PARAM_STRING

#define RT_EDIT_PARAM_STRING   6

NUL-terminated; QLineEdit

Definition at line 565 of file edit.h.

◆ RT_EDIT_PARAM_ENUM

#define RT_EDIT_PARAM_ENUM   7

integer choice; QComboBox

Definition at line 566 of file edit.h.

◆ RT_EDIT_PARAM_COLOR

#define RT_EDIT_PARAM_COLOR   8

RGB triple as three fastf_t (0-255) in e_para[index..index+2]; QColorDialog button

Definition at line 568 of file edit.h.

◆ RT_EDIT_PARAM_MATRIX

#define RT_EDIT_PARAM_MATRIX   9

4x4 row-major in e_para[0..15]; matrix widget

Definition at line 569 of file edit.h.

◆ RT_EDIT_PARAM_NO_LIMIT

#define RT_EDIT_PARAM_NO_LIMIT   (-DBL_MAX)

Sentinel for "no range constraint" on a parameter.

Definition at line 572 of file edit.h.

Typedef Documentation

◆ rt_constraint_edit_validate_t

typedef int(* rt_constraint_edit_validate_t) (struct bu_ptbl *violations, const struct rt_db_internal *ip, const struct rt_constraint_edit_ctx *ctx)

Definition at line 753 of file edit.h.

◆ rt_constraint_edit_project_apply_t

typedef int(* rt_constraint_edit_project_apply_t) (struct rt_constraint_edit_result *out, struct rt_db_internal *ip, const struct rt_constraint_edit_op *op, const struct rt_constraint_edit_ctx *ctx)

Definition at line 758 of file edit.h.

◆ rt_constraint_edit_score_delta_t

typedef fastf_t(* rt_constraint_edit_score_delta_t) (const struct rt_db_internal *before_ip, const struct rt_db_internal *after_ip, const struct rt_constraint_edit_metric *metric)

Definition at line 764 of file edit.h.

Enumeration Type Documentation

◆ rt_constraint_edit_policy

Enumerator
RT_CONSTRAINT_EDIT_REJECT 
RT_CONSTRAINT_EDIT_WARN_ONLY 
RT_CONSTRAINT_EDIT_SNAP 
RT_CONSTRAINT_EDIT_SNAP_IF_WITHIN_TOL 

Definition at line 671 of file edit.h.

◆ rt_constraint_edit_severity

Enumerator
RT_CONSTRAINT_EDIT_INFO 
RT_CONSTRAINT_EDIT_WARN 
RT_CONSTRAINT_EDIT_ERROR 

Definition at line 678 of file edit.h.

◆ rt_constraint_edit_op_kind

Enumerator
RT_CONSTRAINT_EDIT_OP_MOVE_POINT 
RT_CONSTRAINT_EDIT_OP_ADD_POINT 
RT_CONSTRAINT_EDIT_OP_INSERT_POINT 
RT_CONSTRAINT_EDIT_OP_DELETE_POINT 
RT_CONSTRAINT_EDIT_OP_SET_OD 
RT_CONSTRAINT_EDIT_OP_SET_ID 
RT_CONSTRAINT_EDIT_OP_SET_BEND 
RT_CONSTRAINT_EDIT_OP_SCALE_OD 
RT_CONSTRAINT_EDIT_OP_SCALE_ID 
RT_CONSTRAINT_EDIT_OP_SCALE_BEND 

Definition at line 684 of file edit.h.

Function Documentation

◆ rt_edit_create()

struct rt_edit * rt_edit_create ( struct db_full_path dfp,
struct db_i dbip,
struct bn_tol ,
struct bview v 
)
extern

Create and initialize an rt_edit struct

◆ rt_edit_destroy()

void rt_edit_destroy ( struct rt_edit s)
extern

Free a rt_edit struct

◆ rt_edit_reset()

void rt_edit_reset ( struct rt_edit s)
extern

Reset an rt_edit back to an idle/empty state without freeing the struct itself. This frees any loaded primitive data (es_int, ipe_ptr, es_ckpt, comb_insts) and resets all edit-state fields to their initial values, but leaves the rt_edit struct, its edit_map, and its log_str allocated and usable. The pointer returned by rt_edit_create() remains valid after this call and can be reloaded with a new solid by calling rt_edit_reinit().

Use this instead of rt_edit_destroy()+rt_edit_create() when a single persistent rt_edit should be kept alive across multiple editing sessions (e.g. in MGED where MEDIT(s) must never be NULL).

◆ rt_edit_reinit()

int rt_edit_reinit ( struct rt_edit s,
struct db_full_path dfp,
struct db_i dbip,
struct bn_tol tol,
struct bview v 
)
extern

Reload an existing (reset or newly created) rt_edit with solid data from dfp inside database dbip. Equivalent to rt_edit_create() but reuses the already-allocated struct rather than allocating a new one.

Calls rt_edit_reset() first to discard any previous solid data, then imports the solid, sets up the primitive-specific private state, and computes the path matrix and initial keypoint.

Returns
BRLCAD_OK on success, BRLCAD_ERROR if the solid import fails.

◆ rt_edit_set_opt()

int rt_edit_set_opt ( struct rt_edit s,
const char key,
const char val 
)
extern

Set a dynamic option for this editing session. These options are available to primitive-specific editing logic.

◆ rt_edit_get_opt()

const char * rt_edit_get_opt ( struct rt_edit s,
const char key 
)
extern

Retrieve a dynamic option for this editing session. Returns NULL if the option is not set.

◆ rt_edit_set_str()

void rt_edit_set_str ( struct rt_edit s,
int  index,
const char str 
)
extern

Set a string parameter in the edit struct's e_str[] array.

Parameters
sThe edit struct to update.
indexSlot index (0 .. RT_EDIT_MAXSTR-1); must equal rt_edit_param_desc::index for the STRING parameter.
strNUL-terminated string to copy (truncated to RT_EDIT_MAXSTR_LEN-1 bytes).

◆ rt_edit_map_create()

struct rt_edit_map * rt_edit_map_create ( void  )
extern

◆ rt_edit_map_destroy()

void rt_edit_map_destroy ( struct rt_edit_map )
extern

◆ rt_edit_map_clbk_set()

int rt_edit_map_clbk_set ( struct rt_edit_map em,
int  ed_cmd,
int  mode,
bu_clbk_t  f,
void d 
)
extern

◆ rt_edit_map_clbk_get()

int rt_edit_map_clbk_get ( bu_clbk_t f,
void **  d,
struct rt_edit_map em,
int  ed_cmd,
int  mode 
)
extern

◆ rt_edit_map_clear()

int rt_edit_map_clear ( struct rt_edit_map m)
extern

◆ rt_edit_map_copy()

int rt_edit_map_copy ( struct rt_edit_map om,
struct rt_edit_map im 
)
extern

◆ rt_get_solid_keypoint()

void rt_get_solid_keypoint ( struct rt_edit s,
point_t pt,
const char **  strp,
fastf_t mat 
)
extern

◆ rt_edit_set_edflag()

void rt_edit_set_edflag ( struct rt_edit s,
int  edflag 
)
extern

◆ rt_edit_knob_cmd_process()

int rt_edit_knob_cmd_process ( struct rt_edit s,
vect_t rvec,
int *  do_rot,
vect_t tvec,
int *  do_tran,
int *  do_sca,
struct bview v,
const char cmd,
fastf_t  f,
char  origin,
int  incr_flag,
void u_data 
)
extern

◆ rt_knob_edit_rot()

void rt_knob_edit_rot ( struct rt_edit s,
char  coords,
char  rotate_about,
int  matrix_edit,
mat_t  newrot 
)
extern

◆ rt_knob_edit_tran()

void rt_knob_edit_tran ( struct rt_edit s,
char  coords,
int  matrix_edit,
const vect_t  tvec 
)
extern

◆ rt_knob_edit_sca()

void rt_knob_edit_sca ( struct rt_edit s,
int  matrix_edit 
)
extern

◆ rt_edit_process()

void rt_edit_process ( struct rt_edit s)
extern

◆ rt_edit_snap_point()

void rt_edit_snap_point ( point2d_t  pt,
const struct rt_edit s 
)
extern

Snap a 2-D UV point to the grid defined in s->snap.

If s->snap.enabled is zero the point is returned unchanged. Otherwise each component is rounded to the nearest multiple of s->snap.spacing.

Parameters
[in,out]pt2-D UV coordinate to snap (in model/base units).
[in]srt_edit struct carrying snap configuration.

◆ rt_edit_checkpoint()

int rt_edit_checkpoint ( struct rt_edit s)
extern

Save a snapshot of the current primitive parameters so they can be restored later with rt_edit_revert().

The snapshot is stored inside the rt_edit struct. Calling this function again overwrites any previous snapshot (single-level undo).

Returns
BRLCAD_OK on success, BRLCAD_ERROR if the export failed.

◆ rt_edit_revert()

int rt_edit_revert ( struct rt_edit s)
extern

Restore primitive parameters from the snapshot saved by rt_edit_checkpoint().

If no snapshot has been saved (or the last snapshot was already consumed) this function logs a message and returns BRLCAD_ERROR.

Returns
BRLCAD_OK on success, BRLCAD_ERROR otherwise.

◆ rt_edit_prim_desc_to_json()

int rt_edit_prim_desc_to_json ( struct bu_vls out,
const struct rt_edit_prim_desc desc 
)
extern

Serialise a primitive edit descriptor to a JSON string appended to out. The caller is responsible for bu_vls_init / bu_vls_free. Returns BRLCAD_OK on success, BRLCAD_ERROR on error.

◆ rt_edit_type_to_json()

int rt_edit_type_to_json ( struct bu_vls out,
int  prim_type_id 
)
extern

Convenience wrapper: look up the EDOBJ entry for prim_type_id and call rt_edit_prim_desc_to_json() on its ft_edit_desc() result. Returns BRLCAD_OK on success, BRLCAD_ERROR if the primitive has no descriptor or the type id is out of range.

◆ rt_constraint_edit_violation_init()

void rt_constraint_edit_violation_init ( struct rt_constraint_edit_violation v)
extern

◆ rt_constraint_edit_violation_free()

void rt_constraint_edit_violation_free ( struct rt_constraint_edit_violation v)
extern

◆ rt_constraint_edit_result_init()

void rt_constraint_edit_result_init ( struct rt_constraint_edit_result r)
extern

◆ rt_constraint_edit_result_clear()

void rt_constraint_edit_result_clear ( struct rt_constraint_edit_result r)
extern

◆ rt_constraint_edit_result_free()

void rt_constraint_edit_result_free ( struct rt_constraint_edit_result r)
extern