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

Go to the source code of this file.

Data Structures

class  XEventProxy
 
struct  Triangle
 
struct  PointPair
 
struct  OverlapSegment
 
struct  Overlapevent
 

Macros

#define DEBUG_BREP_INTERSECT   0
 
#define NR_MAX_DEPTH   8
 
#define MAX_PCI_DEPTH   NR_MAX_DEPTH
 
#define MAX_PSI_DEPTH   NR_MAX_DEPTH
 
#define MAX_CCI_DEPTH   NR_MAX_DEPTH
 
#define MAX_CSI_DEPTH   NR_MAX_DEPTH
 
#define MAX_SSI_DEPTH   NR_MAX_DEPTH
 
#define NR_DEFAULT_TOLERANCE   0.001
 
#define PCI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE
 
#define PSI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE
 
#define CCI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE
 
#define CSI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE
 
#define SSI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE
 
#define NR_MAX_ITERATIONS   100
 
#define PCI_MAX_ITERATIONS   NR_MAX_ITERATIONS
 
#define PSI_MAX_ITERATIONS   NR_MAX_ITERATIONS
 
#define CCI_MAX_ITERATIONS   NR_MAX_ITERATIONS
 
#define CSI_MAX_ITERATIONS   NR_MAX_ITERATIONS
 
#define SSI_MAX_ITERATIONS   NR_MAX_ITERATIONS
 
#define CCI_OVERLAP_TEST_POINTS   16
 
#define CSI_OVERLAP_TEST_POINTS   2
 
#define OVERLAPS_LINKED(from, to)
 

Enumerations

enum  { INSIDE_OVERLAP, ON_OVERLAP_BOUNDARY, OUTSIDE_OVERLAP }
 

Functions

ON_Curve * sub_curve (const ON_Curve *in, double a, double b)
 
ON_Surface * sub_surface (const ON_Surface *in, int dir, double a, double b)
 
HIDDEN const ON_Interval check_domain (const ON_Interval *in, const ON_Interval &domain, const char *name)
 
HIDDEN bool build_curve_root (const ON_Curve *curve, const ON_Interval *domain, Subcurve &root)
 
HIDDEN Subcurve * get_curve_root (const ON_Curve *curve, const ON_Interval *domain)
 
HIDDEN bool build_surface_root (const ON_Surface *surf, const ON_Interval *u_domain, const ON_Interval *v_domain, Subsurface &root)
 
HIDDEN Subsurface * get_surface_root (const ON_Surface *surf, const ON_Interval *u_domain, const ON_Interval *v_domain)
 
HIDDEN ON_Curve * curve_fitting (ON_Curve *in, double fitting_tol=ON_ZERO_TOLERANCE, bool delete_curve=true)
 
bool ON_Intersect (const ON_3dPoint &pointA, const ON_3dPoint &pointB, ON_ClassArray< ON_PX_EVENT > &x, double tol)
 
HIDDEN bool newton_pci (double &t, const ON_3dPoint &pointA, const ON_Curve &curveB, double tol)
 
bool ON_Intersect (const ON_3dPoint &pointA, const ON_Curve &curveB, ON_ClassArray< ON_PX_EVENT > &x, double tol, const ON_Interval *curveB_domain, Subcurve *treeB)
 
HIDDEN bool newton_psi (double &u, double &v, const ON_3dPoint &pointA, const ON_Surface &surfB, double tol)
 
bool ON_Intersect (const ON_3dPoint &pointA, const ON_Surface &surfaceB, ON_ClassArray< ON_PX_EVENT > &x, double tol, const ON_Interval *surfaceB_udomain, const ON_Interval *surfaceB_vdomain, Subsurface *treeB)
 
HIDDEN void newton_cci (double &t_a, double &t_b, const ON_Curve *curveA, const ON_Curve *curveB, double isect_tol)
 
double tolerance_2d_from_3d (double tol_3d, Subcurve *root, const ON_Curve *curve, const ON_Interval *curve_domain)
 
int ON_Intersect (const ON_Curve *curveA, const ON_Curve *curveB, ON_SimpleArray< ON_X_EVENT > &x, double isect_tol, double overlap_tol, const ON_Interval *curveA_domain, const ON_Interval *curveB_domain, Subcurve *treeA, Subcurve *treeB)
 
HIDDEN void newton_csi (double &t, double &u, double &v, const ON_Curve *curveA, const ON_Surface *surfB, double isect_tol, Subsurface *tree)
 
