BRL-CAD
PullbackCurve.cpp File Reference
#include "common.h"
#include "vmath.h"
#include "dvec.h"
#include <assert.h>
#include <vector>
#include <list>
#include <limits>
#include <set>
#include <map>
#include <string>
#include "brep.h"
#include "bu/parallel.h"
#include "PullbackCurve.h"
Include dependency graph for PullbackCurve.cpp:

Go to the source code of this file.

Data Structures

class  BSpline
 

Macros

#define RANGE_HI   0.55
 
#define RANGE_LO   0.45
 
#define UNIVERSAL_SAMPLE_COUNT   1001
 
#define _DEBUG_TESTING_
 

Functions

bool isFlat (const ON_2dPoint &p1, const ON_2dPoint &m, const ON_2dPoint &p2, double flatness)
 
void utah_ray_planes (const ON_Ray &r, ON_3dVector &p1, double &p1d, ON_3dVector &p2, double &p2d)
 
enum seam_direction seam_direction (ON_2dPoint uv1, ON_2dPoint uv2)
 
ON_BOOL32 GetDomainSplits (const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, ON_Interval domSplits[2][2])
 
ON_BOOL32 surface_EvNormal (const ON_Surface *surf, double s, double t, ON_3dPoint &point, ON_3dVector &normal, int side, int *hint)
 
ON_BOOL32 surface_GetBoundingBox (const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, ON_BoundingBox &bbox, ON_BOOL32 bGrowBox)
 
ON_BOOL32 face_GetBoundingBox (const ON_BrepFace &face, ON_BoundingBox &bbox, ON_BOOL32 bGrowBox)
 
ON_BOOL32 surface_GetIntervalMinMaxDistance (const ON_3dPoint &p, ON_BoundingBox &bbox, double &min_distance, double &max_distance)
 
ON_BOOL32 surface_GetIntervalMinMaxDistance (const ON_Surface *surf, const ON_3dPoint &p, const ON_Interval &u_interval, const ON_Interval &v_interval, double &min_distance, double &max_distance)
 
double surface_GetOptimalNormalUSplit (const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, double tol)
 
double surface_GetOptimalNormalVSplit (const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, double tol)
 
double surface_GetClosestPoint3dFirstOrderByRange (const ON_Surface *surf, const ON_3dPoint &p, const ON_Interval &u_range, const ON_Interval &v_range, double current_closest_dist, ON_2dPoint &p2d, ON_3dPoint &p3d, double same_point_tol, double within_distance_tol, int level)
 
double surface_GetClosestPoint3dFirstOrderSubdivision (const ON_Surface *surf, const ON_3dPoint &p, const ON_Interval &u_interval, double u, const ON_Interval &v_interval, double v, double current_closest_dist, ON_2dPoint &p2d, ON_3dPoint &p3d, double same_point_tol, double within_distance_tol, int level)
 
bool surface_GetClosestPoint3dFirstOrder (const ON_Surface *surf, const ON_3dPoint &p, ON_2dPoint &p2d, ON_3dPoint &p3d, double &current_distance, int quadrant, double same_point_tol, double within_distance_tol)
 
bool trim_GetClosestPoint3dFirstOrder (const ON_BrepTrim &trim, const ON_3dPoint &p, ON_2dPoint &p2d, double &t, double &distance, const ON_Interval *interval, double same_point_tol, double within_distance_tol)
 
bool toUV (PBCData &data, ON_2dPoint &out_pt, double t, double knudge=0.0, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE)
 
bool toUV (brlcad::SurfaceTree *surftree, const ON_Curve *curve, ON_2dPoint &out_pt, double t, double knudge=0.0)
 
double randomPointFromRange (PBCData &data, ON_2dPoint &out, double lo, double hi)
 
bool sample (PBCData &data, double t1, double t2, const ON_2dPoint &p1, const ON_2dPoint &p2)
 
void generateKnots (BSpline &bspline)
 
int getKnotInterval (BSpline &bspline, double u)
 
ON_NurbsCurve * interpolateLocalCubicCurve (ON_2dPointArray &Q)
 
