BRL-CAD
opennurbs_ext.cpp File Reference
#include "common.h"
#include "bio.h"
#include <assert.h>
#include <vector>
#include "vmath.h"
#include "bu/log.h"
#include "bu/malloc.h"
#include "bu/parallel.h"
#include "brep.h"
#include "libbrep_brep_tools.h"
#include "dvec.h"
Include dependency graph for opennurbs_ext.cpp:

Go to the source code of this file.

Data Structures

struct  _gcp_data
 

Namespaces

 brlcad
 

Macros

#define RANGE_HI   0.55
 
#define RANGE_LO   0.45
 
#define UNIVERSAL_SAMPLE_COUNT   1001
 
#define BBOX_GROW   0.0
 
#define BBOX_GROW_3D   0.1
 grows 3D BBox along each axis by this factor More...
 
#define TOL   0.000001
 arbitrary calculation tolerance (need to try VDIVIDE_TOL or VUNITIZE_TOL to tighten the bounds) More...
 
#define TOL2   0.00001
 another arbitrary calculation tolerance (need to try VDIVIDE_TOL or VUNITIZE_TOL to tighten the bounds) More...
 

Typedefs

typedef struct brlcad::_gcp_data GCPData
 

Functions

void brep_get_plane_ray (ON_Ray &r, plane_ray &pr)
 
void brep_r (const ON_Surface *surf, plane_ray &pr, pt2d_t uv, ON_3dPoint &pt, ON_3dVector &su, ON_3dVector &sv, pt2d_t R)
 
void brep_newton_iterate (plane_ray &pr, pt2d_t R, ON_3dVector &su, ON_3dVector &sv, pt2d_t uv, pt2d_t out_uv)
 
void distribute (const int count, const ON_3dVector *v, double x[], double y[], double z[])
 
int brep_getSurfacePoint (const ON_3dPoint &pt, ON_2dPoint &uv, BBNode *node)
 
BBNode * initialBBox (CurveTree *ctree, const ON_Surface *surf, const ON_BrepFace *face, const ON_Interval &u, const ON_Interval &v)
 
bool hasSplit (const ON_Surface *surf, const int dir, const ON_Interval &interval, double &split)
 
bool gcp_gradient (pt2d_t out_grad, GCPData &data, pt2d_t uv)
 
bool gcp_newton_iteration (pt2d_t out_uv, GCPData &data, pt2d_t grad, pt2d_t in_uv)
 
bool get_closest_point (ON_2dPoint &outpt, ON_BrepFace *face, const ON_3dPoint &point, SurfaceTree *tree, double tolerance)
 
bool sortX (BRNode *first, BRNode *second)
 
bool sortY (BRNode *first, BRNode *second)
 

Detailed Description

Implementation of routines openNURBS left out.

Definition in file opennurbs_ext.cpp.

Macro Definition Documentation

#define RANGE_HI   0.55

Definition at line 41 of file opennurbs_ext.cpp.

#define RANGE_LO   0.45

Definition at line 42 of file opennurbs_ext.cpp.

#define UNIVERSAL_SAMPLE_COUNT   1001

Definition at line 43 of file opennurbs_ext.cpp.

#define BBOX_GROW   0.0

Definition at line 45 of file opennurbs_ext.cpp.

#define BBOX_GROW_3D   0.1

grows 3D BBox along each axis by this factor

Definition at line 48 of file opennurbs_ext.cpp.

#define TOL   0.000001

arbitrary calculation tolerance (need to try VDIVIDE_TOL or VUNITIZE_TOL to tighten the bounds)

Definition at line 51 of file opennurbs_ext.cpp.

#define TOL2   0.00001

another arbitrary calculation tolerance (need to try VDIVIDE_TOL or VUNITIZE_TOL to tighten the bounds)

Definition at line 54 of file opennurbs_ext.cpp.

Function Documentation

void brep_get_plane_ray ( ON_Ray &  r,
plane_ray &  pr 
)

Definition at line 59 of file opennurbs_ext.cpp.

References MAX_FASTF.

Referenced by brlcad::brep_getSurfacePoint(), and toUV().

void brep_r ( const ON_Surface *  surf,
plane_ray &  pr,
pt2d_t  uv,
ON_3dPoint &  pt,
ON_3dVector &  su,
ON_3dVector &  sv,
pt2d_t  R 
)

Definition at line 84 of file opennurbs_ext.cpp.

Referenced by brlcad::brep_getSurfacePoint(), and toUV().

void brep_newton_iterate ( plane_ray &  pr,
pt2d_t  R,
ON_3dVector &  su,
ON_3dVector &  sv,
pt2d_t  uv,
pt2d_t  out_uv 
)

Definition at line 97 of file opennurbs_ext.cpp.

Referenced by brlcad::brep_getSurfacePoint(), and toUV().