double tolerance_2d_from_3d (double tol_3d, Subsurface *root, const ON_Surface *surf, const ON_Interval *surf_udomain, const ON_Interval *surf_vdomain)
 
int ON_Intersect (const ON_Curve *curveA, const ON_Surface *surfaceB, ON_SimpleArray< ON_X_EVENT > &x, double isect_tol, double overlap_tol, const ON_Interval *curveA_domain, const ON_Interval *surfaceB_udomain, const ON_Interval *surfaceB_vdomain, ON_CurveArray *overlap2d, Subcurve *treeA, Subsurface *treeB)
 
HIDDEN bool triangle_intersection (const struct Triangle &triA, const struct Triangle &triB, ON_3dPoint &center)
 
HIDDEN void add_points_to_closed_seams (const ON_Surface *surfA, const ON_Surface *surfB, ON_3dPointArray &curvept, ON_2dPointArray &curve_uvA, ON_2dPointArray &curve_uvB)
 
HIDDEN bool newton_ssi (double &uA, double &vA, double &uB, double &vB, const ON_Surface *surfA, const ON_Surface *surfB, double isect_tol)
 
HIDDEN ON_Curve * link_curves (ON_Curve *&c1, ON_Curve *&c2)
 
HIDDEN bool is_pt_in_surf_overlap (ON_2dPoint surf1_pt, const ON_Surface *surf1, const ON_Surface *surf2, Subsurface *surf2_tree)
 
HIDDEN bool is_subsurfaceA_completely_inside_overlap (const ON_SimpleArray< Overlapevent > &overlap_events, const Subsurface *subA, double isect_tolA)
 
HIDDEN bool is_uvA_completely_inside_overlap (const ON_SimpleArray< Overlapevent > &overlap_events, const ON_2dPoint &pt)
 
HIDDEN int isocurve_surface_overlap_location (const ON_Surface *surf1, double iso_t, int iso_dir, double overlap_start, double overlap_end, const ON_Surface *surf2, Subsurface *surf2_tree)
 
ON_ClassArray< ON_3dPointArray > get_overlap_intersection_parameters (const ON_SimpleArray< OverlapSegment * > &overlaps, const ON_Surface *surfA, const ON_Surface *surfB, Subsurface *treeA, Subsurface *treeB, double isect_tol, double isect_tolA, double isect_tolB)
 
HIDDEN bool is_valid_overlap (const OverlapSegment *overlap)
 
HIDDEN void split_overlaps_at_intersections (ON_SimpleArray< OverlapSegment * > &overlaps, const ON_Surface *surfA, const ON_Surface *surfB, Subsurface *treeA, Subsurface *treeB, double isect_tol, double isect_tolA, double isect_tolB)
 
HIDDEN std::vector< Subsurface * > subdivide_subsurface (Subsurface *sub)
 
HIDDEN std::pair< Triangle, Triangleget_subsurface_triangles (const Subsurface *sub, const ON_Surface *surf)
 
HIDDEN ON_2dPoint barycentric_to_uv (const ON_3dPoint &bc, const Triangle &tri)
 
HIDDEN bool join_continuous_ppair_to_polyline (ON_SimpleArray< int > *polyline, const PointPair &ppair)
 
int ON_Intersect (const ON_Surface *surfA, const ON_Surface *surfB, ON_ClassArray< ON_SSX_EVENT > &x, double isect_tol, double overlap_tol, double fitting_tol, const ON_Interval *surfaceA_udomain, const ON_Interval *surfaceA_vdomain, const ON_Interval *surfaceB_udomain, const ON_Interval *surfaceB_vdomain, Subsurface *treeA, Subsurface *treeB)
 

Detailed Description

Implementation of intersection routines openNURBS left out.

Definition in file intersect.cpp.

Macro Definition Documentation

#define DEBUG_BREP_INTERSECT   0

Definition at line 41 of file intersect.cpp.

Referenced by curve_fitting(), and ON_Intersect().

#define NR_MAX_DEPTH   8

Definition at line 45 of file intersect.cpp.

#define MAX_PCI_DEPTH   NR_MAX_DEPTH

Definition at line 46 of file intersect.cpp.

Referenced by ON_Intersect().

#define MAX_PSI_DEPTH   NR_MAX_DEPTH

Definition at line 47 of file intersect.cpp.

Referenced by ON_Intersect().