ON_NurbsCurve * interpolateLocalCubicCurve (const ON_3dPointArray &Q)
 
ON_NurbsCurve * newNURBSCurve (BSpline &spline, int dimension=3)
 
ON_Curve * interpolateCurve (ON_2dPointArray &samples)
 
int IsAtSeam (const ON_Surface *surf, int dir, double u, double v, double tol)
 
int IsAtSeam (const ON_Surface *surf, double u, double v, double tol)
 
int IsAtSeam (const ON_Surface *surf, int dir, const ON_2dPoint &pt, double tol)
 
int IsAtSeam (const ON_Surface *surf, const ON_2dPoint &pt, double tol)
 
int IsAtSingularity (const ON_Surface *surf, double u, double v, double tol)
 
int IsAtSingularity (const ON_Surface *surf, const ON_2dPoint &pt, double tol)
 
ON_2dPointArray * pullback_samples (PBCData *data, double t, double s, double same_point_tol, double within_distance_tol)
 
ON_2dPoint UnwrapUVPoint (const ON_Surface *surf, const ON_2dPoint &pt, double tol)
 
double DistToNearestClosedSeam (const ON_Surface *surf, const ON_2dPoint &pt)
 
void GetClosestExtendedPoint (const ON_Surface *surf, ON_2dPoint &pt, ON_2dPoint &prev_pt, double tol)
 
bool ConsecutivePointsCrossClosedSeam (const ON_Surface *surf, const ON_2dPoint &pt, const ON_2dPoint &prev_pt, int &udir, int &vdir, double tol)
 
void ForceToClosestSeam (const ON_Surface *surf, ON_2dPoint &pt, double tol)
 
void SwapUVSeamPoint (const ON_Surface *surf, ON_2dPoint &p, int hint)
 
bool Find3DCurveSeamCrossing (PBCData &data, double t0, double t1, double offset, double &seam_t, ON_2dPoint &from, ON_2dPoint &to, double tol, double same_point_tol, double within_distance_tol)
 
bool FindTrimSeamCrossing (const ON_BrepTrim &trim, double t0, double t1, double &seam_t, ON_2dPoint &from, ON_2dPoint &to, double tol)
 
void pullback_samples_from_closed_surface (PBCData *data, double t, double s, double same_point_tol, double within_distance_tol)
 
PBCData * pullback_samples (const ON_Surface *surf, const ON_Curve *curve, double tolerance, double flatness, double same_point_tol, double within_distance_tol)
 
ON_Curve * refit_edge (const ON_BrepEdge *edge, double tolerance)
 
bool has_singularity (const ON_Surface *surf)
 
bool is_closed (const ON_Surface *surf)
 
bool check_pullback_closed (std::list< PBCData * > &pbcs)
 
bool check_pullback_singular_east (std::list< PBCData * > &pbcs)
 
bool check_pullback_singular (std::list< PBCData * > &pbcs)
 
void print_pullback_data (std::string str, std::list< PBCData * > &pbcs, bool justendpoints)
 
bool resolve_seam_segment_from_prev (const ON_Surface *surface, ON_2dPointArray &segment, ON_2dPoint *prev=NULL)
 
bool resolve_seam_segment_from_next (const ON_Surface *surface, ON_2dPointArray &segment, ON_2dPoint *next=NULL)
 
bool resolve_seam_segment (const ON_Surface *surface, ON_2dPointArray &segment, bool &u_resolved, bool &v_resolved)
 
int number_of_seam_crossings (std::list< PBCData * > &pbcs)
 
bool check_for_points_on_same_seam (std::list< PBCData * > &pbcs)
 
bool extend_pullback_at_shared_3D_curve_seam (std::list< PBCData * > &pbcs)
 
bool shift_single_curve_loop_straddled_over_seam (std::list< PBCData * > &pbcs)
 
bool extend_over_seam_crossings (std::list< PBCData * > &pbcs)
 
bool resolve_pullback_seams (std::list< PBCData * > &pbcs)
 
bool resolve_pullback_singularities (std::list< PBCData * > &pbcs)
 
