BRL-CAD
brep.h
Go to the documentation of this file.
1/* B R E P . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup rt_brep */
21/** @{ */
22/** @file rt/primitives/brep.h */
23
24#ifndef RT_PRIMITIVES_BREP_H
25#define RT_PRIMITIVES_BREP_H
26
27#include "common.h"
28#include "vmath.h"
29#include "bu/list.h"
30#include "bu/vls.h"
31#include "bn/tol.h"
32#include "rt/defines.h"
33
34__BEGIN_DECLS
35
36/* BREP drawing routines */
37RT_EXPORT extern int rt_brep_plot(struct bu_list *vhead,
38 struct rt_db_internal *ip,
39 const struct bg_tess_tol *ttol,
40 const struct bn_tol *tol,
41 const struct bview *info);
42RT_EXPORT extern int rt_brep_plot_poly(struct bu_list *vhead,
43 const struct db_full_path *pathp,
44 struct rt_db_internal *ip,
45 const struct bg_tess_tol *ttol,
46 const struct bn_tol *tol,
47 const struct bview *info);
48/* BREP validity test */
49#define RT_BREP_OPENNURBS 0x1 /**< @brief OpenNURBS tests (default)*/
50#define RT_BREP_UV_PARAM 0x2 /**< @brief sanity checks for UV parameterization bounds */
51#define RT_BREP_EDGE_CRACK 0x4 /**< @brief check for trim geometry at edges that isn't closely aligned */
52RT_EXPORT extern int rt_brep_valid(struct bu_vls *log, struct rt_db_internal *ip, int flags);
53
54/* BREP function to make sure all curve and surface parameterizations range
55 * from either 0 to their 3D length or from 0 to pmax (if pmax is nonzero.)
56 */
57RT_EXPORT extern int rt_brep_normalize(struct rt_db_internal *ip, double pmax);
58
59
60/* Report if the brep is a plate mode object: returns 1 if plate mode, otherwise 0.
61 * (Invalid openNURBS objects are not considered plate mode) */
62RT_EXPORT extern int rt_brep_plate_mode(const struct rt_db_internal *ip);
63
64/* Get plate mode settings if brep is a plate mode object. Note: default
65 * returns are 0 regardless of the object type - use rt_brep_plate_mode to test
66 * if an object is or isn't plate mode*/
67RT_EXPORT extern void rt_brep_plate_mode_getvals(double *pthickness, int *nocos, const struct rt_db_internal *ip);
68
69/** @} */
70
71__END_DECLS
72
73#endif /* RT_PRIMITIVES_BREP_H */
74
75/*
76 * Local Variables:
77 * tab-width: 8
78 * mode: C
79 * indent-tabs-mode: t
80 * c-file-style: "stroustrup"
81 * End:
82 * ex: shiftwidth=4 tabstop=8
83 */
Header file for the BRL-CAD common definitions.
int rt_brep_plate_mode(const struct rt_db_internal *ip)
void rt_brep_plate_mode_getvals(double *pthickness, int *nocos, const struct rt_db_internal *ip)
int rt_brep_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct bg_tess_tol *ttol, const struct bn_tol *tol, const struct bview *info)
int rt_brep_normalize(struct rt_db_internal *ip, double pmax)
int rt_brep_plot_poly(struct bu_list *vhead, const struct db_full_path *pathp, struct rt_db_internal *ip, const struct bg_tess_tol *ttol, const struct bn_tol *tol, const struct bview *info)
int rt_brep_valid(struct bu_vls *log, struct rt_db_internal *ip, int flags)
Definition: tol.h:72
Definition: list.h:131
Definition: vls.h:53
Definition: defines.h:476
fundamental vector, matrix, quaternion math macros