#define MAX_CCI_DEPTH   NR_MAX_DEPTH

Definition at line 48 of file intersect.cpp.

Referenced by ON_Intersect().

#define MAX_CSI_DEPTH   NR_MAX_DEPTH

Definition at line 49 of file intersect.cpp.

Referenced by ON_Intersect().

#define MAX_SSI_DEPTH   NR_MAX_DEPTH

Definition at line 50 of file intersect.cpp.

Referenced by ON_Intersect().

#define NR_DEFAULT_TOLERANCE   0.001

Definition at line 56 of file intersect.cpp.

#define PCI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE

Definition at line 57 of file intersect.cpp.

Referenced by ON_Intersect().

#define PSI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE

Definition at line 58 of file intersect.cpp.

#define CCI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE

Definition at line 59 of file intersect.cpp.

Referenced by ON_Intersect().

#define CSI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE

Definition at line 60 of file intersect.cpp.

Referenced by ON_Intersect().

#define SSI_DEFAULT_TOLERANCE   NR_DEFAULT_TOLERANCE

Definition at line 61 of file intersect.cpp.

Referenced by ON_Intersect().

#define NR_MAX_ITERATIONS   100

Definition at line 66 of file intersect.cpp.

#define PCI_MAX_ITERATIONS   NR_MAX_ITERATIONS

Definition at line 67 of file intersect.cpp.

Referenced by newton_pci().

#define PSI_MAX_ITERATIONS   NR_MAX_ITERATIONS

Definition at line 68 of file intersect.cpp.

Referenced by newton_psi().

#define CCI_MAX_ITERATIONS   NR_MAX_ITERATIONS

Definition at line 69 of file intersect.cpp.

Referenced by newton_cci().

#define CSI_MAX_ITERATIONS   NR_MAX_ITERATIONS

Definition at line 70 of file intersect.cpp.

Referenced by newton_csi().

#define SSI_MAX_ITERATIONS   NR_MAX_ITERATIONS

Definition at line 71 of file intersect.cpp.

Referenced by newton_ssi().

#define CCI_OVERLAP_TEST_POINTS   16

Curve-curve intersection (CCI)

approach:

  • Sub-divide the curves and calculate their bounding boxes.
  • Calculate the intersection of the bounding boxes, and go deeper if they intersect, until we reach the maximal depth or they are linear.
  • Use Newton-Raphson iterations to calculate an accurate intersection point.
  • Detect overlaps, eliminate duplications, and merge the continuous overlap events.

Definition at line 993 of file intersect.cpp.

Referenced by ON_Intersect().

#define CSI_OVERLAP_TEST_POINTS   2

Curve-surface intersection (CSI)

approach:

  • Sub-divide the curve and the surface, calculate bounding boxes.
  • If their bounding boxes intersect, go deeper until we reach the maximal depth, or the sub-curve is linear and the sub-surface is planar.
  • Use two starting points within the bounding boxes, and perform Newton- Raphson iterations to get an accurate result.
  • Detect overlaps, eliminate duplications, and merge the continuous overlap events.

Definition at line 1515 of file intersect.cpp.

Referenced by ON_Intersect().

#define OVERLAPS_LINKED (   from,
  to 
)
Value:
overlaps[i]->m_curve3d->PointAt##from().DistanceTo(overlaps[j]->m_curve3d->PointAt##to()) < isect_tol && \
overlaps[i]->m_curveA->PointAt##from().DistanceTo(overlaps[j]->m_curveA->PointAt##to()) < isect_tolA && \
overlaps[i]->m_curveB->PointAt##from().DistanceTo(overlaps[j]->m_curveB->PointAt##to()) < isect_tolB

Referenced by ON_Intersect().

Enumeration Type Documentation

anonymous enum
Enumerator
INSIDE_OVERLAP 
ON_OVERLAP_BOUNDARY 
OUTSIDE_OVERLAP 

Definition at line 2733 of file intersect.cpp.

Function Documentation

ON_Curve* sub_curve ( const ON_Curve *  in,
double  a,
double  b 
)

Definition at line 220 of file intersect.cpp.

References ON_NearZero().

Referenced by build_curve_root(), CurveSegment::Curve(), curve_fitting(), get_joinable_ssi_curves(), get_subcurves_inside_faces(), ON_Intersect(), replace_curve_with_subcurve(), split_curve(), split_overlaps_at_intersections(), and LinkedCurve::SubCurve().