void remove_consecutive_intersegment_duplicates (std::list< PBCData * > &pbcs)
 
bool check_pullback_data (std::list< PBCData * > &pbcs)
 
int check_pullback_singularity_bridge (const ON_Surface *surf, const ON_2dPoint &p1, const ON_2dPoint &p2)
 
int check_pullback_seam_bridge (const ON_Surface *surf, const ON_2dPoint &p1, const ON_2dPoint &p2)
 
ON_Curve * pullback_curve (const brlcad::SurfaceTree *surfacetree, const ON_Surface *surf, const ON_Curve *curve, double tolerance, double flatness)
 
ON_Curve * pullback_seam_curve (enum seam_direction seam_dir, const brlcad::SurfaceTree *surfacetree, const ON_Surface *surf, const ON_Curve *curve, double tolerance, double flatness)
 

Variables

bool _debug_print_ = false
 
bool _debug_print_mged2d_points_ = true
 
bool _debug_print_mged3d_points_ = false
 
int _debug_point_count_ =0
 

Macro Definition Documentation

#define RANGE_HI   0.55

Definition at line 45 of file PullbackCurve.cpp.

Referenced by randomPointFromRange().

#define RANGE_LO   0.45

Definition at line 46 of file PullbackCurve.cpp.

Referenced by randomPointFromRange().

#define UNIVERSAL_SAMPLE_COUNT   1001

Definition at line 47 of file PullbackCurve.cpp.

#define _DEBUG_TESTING_

Definition at line 49 of file PullbackCurve.cpp.

Function Documentation

bool isFlat ( const ON_2dPoint &  p1,
const ON_2dPoint &  m,
const ON_2dPoint &  p2,
double  flatness 
)

Definition at line 70 of file PullbackCurve.cpp.

Referenced by sample().

void utah_ray_planes ( const ON_Ray &  r,
ON_3dVector &  p1,
double &  p1d,
ON_3dVector &  p2,
double &  p2d 
)

Definition at line 77 of file PullbackCurve.cpp.

Referenced by toUV(), and utah_newton_solver().

enum seam_direction seam_direction ( ON_2dPoint  uv1,
ON_2dPoint  uv2 
)

Definition at line 106 of file PullbackCurve.cpp.

References EAST_SEAM, NORTH_SEAM, PBC_TOL, SOUTH_SEAM, UNKNOWN_SEAM_DIRECTION, and WEST_SEAM.

ON_BOOL32 GetDomainSplits ( const ON_Surface *  surf,
const ON_Interval &  u_interval,
const ON_Interval &  v_interval,
ON_Interval  domSplits[2][2] 
)

Definition at line 123 of file PullbackCurve.cpp.

Referenced by surface_GetBoundingBox().

ON_BOOL32 surface_EvNormal ( const ON_Surface *  surf,
double  s,
double  t,
ON_3dPoint &  point,
ON_3dVector &  normal,
int  side,
int *  hint 
)

Definition at line 189 of file PullbackCurve.cpp.

References IsAtSingularity(), PBC_SEAM_TOL, OSL::Strings::u, and OSL::Strings::v.

Referenced by brlcad::brep_getSurfacePoint(), getEdgePoints(), getSurfacePoints(), getUVCurveSamples(), brlcad::initialBBox(), and poly2tri_CDT().

Here is the call graph for this function:

ON_BOOL32 surface_GetBoundingBox ( const ON_Surface *  surf,
const ON_Interval &  u_interval,
const ON_Interval &  v_interval,
ON_BoundingBox &  bbox,
ON_BOOL32  bGrowBox 
)

Definition at line 246 of file PullbackCurve.cpp.

References bu_parallel_id(), BU_SEM_MALLOC, bu_semaphore_acquire(), bu_semaphore_release(), and GetDomainSplits().

Referenced by face_GetBoundingBox(), brlcad::initialBBox(), surface_GetClosestPoint3dFirstOrder(), and surface_GetIntervalMinMaxDistance().

Here is the call graph for this function:

ON_BOOL32 face_GetBoundingBox ( const ON_BrepFace &  face,
ON_BoundingBox &  bbox,
ON_BOOL32  bGrowBox 
)

