62extern BREP_EXPORT
bool ON_NearZero(
double x,
double tolerance = ON_ZERO_TOLERANCE);
65extern BREP_EXPORT ON_BOOL32
surface_GetBoundingBox(
const ON_Surface *surf,
const ON_Interval &u_interval,
const ON_Interval &v_interval,ON_BoundingBox& bbox,ON_BOOL32 bGrowBox);
66extern BREP_EXPORT ON_BOOL32
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 *
81ON_BrepTikz(ON_String &s,
const ON_Brep *brep,
const char *color,
const char *prefix);
92extern BREP_EXPORT ON_Curve *
105extern BREP_EXPORT ON_Surface *
116 m_capacity(1024 * 1024),
121 m_external.
ext_buf =
static_cast<uint8_t *
>(
bu_malloc(m_capacity,
"m_external"));
134 m_capacity = 1024 * 1024;
136 m_external.
ext_buf =
static_cast<uint8_t *
>(
bu_malloc(m_capacity,
"m_external"));
143 uint8_t *
const dest = extend(
sizeof(value));
151 const uint32_t out_value =
htonl(value);
159 long out_value = value;
162 bu_bomb(
"bu_cv_htonsl() failed");
169 bu_cv_htond(dest,
reinterpret_cast<const unsigned char *
>(&value), 1);
181 void write(
const ON_BoundingBox &value)
188 void write(
const ON_Interval &value)
200 uint8_t *extend(std::size_t
size)
202 const std::size_t position = m_external.
ext_nbytes;
210 return &m_external.
ext_buf[position];
214 std::size_t m_capacity;
233 bu_bomb(
"did not deserialize entire stream");
247 return ntohl(result);
256 bu_bomb(
"bu_cv_ntohsl() failed");
286 void read(ON_BoundingBox &value)
305 const uint8_t *get(std::size_t
size)
307 const std::size_t result_position = m_position;
313 return &m_external.
ext_buf[result_position];
317 std::size_t m_position;
326 static void *
operator new(std::size_t
size)
329 throw std::bad_alloc();
335 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)
ON_Curve * interpolateCurve(ON_2dPointArray &samples)
ON_BOOL32 face_GetBoundingBox(const ON_BrepFace &face, ON_BoundingBox &bbox, ON_BOOL32 bGrowBox)
void ON_MinMaxInit(ON_3dPoint *min, ON_3dPoint *max)
void ON_BoundingBox_Plot(FILE *pf, ON_BoundingBox &bb)
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)
int ON_Curve_PolyLine_Approx(ON_Polyline *polyline, const ON_Curve *curve, double tol)
ON_NurbsCurve * interpolateLocalCubicCurve(const ON_3dPointArray &Q)
ON_BOOL32 surface_EvNormal(const ON_Surface *surf, double s, double t, ON_3dPoint &point, ON_3dVector &normal, int side=0, int *hint=0)
ON_BOOL32 surface_GetBoundingBox(const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, ON_BoundingBox &bbox, ON_BOOL32 bGrowBox)
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.
void bu_bomb(const char *str) _BU_ATTR_ANALYZE_NORETURN _BU_ATTR_NORETURN
#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