Here is the call graph for this function:

ON_Surface* sub_surface ( const ON_Surface *  in,
int  dir,
double  a,
double  b 
)

Definition at line 286 of file intersect.cpp.

Referenced by build_surface_root().

HIDDEN const ON_Interval check_domain ( const ON_Interval *  in,
const ON_Interval &  domain,
const char *  name 
)

Definition at line 325 of file intersect.cpp.

References bu_log().

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN bool build_curve_root ( const ON_Curve *  curve,
const ON_Interval *  domain,
Subcurve &  root 
)

Definition at line 350 of file intersect.cpp.

References sub_curve().

Referenced by get_curve_root().

Here is the call graph for this function:

HIDDEN Subcurve* get_curve_root ( const ON_Curve *  curve,
const ON_Interval *  domain 
)

Definition at line 382 of file intersect.cpp.

References build_curve_root().

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN bool build_surface_root ( const ON_Surface *  surf,
const ON_Interval *  u_domain,
const ON_Interval *  v_domain,
Subsurface &  root 
)

Definition at line 399 of file intersect.cpp.

References sub_surface().

Referenced by get_surface_root().

Here is the call graph for this function:

HIDDEN Subsurface* get_surface_root ( const ON_Surface *  surf,
const ON_Interval *  u_domain,
const ON_Interval *  v_domain 
)

Definition at line 459 of file intersect.cpp.

References build_surface_root().

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN ON_Curve* curve_fitting ( ON_Curve *  in,
double  fitting_tol = ON_ZERO_TOLERANCE,
bool  delete_curve = true 
)

Definition at line 477 of file intersect.cpp.

References bu_log(), DEBUG_BREP_INTERSECT, ON_NearZero(), and sub_curve().

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN bool newton_pci ( double &  t,
const ON_3dPoint &  pointA,
const ON_Curve &  curveB,
double  tol 
)

Point-curve intersections (PCI)

approach:

  • Sub-divide the curve, calculating bounding boxes.
  • If the bounding box intersects with the point, go deeper until we reach the maximal depth or the sub-curve is linear.
  • Use linear approximation to get an estimated intersection point.
  • Use Newton-Raphson iterations to calculate an accurate intersection point, with the estimated one as a start.

Definition at line 686 of file intersect.cpp.

References ON_NearZero(), and PCI_MAX_ITERATIONS.

Referenced by ON_Intersect().

Here is the call graph for this function:

bool ON_Intersect ( const ON_3dPoint &  pointA,
const ON_Curve &  curveB,
ON_ClassArray< ON_PX_EVENT > &  x,
double  tol,
const ON_Interval *  curveB_domain,
Subcurve *  treeB 
)

Definition at line 728 of file intersect.cpp.

References bu_log(), check_domain(), get_curve_root(), MAX_PCI_DEPTH, newton_pci(), and PCI_DEFAULT_TOLERANCE.

Here is the call graph for this function:

HIDDEN bool newton_psi ( double &  u,
double &  v,
const ON_3dPoint &  pointA,
const ON_Surface &  surfB,
double  tol 
)

Point-surface intersections (PSI)

approach:

  • Sub-divide the surface, calculating bounding boxes.
  • If the bounding box intersects with the point, go deeper until we reach the maximal depth or the sub-surface is planar.
  • Use Newton-Raphson iterations to compute the closest point on the surface to that point.
  • If the closest point is within the given tolerance, there is an intersection.

Definition at line 835 of file intersect.cpp.

References delta, PSI_MAX_ITERATIONS, OSL::Strings::u, and OSL::Strings::v.

Referenced by ON_Intersect().

bool ON_Intersect ( const ON_3dPoint &  pointA,
const ON_Surface &  surfaceB,
ON_ClassArray< ON_PX_EVENT > &  x,
double  tol,
const ON_Interval *  surfaceB_udomain,
const ON_Interval *  surfaceB_vdomain,
Subsurface *  treeB 
)

Definition at line 888 of file intersect.cpp.

References bu_log(), check_domain(), get_surface_root(), MAX_PSI_DEPTH, newton_psi(), PCI_DEFAULT_TOLERANCE, OSL::Strings::u, and OSL::Strings::v.

Here is the call graph for this function:

HIDDEN void newton_cci ( double &  t_a,
double &  t_b,
const ON_Curve *  curveA,
const ON_Curve *  curveB,
double  isect_tol 
)