Definition at line 340 of file PullbackCurve.cpp.

References surface_GetBoundingBox().

Here is the call graph for this function:

ON_BOOL32 surface_GetIntervalMinMaxDistance ( const ON_3dPoint &  p,
ON_BoundingBox &  bbox,
double &  min_distance,
double &  max_distance 
)
ON_BOOL32 surface_GetIntervalMinMaxDistance ( const ON_Surface *  surf,
const ON_3dPoint &  p,
const ON_Interval &  u_interval,
const ON_Interval &  v_interval,
double &  min_distance,
double &  max_distance 
)

Definition at line 385 of file PullbackCurve.cpp.

References surface_GetBoundingBox().

Here is the call graph for this function:

double surface_GetOptimalNormalUSplit ( const ON_Surface *  surf,
const ON_Interval &  u_interval,
const ON_Interval &  v_interval,
double  tol 
)

Definition at line 407 of file PullbackCurve.cpp.

References OSL::Strings::u.

Referenced by surface_GetClosestPoint3dFirstOrderSubdivision().

double surface_GetOptimalNormalVSplit ( const ON_Surface *  surf,
const ON_Interval &  u_interval,
const ON_Interval &  v_interval,
double  tol 
)

Definition at line 438 of file PullbackCurve.cpp.

References OSL::Strings::v.

Referenced by surface_GetClosestPoint3dFirstOrderSubdivision().

double surface_GetClosestPoint3dFirstOrderByRange ( const ON_Surface *  surf,
const ON_3dPoint &  p,
const ON_Interval &  u_range,
const ON_Interval &  v_range,
double  current_closest_dist,
ON_2dPoint &  p2d,
ON_3dPoint &  p3d,
double  same_point_tol,
double  within_distance_tol,
int  level 
)

Definition at line 543 of file PullbackCurve.cpp.

References N, OSL::Strings::P, and surface_GetClosestPoint3dFirstOrderSubdivision().

Referenced by surface_GetClosestPoint3dFirstOrderSubdivision().

Here is the call graph for this function:

double surface_GetClosestPoint3dFirstOrderSubdivision ( const ON_Surface *  surf,
const ON_3dPoint &  p,
const ON_Interval &  u_interval,
double  u,
const ON_Interval &  v_interval,
double  v,
double  current_closest_dist,
ON_2dPoint &  p2d,
ON_3dPoint &  p3d,
double  same_point_tol,
double  within_distance_tol,
int  level 
)

Definition at line 472 of file PullbackCurve.cpp.

References NEAR_ZERO, surface_GetClosestPoint3dFirstOrderByRange(), surface_GetIntervalMinMaxDistance(), surface_GetOptimalNormalUSplit(), surface_GetOptimalNormalVSplit(), OSL::Strings::u, and OSL::Strings::v.

Referenced by surface_GetClosestPoint3dFirstOrder(), and surface_GetClosestPoint3dFirstOrderByRange().

Here is the call graph for this function:

bool surface_GetClosestPoint3dFirstOrder ( const ON_Surface *  surf,
const ON_3dPoint &  p,
ON_2dPoint &  p2d,
ON_3dPoint &  p3d,
double &  current_distance,
int  quadrant,
double  same_point_tol,
double  within_distance_tol 
)

Definition at line 662 of file PullbackCurve.cpp.

References NEAR_ZERO, surface_GetBoundingBox(), surface_GetClosestPoint3dFirstOrderSubdivision(), and surface_GetIntervalMinMaxDistance().

Referenced by Find3DCurveSeamCrossing(), nurbs_test(), pullback_samples(), pullback_samples_from_closed_surface(), and trim_GetClosestPoint3dFirstOrder().

Here is the call graph for this function:

bool trim_GetClosestPoint3dFirstOrder ( const ON_BrepTrim &  trim,
const ON_3dPoint &  p,
ON_2dPoint &  p2d,
double &  t,
double &  distance,
const ON_Interval *  interval,
double  same_point_tol,
double  within_distance_tol 
)

