62extern BREP_EXPORT
bool ON_NearZero(
double x,
double tolerance = ON_ZERO_TOLERANCE);
65extern BREP_EXPORT
bool surface_GetBoundingBox(
const ON_Surface *surf,
const ON_Interval &u_interval,
const ON_Interval &v_interval,ON_BoundingBox& bbox,
bool bGrowBox);
66extern BREP_EXPORT
bool surface_EvNormal(
const ON_Surface *surf,
double s,
double t,ON_3dPoint& point,ON_3dVector& normal,
int side=0,
int* hint=0);
69extern BREP_EXPORT ON_NurbsCurve *
75extern BREP_EXPORT ON_Curve*
78 const ON_Curve& curve_2d,
79 const ON_Interval* curve_2d_subdomain
83extern BREP_EXPORT
const char *
91ON_BrepTikz(ON_String &s,
const ON_Brep *brep,
const char *color,
const char *prefix);
102extern BREP_EXPORT ON_Curve *
115extern BREP_EXPORT ON_Surface *
126 m_capacity(1024 * 1024),
131 m_external.
ext_buf =
static_cast<uint8_t *
>(
bu_malloc(m_capacity,
"m_external"));
144 m_capacity = 1024 * 1024;
146 m_external.
ext_buf =
static_cast<uint8_t *
>(
bu_malloc(m_capacity,
"m_external"));
153 uint8_t *
const dest = extend(
sizeof(value));
161 const uint32_t out_value =
htonl(value);
169 long out_value = value;
172 bu_bomb(
"bu_cv_htonsl() failed");
179 bu_cv_htond(dest,
reinterpret_cast<const unsigned char *
>(&value), 1);
191 void write(
const ON_BoundingBox &value)
198 void write(
const ON_Interval &value)
210 uint8_t *extend(std::size_t
size)
212 const std::size_t position = m_external.
ext_nbytes;
220 return &m_external.
ext_buf[position];
224 std::size_t m_capacity;
243 bu_bomb(
"did not deserialize entire stream");
257 return ntohl(result);
266 bu_bomb(
"bu_cv_ntohsl() failed");
296 void read(ON_BoundingBox &value)
315 const uint8_t *get(std::size_t
size)
317 const std::size_t result_position = m_position;
323 return &m_external.
ext_buf[result_position];
327 std::size_t m_position;
336 static void *
operator new(std::size_t
size)
339 throw std::bad_alloc();
345 static void operator delete(
void *pointer)
ON_3dPoint ON_LinePlaneIntersect(ON_Line &line, ON_Plane &plane)
int brep_translate_scv(ON_Brep *brep, int surface_index, int i, int j, fastf_t dx, fastf_t dy, fastf_t dz)
void set_key(struct bu_vls *key, int k, int *karray)
bool surface_EvNormal(const ON_Surface *surf, double s, double t, ON_3dPoint &point, ON_3dVector &normal, int side=0, int *hint=0)
ON_Curve * interpolateCurve(ON_2dPointArray &samples)
void ON_MinMaxInit(ON_3dPoint *min, ON_3dPoint *max)
void ON_BoundingBox_Plot(FILE *pf, ON_BoundingBox &bb)
const char * ON_ObjectTypeToString(ON::object_type t)
bool face_GetBoundingBox(const ON_BrepFace &face, ON_BoundingBox &bbox, bool bGrowBox)
bool ON_NearZero(double x, double tolerance=ON_ZERO_TOLERANCE)
void ON_Plane_Plot(FILE *pf, ON_Plane &plane)
int ON_BrepTikz(ON_String &s, const ON_Brep *brep, const char *color, const char *prefix)
ON_Surface * sub_surface(const ON_Surface *in, int dir, double a, double b)
ON_Curve * sub_curve(const ON_Curve *in, double a, double b)
bool surface_GetBoundingBox(const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, ON_BoundingBox &bbox, bool bGrowBox)
ON_Curve * ON_Surface_Pushup(const ON_Surface *s, const ON_Curve &curve_2d, const ON_Interval *curve_2d_subdomain)
int ON_Curve_PolyLine_Approx(ON_Polyline *polyline, const ON_Curve *curve, double tol)
ON_NurbsCurve * interpolateLocalCubicCurve(const ON_3dPointArray &Q)
void read(ON_Interval &value)
void read(ON_3dPoint &value)
void read(ON_BoundingBox &value)
Deserializer(const bu_external &external)
void read(ON_3dVector &value)
void write(const ON_BoundingBox &value)
void write(const ON_Interval &value)
void write_int32(int32_t value)
void write_uint8(uint8_t value)
void write_uint32(uint32_t value)
void write(const ON_3dPoint &value)
void write_double(double value)
Header file for the BRL-CAD common definitions.
NORETURN void bu_bomb(const char *str)
#define SIZEOF_NETWORK_DOUBLE
#define SIZEOF_NETWORK_LONG
void bu_cv_htond(unsigned char *out, const unsigned char *in, size_t count)
void bu_cv_ntohd(unsigned char *out, const unsigned char *in, size_t count)
size_t bu_cv_ntohsl(signed long int *, size_t, void *, size_t)
size_t bu_cv_htonsl(void *, size_t, long *, size_t)
void * bu_realloc(void *ptr, size_t siz, const char *str)
void * bu_malloc(size_t siz, const char *str)
void * bu_heap_get(size_t sz)
void bu_heap_put(void *ptr, size_t sz)
#define BU_EXTERNAL_INIT(_p)
void bu_free_external(struct bu_external *ep)
#define BU_CK_EXTERNAL(_p)
void float float int int int int float * size
void int char int int double * min
void int char int int double double * dx
#define UNLIKELY(expression)
double fastf_t
fastest 64-bit (or larger) floating point type