Definition at line 996 of file intersect.cpp.

References CCI_MAX_ITERATIONS, and delta.

Referenced by ON_Intersect().

double tolerance_2d_from_3d ( double  tol_3d,
Subcurve *  root,
const ON_Curve *  curve,
const ON_Interval *  curve_domain 
)

Definition at line 1078 of file intersect.cpp.

References ON_NearZero().

Referenced by ON_Intersect().

Here is the call graph for this function:

int ON_Intersect ( const ON_Curve *  curveA,
const ON_Curve *  curveB,
ON_SimpleArray< ON_X_EVENT > &  x,
double  isect_tol,
double  overlap_tol,
const ON_Interval *  curveA_domain,
const ON_Interval *  curveB_domain,
Subcurve *  treeA,
Subcurve *  treeB 
)

Definition at line 1095 of file intersect.cpp.

References bu_log(), CCI_DEFAULT_TOLERANCE, CCI_OVERLAP_TEST_POINTS, check_domain(), XEventProxy::Event(), get_curve_root(), MAX_CCI_DEPTH, newton_cci(), ON_Intersect(), ON_NearZero(), overlap(), and tolerance_2d_from_3d().

Here is the call graph for this function:

HIDDEN void newton_csi ( double &  t,
double &  u,
double &  v,
const ON_Curve *  curveA,
const ON_Surface *  surfB,
double  isect_tol,
Subsurface *  tree 
)

Definition at line 1518 of file intersect.cpp.

References CSI_MAX_ITERATIONS, delta, ON_Intersect(), OSL::Strings::u, and OSL::Strings::v.

Referenced by ON_Intersect().

Here is the call graph for this function:

double tolerance_2d_from_3d ( double  tol_3d,
Subsurface *  root,
const ON_Surface *  surf,
const ON_Interval *  surf_udomain,
const ON_Interval *  surf_vdomain 
)

Definition at line 1582 of file intersect.cpp.

References ON_NearZero().

Here is the call graph for this function:

int ON_Intersect ( const ON_Curve *  curveA,
const ON_Surface *  surfaceB,
ON_SimpleArray< ON_X_EVENT > &  x,
double  isect_tol,
double  overlap_tol,
const ON_Interval *  curveA_domain,
const ON_Interval *  surfaceB_udomain,
const ON_Interval *  surfaceB_vdomain,
ON_CurveArray *  overlap2d,
Subcurve *  treeA,
Subsurface *  treeB 
)

Definition at line 1606 of file intersect.cpp.

References bu_log(), check_domain(), CSI_DEFAULT_TOLERANCE, CSI_OVERLAP_TEST_POINTS, curve_fitting(), XEventProxy::Event(), get_curve_root(), get_surface_root(), MAX_CSI_DEPTH, newton_csi(), ON_Intersect(), ON_NearZero(), and overlap().

Here is the call graph for this function:

HIDDEN bool triangle_intersection ( const struct Triangle triA,
const struct Triangle triB,
ON_3dPoint &  center 
)

Definition at line 2191 of file intersect.cpp.

References Triangle::a, Triangle::b, Triangle::c, Triangle::GetLineSegments(), ON_Intersect(), ON_NearZero(), and ZERO.

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN void add_points_to_closed_seams ( const ON_Surface *  surfA,
const ON_Surface *  surfB,
ON_3dPointArray &  curvept,
ON_2dPointArray &  curve_uvA,
ON_2dPointArray &  curve_uvB 
)

Definition at line 2346 of file intersect.cpp.

References is_closed(), and ON_NearZero().

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN bool newton_ssi ( double &  uA,
double &  vA,
double &  uB,
double &  vB,
const ON_Surface *  surfA,
const ON_Surface *  surfB,
double  isect_tol 
)

Definition at line 2390 of file intersect.cpp.

References delta, and SSI_MAX_ITERATIONS.

Referenced by ON_Intersect().

HIDDEN ON_Curve* link_curves ( ON_Curve *&  c1,
ON_Curve *&  c2 
)

Definition at line 2456 of file intersect.cpp.

Referenced by ON_Intersect().

HIDDEN bool is_pt_in_surf_overlap ( ON_2dPoint  surf1_pt,
const ON_Surface *  surf1,
const ON_Surface *  surf2,
Subsurface *  surf2_tree 
)

Definition at line 2640 of file intersect.cpp.

References ON_Intersect().