Definition at line 1719 of file PullbackCurve.cpp.

References N, and surface_GetClosestPoint3dFirstOrder().

Here is the call graph for this function:

bool toUV ( PBCData &  data,
ON_2dPoint &  out_pt,
double  t,
double  knudge = 0.0,
double  within_distance_tol = BREP_EDGE_MISS_TOLERANCE 
)

Definition at line 1931 of file PullbackCurve.cpp.

Referenced by pullback_curve(), pullback_seam_curve(), and randomPointFromRange().

bool toUV ( brlcad::SurfaceTree *  surftree,
const ON_Curve *  curve,
ON_2dPoint &  out_pt,
double  t,
double  knudge = 0.0 
)

Definition at line 1947 of file PullbackCurve.cpp.

References brep_get_plane_ray(), BREP_INTERSECTION_ROOT_EPSILON, brep_newton_iterate(), brep_r(), MAX_FASTF, and utah_ray_planes().

Here is the call graph for this function:

double randomPointFromRange ( PBCData &  data,
ON_2dPoint &  out,
double  lo,
double  hi 
)

Definition at line 2026 of file PullbackCurve.cpp.

References drand48(), RANGE_HI, RANGE_LO, and toUV().

Referenced by sample().

Here is the call graph for this function:

bool sample ( PBCData &  data,
double  t1,
double  t2,
const ON_2dPoint &  p1,
const ON_2dPoint &  p2 
)

Definition at line 2037 of file PullbackCurve.cpp.

References isFlat(), and randomPointFromRange().

Referenced by pullback_curve(), and pullback_seam_curve().

Here is the call graph for this function:

void generateKnots ( BSpline bspline)

Definition at line 2060 of file PullbackCurve.cpp.

References BSpline::knots, BSpline::m, BSpline::n, and BSpline::p.

int getKnotInterval ( BSpline bspline,
double  u 
)

Definition at line 2077 of file PullbackCurve.cpp.

References BSpline::knots.

ON_NurbsCurve* interpolateLocalCubicCurve ( ON_2dPointArray &  Q)

Definition at line 2086 of file PullbackCurve.cpp.

References A, OSL::Strings::alpha, NEAR_ZERO, OSL::Strings::P, PBC_TOL, and OSL::Strings::u.

Referenced by interpolateCurve().

ON_NurbsCurve* interpolateLocalCubicCurve ( const ON_3dPointArray &  Q)

Definition at line 2180 of file PullbackCurve.cpp.

References A, OSL::Strings::alpha, NEAR_ZERO, OSL::Strings::P, PBC_TOL, and OSL::Strings::u.

ON_NurbsCurve* newNURBSCurve ( BSpline spline,
int  dimension = 3 
)

Definition at line 2276 of file PullbackCurve.cpp.

References BSpline::controls, BSpline::knots, BSpline::n, and BSpline::p.

ON_Curve* interpolateCurve ( ON_2dPointArray &  samples)

Definition at line 2297 of file PullbackCurve.cpp.

References interpolateLocalCubicCurve().

Referenced by pullback_curve(), and pullback_seam_curve().

Here is the call graph for this function:

int IsAtSeam ( const ON_Surface *  surf,
double  u,
double  v,
double  tol 
)

Definition at line 2332 of file PullbackCurve.cpp.

References IsAtSeam().

Here is the call graph for this function:

int IsAtSeam ( const ON_Surface *  surf,
int  dir,
const ON_2dPoint &  pt,
double  tol 
)

Definition at line 2344 of file PullbackCurve.cpp.

References IsAtSeam(), and UnwrapUVPoint().

Here is the call graph for this function:

int IsAtSeam ( const ON_Surface *  surf,
const ON_2dPoint &  pt,
double  tol 
)

Definition at line 2358 of file PullbackCurve.cpp.

References IsAtSeam(), and UnwrapUVPoint().

Here is the call graph for this function:

int IsAtSingularity ( const ON_Surface *  surf,
double  u,
double  v,
double  tol 
)
int IsAtSingularity ( const ON_Surface *  surf,
const ON_2dPoint &  pt,
double  tol 
)