Referenced by isocurve_surface_overlap_location(), and split_overlaps_at_intersections().

Here is the call graph for this function:

HIDDEN bool is_subsurfaceA_completely_inside_overlap ( const ON_SimpleArray< Overlapevent > &  overlap_events,
const Subsurface *  subA,
double  isect_tolA 
)

Definition at line 2666 of file intersect.cpp.

References Overlapevent::inner, Overlapevent::IsBoxCompletelyIn(), Overlapevent::IsBoxCompletelyOut(), Overlapevent::m_inside, Overlapevent::m_type, and Overlapevent::outer.

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN bool is_uvA_completely_inside_overlap ( const ON_SimpleArray< Overlapevent > &  overlap_events,
const ON_2dPoint &  pt 
)

Definition at line 2704 of file intersect.cpp.

References Overlapevent::inner, Overlapevent::IsPointIn(), Overlapevent::IsPointOnBoundary(), Overlapevent::m_inside, Overlapevent::m_type, and Overlapevent::outer.

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN int isocurve_surface_overlap_location ( const ON_Surface *  surf1,
double  iso_t,
int  iso_dir,
double  overlap_start,
double  overlap_end,
const ON_Surface *  surf2,
Subsurface *  surf2_tree 
)

Definition at line 2741 of file intersect.cpp.

References INSIDE_OVERLAP, is_pt_in_surf_overlap(), ON_OVERLAP_BOUNDARY, and OUTSIDE_OVERLAP.

Referenced by ON_Intersect().

Here is the call graph for this function:

ON_ClassArray<ON_3dPointArray> get_overlap_intersection_parameters ( const ON_SimpleArray< OverlapSegment * > &  overlaps,
const ON_Surface *  surfA,
const ON_Surface *  surfB,
Subsurface *  treeA,
Subsurface *  treeB,
double  isect_tol,
double  isect_tolA,
double  isect_tolB 
)

Definition at line 2782 of file intersect.cpp.

References ON_Intersect().

Referenced by split_overlaps_at_intersections().

Here is the call graph for this function:

HIDDEN bool is_valid_overlap ( const OverlapSegment overlap)
HIDDEN void split_overlaps_at_intersections ( ON_SimpleArray< OverlapSegment * > &  overlaps,
const ON_Surface *  surfA,
const ON_Surface *  surfB,
Subsurface *  treeA,
Subsurface *  treeB,
double  isect_tol,
double  isect_tolA,
double  isect_tolB 
)

Definition at line 2912 of file intersect.cpp.

References get_overlap_intersection_parameters(), is_pt_in_surf_overlap(), is_valid_overlap(), OverlapSegment::m_curve3d, OverlapSegment::m_curveA, OverlapSegment::m_curveB, OverlapSegment::m_dir, OverlapSegment::m_fix, ON_Intersect(), ON_NearZero(), and sub_curve().

Referenced by ON_Intersect().

Here is the call graph for this function:

HIDDEN std::vector<Subsurface *> subdivide_subsurface ( Subsurface *  sub)

Definition at line 3022 of file intersect.cpp.

Referenced by ON_Intersect().

HIDDEN std::pair<Triangle, Triangle> get_subsurface_triangles ( const Subsurface *  sub,
const ON_Surface *  surf 
)

Definition at line 3037 of file intersect.cpp.

Referenced by ON_Intersect().

HIDDEN ON_2dPoint barycentric_to_uv ( const ON_3dPoint &  bc,
const Triangle tri 
)

Definition at line 3074 of file intersect.cpp.

References Triangle::a_2d, Triangle::b_2d, and Triangle::c_2d.

Referenced by ON_Intersect().

HIDDEN bool join_continuous_ppair_to_polyline ( ON_SimpleArray< int > *  polyline,
const PointPair ppair 
)

Definition at line 3084 of file intersect.cpp.

References PointPair::indexA, and PointPair::indexB.

Referenced by ON_Intersect().

int ON_Intersect ( const ON_Surface *  surfA,
const ON_Surface *  surfB,
ON_ClassArray< ON_SSX_EVENT > &  x,
double  isect_tol,
double  overlap_tol,
double  fitting_tol,
const ON_Interval *  surfaceA_udomain,
const ON_Interval *  surfaceA_vdomain,
const ON_Interval *  surfaceB_udomain,
const ON_Interval *  surfaceB_vdomain,
Subsurface *  treeA,
Subsurface *  treeB 
)