Definition at line 2393 of file PullbackCurve.cpp.

References IsAtSingularity(), and UnwrapUVPoint().

Here is the call graph for this function:

ON_2dPointArray* pullback_samples ( PBCData *  data,
double  t,
double  s,
double  same_point_tol,
double  within_distance_tol 
)

Definition at line 2403 of file PullbackCurve.cpp.

References delta, s, and surface_GetClosestPoint3dFirstOrder().

Referenced by pullback_samples().

Here is the call graph for this function:

ON_2dPoint UnwrapUVPoint ( const ON_Surface *  surf,
const ON_2dPoint &  pt,
double  tol 
)
double DistToNearestClosedSeam ( const ON_Surface *  surf,
const ON_2dPoint &  pt 
)

Definition at line 2522 of file PullbackCurve.cpp.

References UnwrapUVPoint().

Referenced by Find3DCurveSeamCrossing(), and FindTrimSeamCrossing().

Here is the call graph for this function:

void GetClosestExtendedPoint ( const ON_Surface *  surf,
ON_2dPoint &  pt,
ON_2dPoint &  prev_pt,
double  tol 
)

Definition at line 2537 of file PullbackCurve.cpp.

References delta.

Referenced by extend_over_seam_crossings().

bool ConsecutivePointsCrossClosedSeam ( const ON_Surface *  surf,
const ON_2dPoint &  pt,
const ON_2dPoint &  prev_pt,
int &  udir,
int &  vdir,
double  tol 
)

Definition at line 2576 of file PullbackCurve.cpp.

References delta, IsAtSeam(), and UnwrapUVPoint().

Referenced by Find3DCurveSeamCrossing(), FindTrimSeamCrossing(), getEdgePoints(), number_of_seam_crossings(), pullback_samples_from_closed_surface(), and shift_single_curve_loop_straddled_over_seam().

Here is the call graph for this function:

void ForceToClosestSeam ( const ON_Surface *  surf,
ON_2dPoint &  pt,
double  tol 
)

Definition at line 2624 of file PullbackCurve.cpp.

References IsAtSeam(), UnwrapUVPoint(), and OSL::Strings::wrap.

Referenced by Find3DCurveSeamCrossing(), FindTrimSeamCrossing(), and pullback_samples_from_closed_surface().

Here is the call graph for this function:

void SwapUVSeamPoint ( const ON_Surface *  surf,
ON_2dPoint &  p,
int  hint 
)
bool Find3DCurveSeamCrossing ( PBCData &  data,
double  t0,
double  t1,
double  offset,
double &  seam_t,
ON_2dPoint &  from,
ON_2dPoint &  to,
double  tol,
double  same_point_tol,
double  within_distance_tol 
)

Definition at line 2742 of file PullbackCurve.cpp.

References ConsecutivePointsCrossClosedSeam(), DistToNearestClosedSeam(), ForceToClosestSeam(), IsAtSeam(), surface_GetClosestPoint3dFirstOrder(), and SwapUVSeamPoint().

Referenced by pullback_samples_from_closed_surface().

Here is the call graph for this function:

bool FindTrimSeamCrossing ( const ON_BrepTrim &  trim,
double  t0,
double  t1,
double &  seam_t,
ON_2dPoint &  from,
ON_2dPoint &  to,
double  tol 
)

Definition at line 2845 of file PullbackCurve.cpp.

References ConsecutivePointsCrossClosedSeam(), DistToNearestClosedSeam(), ForceToClosestSeam(), IsAtSeam(), SwapUVSeamPoint(), and UnwrapUVPoint().

Referenced by getEdgePoints().

Here is the call graph for this function:

void pullback_samples_from_closed_surface ( PBCData *  data,
double  t,
double  s,
double  same_point_tol,
double  within_distance_tol 
)

Definition at line 2933 of file PullbackCurve.cpp.

References ConsecutivePointsCrossClosedSeam(), delta, Find3DCurveSeamCrossing(), ForceToClosestSeam(), IsAtSeam(), PBC_FROM_OFFSET, PBC_SEAM_TOL, PBC_TOL, s, surface_GetClosestPoint3dFirstOrder(), and SwapUVSeamPoint().

Referenced by pullback_samples().

Here is the call graph for this function:

PBCData* pullback_samples ( const ON_Surface *  surf,
const ON_Curve *  curve,
double  tolerance,
double  flatness,
double  same_point_tol,
double  within_distance_tol 
)

Definition at line 3101 of file PullbackCurve.cpp.

References data, IsAtSeam(), PBC_SEAM_TOL, pullback_samples(), pullback_samples_from_closed_surface(), and surface_GetClosestPoint3dFirstOrder().

Here is the call graph for this function:

ON_Curve* refit_edge ( const ON_BrepEdge *  edge,
double  tolerance 
)

Definition at line 3163 of file PullbackCurve.cpp.

References delta, NEAR_ZERO, and PBC_TOL.

bool has_singularity ( const ON_Surface *  surf)

Definition at line 3373 of file PullbackCurve.cpp.

References UNLIKELY.

Referenced by check_pullback_data(), and check_pullback_singularity_bridge().

bool is_closed ( const ON_Surface *  surf)
bool check_pullback_closed ( std::list< PBCData * > &  pbcs)

Definition at line 3424 of file PullbackCurve.cpp.

bool check_pullback_singular_east ( std::list< PBCData * > &  pbcs)

Definition at line 3449 of file PullbackCurve.cpp.

References cs, and PBC_TOL.

Referenced by check_pullback_singular().

bool check_pullback_singular ( std::list< PBCData * > &  pbcs)

Definition at line 3492 of file PullbackCurve.cpp.

References check_pullback_singular_east().

Here is the call graph for this function:

void print_pullback_data ( std::string  str,
std::list< PBCData * > &  pbcs,
bool  justendpoints 
)

Definition at line 3540 of file PullbackCurve.cpp.

References _debug_point_count_, _debug_print_mged2d_points_, _debug_print_mged3d_points_, cs, IsAtSeam(), IsAtSingularity(), and PBC_SEAM_TOL.

Here is the call graph for this function:

bool resolve_seam_segment_from_prev ( const ON_Surface *  surface,
ON_2dPointArray &  segment,
ON_2dPoint *  prev = NULL 
)

Definition at line 3652 of file PullbackCurve.cpp.

References IsAtSeam(), IsAtSingularity(), and PBC_SEAM_TOL.

Referenced by resolve_pullback_seams().

Here is the call graph for this function:

bool resolve_seam_segment_from_next ( const ON_Surface *  surface,
ON_2dPointArray &  segment,
ON_2dPoint *  next = NULL 
)

Definition at line 3716 of file PullbackCurve.cpp.

References IsAtSeam(), IsAtSingularity(), and PBC_SEAM_TOL.

Referenced by resolve_pullback_seams().

Here is the call graph for this function:

bool resolve_seam_segment ( const ON_Surface *  surface,
ON_2dPointArray &  segment,
bool &  u_resolved,
bool &  v_resolved 
)

Definition at line 3781 of file PullbackCurve.cpp.

References IsAtSeam(), IsAtSingularity(), and PBC_SEAM_TOL.

Referenced by resolve_pullback_seams().

Here is the call graph for this function:

int number_of_seam_crossings ( std::list< PBCData * > &  pbcs)

Definition at line 3905 of file PullbackCurve.cpp.

References ConsecutivePointsCrossClosedSeam(), cs, IsAtSeam(), and PBC_SEAM_TOL.

Referenced by shift_single_curve_loop_straddled_over_seam().

Here is the call graph for this function:

bool check_for_points_on_same_seam ( std::list< PBCData * > &  pbcs)

Definition at line 3958 of file PullbackCurve.cpp.

References cs, IsAtSeam(), and PBC_SEAM_TOL.

Referenced by check_pullback_data().

Here is the call graph for this function:

bool extend_pullback_at_shared_3D_curve_seam ( std::list< PBCData * > &  pbcs)

Definition at line 4004 of file PullbackCurve.cpp.

References cs.

Referenced by check_pullback_data().

bool shift_single_curve_loop_straddled_over_seam ( std::list< PBCData * > &  pbcs)

Definition at line 4058 of file PullbackCurve.cpp.

References ConsecutivePointsCrossClosedSeam(), cs, number_of_seam_crossings(), PBC_SEAM_TOL, and SwapUVSeamPoint().

Referenced by check_pullback_data().

Here is the call graph for this function:

bool extend_over_seam_crossings ( std::list< PBCData * > &  pbcs)

Definition at line 4122 of file PullbackCurve.cpp.

References cs, GetClosestExtendedPoint(), and PBC_SEAM_TOL.

Referenced by check_pullback_data().

Here is the call graph for this function:

bool resolve_pullback_seams ( std::list< PBCData * > &  pbcs)

Definition at line 4163 of file PullbackCurve.cpp.

References cs, resolve_seam_segment(), resolve_seam_segment_from_next(), and resolve_seam_segment_from_prev().

Referenced by check_pullback_data().

Here is the call graph for this function:

bool resolve_pullback_singularities ( std::list< PBCData * > &  pbcs)

Definition at line 4278 of file PullbackCurve.cpp.

References cs, IsAtSingularity(), and PBC_SEAM_TOL.

Referenced by check_pullback_data().

Here is the call graph for this function:

void remove_consecutive_intersegment_duplicates ( std::list< PBCData * > &  pbcs)

Definition at line 4390 of file PullbackCurve.cpp.

References cs.

Referenced by check_pullback_data().

bool check_pullback_data ( std::list< PBCData * > &  pbcs)

Definition at line 4419 of file PullbackCurve.cpp.

References check_for_points_on_same_seam(), extend_over_seam_crossings(), extend_pullback_at_shared_3D_curve_seam(), has_singularity(), is_closed(), remove_consecutive_intersegment_duplicates(), resolve_pullback_seams(), resolve_pullback_singularities(), and shift_single_curve_loop_straddled_over_seam().

Here is the call graph for this function:

int check_pullback_singularity_bridge ( const ON_Surface *  surf,
const ON_2dPoint &  p1,
const ON_2dPoint &  p2 
)

Definition at line 4469 of file PullbackCurve.cpp.

References has_singularity(), IsAtSingularity(), and PBC_SEAM_TOL.

Here is the call graph for this function:

int check_pullback_seam_bridge ( const ON_Surface *  surf,
const ON_2dPoint &  p1,
const ON_2dPoint &  p2 
)

Definition at line 4485 of file PullbackCurve.cpp.

References is_closed(), IsAtSeam(), and PBC_SEAM_TOL.

Here is the call graph for this function:

ON_Curve* pullback_curve ( const brlcad::SurfaceTree *  surfacetree,
const ON_Surface *  surf,
const ON_Curve *  curve,
double  tolerance,
double  flatness 
)

Definition at line 4509 of file PullbackCurve.cpp.

References data, interpolateCurve(), PBC_TOL, sample(), st, and toUV().

Here is the call graph for this function:

ON_Curve* pullback_seam_curve ( enum seam_direction  seam_dir,
const brlcad::SurfaceTree *  surfacetree,
const ON_Surface *  surf,
const ON_Curve *  curve,
double  tolerance,
double  flatness 
)

Definition at line 4577 of file PullbackCurve.cpp.

References data, EAST_SEAM, interpolateCurve(), NORTH_SEAM, PBC_TOL, sample(), SOUTH_SEAM, toUV(), and WEST_SEAM.

Here is the call graph for this function:

Variable Documentation

bool _debug_print_ = false

Definition at line 51 of file PullbackCurve.cpp.

bool _debug_print_mged2d_points_ = true

Definition at line 52 of file PullbackCurve.cpp.

Referenced by print_pullback_data().

bool _debug_print_mged3d_points_ = false

Definition at line 53 of file PullbackCurve.cpp.

Referenced by print_pullback_data().

int _debug_point_count_ =0

Definition at line 54 of file PullbackCurve.cpp.

Referenced by print_pullback_data().