28#ifndef BREP_PULLBACK_H
29#define BREP_PULLBACK_H
169 const ON_Curve *curve,
double tolerance = 1.0e-6,
170 double flatness = 1.0e-3,
175 bool stop_after_first_rejection =
false);
340 double flatness = 1.0e-3);
bool SurfaceClosestPointFromSeed(const ON_Surface *surf, const ON_3dPoint &point, const ON_2dPoint &seed, ON_2dPoint &surface_point, ON_3dPoint &lifted_point, double &distance, double tolerance, const bool *cached_closed=NULL, const ON_Interval *cached_domains=NULL, double refinement_tolerance=0.0)
PullbackContext(const PullbackContext &)=delete
std::shared_ptr< PullbackContext > ForkWithSharedSurfaceCache() const
PullbackContext & operator=(const PullbackContext &)=delete
bool SurfaceClosestPoint(const ON_Surface *surf, const ON_3dPoint &point, ON_2dPoint &surface_point, ON_3dPoint &lifted_point, double &distance, int quadrant=0, double same_point_tol=BREP_SAME_POINT_TOLERANCE, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE)
PullbackStatistics Statistics() const
Header file for the BRL-CAD common definitions.
#define BREP_SAME_POINT_TOLERANCE
#define BREP_EDGE_MISS_TOLERANCE
#define BREP_FCP_ROOT_EPSILON
double DistToNearestClosedSeam(const ON_Surface *surf, const ON_2dPoint &pt)
void SwapUVSeamPoint(const ON_Surface *surf, ON_2dPoint &p, int hint=3)
bool ConsecutivePointsCrossClosedSeam(const ON_Surface *surf, const ON_2dPoint &pt, const ON_2dPoint &prev_pt, int &udir, int &vdir, double tol=1e-6)
bool ON_NurbsCurve_GetClosestPoint(double *t, const ON_NurbsCurve *nc, const ON_3dPoint &p, double maximum_distance=0.0, const ON_Interval *sub_domain=NULL)
bool Find3DCurveSeamCrossing(PBCData &data, double t0, double t1, double offset, double &seam_t, ON_2dPoint &from, ON_2dPoint &to, double tol=0.0, double same_point_tol=BREP_SAME_POINT_TOLERANCE, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE)
int check_pullback_singularity_bridge(const ON_Surface *surf, const ON_2dPoint &p1, const ON_2dPoint &p2)
ON_2dPoint UnwrapUVPoint(const ON_Surface *surf, const ON_2dPoint &pt, double tol=0.0)
int IsAtSingularity(const ON_Surface *surf, double u, double v, double tol=1e-6)
int IsAtSeam(const ON_Surface *surf, int dir, double u, double v, double tol=0.0)
bool FindTrimSeamCrossing(const ON_BrepTrim &trim, double t0, double t1, double &seam_t, ON_2dPoint &from, ON_2dPoint &to, double tol=0.0)
PBCData * pullback_samples(const ON_Surface *surf, const ON_Curve *curve, double tolerance=1.0e-6, double flatness=1.0e-3, double same_point_tol=BREP_SAME_POINT_TOLERANCE, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE, const std::shared_ptr< brlcad::PullbackContext > &context=std::shared_ptr< brlcad::PullbackContext >(), bool stop_after_first_rejection=false)
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=BREP_SAME_POINT_TOLERANCE, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE)
bool ON_NurbsCurve_ClosestPointToLineSegment(double *dist, double *t, const ON_NurbsCurve *nc, const ON_Line &l, double maximum_distance=0.0, const ON_Interval *subdomain=NULL)
bool check_pullback_data(std::list< PBCData * > &pbcs)
bool surface_GetClosestPoint3dFirstOrder(const ON_Surface *surf, const ON_3dPoint &p, ON_2dPoint &p2d, ON_3dPoint &p3d, double ¤t_distance, int quadrant=0, double same_point_tol=BREP_SAME_POINT_TOLERANCE, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE)
void ForceToClosestSeam(const ON_Surface *surf, ON_2dPoint &pt, double tol=0.0)
bool ON_TrimCurve_GetClosestPoint(double *t, const ON_BrepTrim *trim, const ON_3dPoint &p, double maximum_distance=0.0, const ON_Interval *sub_domain=NULL)
@ SurfaceDistanceExceeded
void PullbackWorkProgress(uint64_t operations=1)
std::shared_ptr< PullbackWorkBudget > PullbackWorkBudgetHandle
bool PullbackWorkStalled()
bool(* PullbackCancellationCallback)(void *context)
PullbackWorkBudgetHandle CreatePullbackWorkBudget(uint64_t maximum_work_milliseconds)
void PropagatePullbackWorkStop(bool deadline_expired, bool stalled)
ON_Curve * pullback_curve(ON_BrepFace *face, const ON_Curve *curve, SurfaceTree *tree=NULL, double tolerance=BREP_FCP_ROOT_EPSILON, double flatness=1.0e-3)
void ClearPullbackWorkLimit()
bool surface_GetClosestPoint3dFirstOrder(PullbackContext &context, const ON_Surface *surf, const ON_3dPoint &point, ON_2dPoint &surface_point, ON_3dPoint &lifted_point, double &distance, int quadrant=0, double same_point_tol=BREP_SAME_POINT_TOLERANCE, double within_distance_tol=BREP_EDGE_MISS_TOLERANCE)
PullbackWorkBudgetHandle CurrentPullbackWorkBudget()
bool PullbackWorkDeadlineExpired()
void SetPullbackWorkLimit(PullbackCancellationCallback cancellation_callback, void *cancellation_context, uint64_t maximum_work_milliseconds, uint64_t maximum_stall_milliseconds=0)
bool PullbackWorkCancelled()
uint64_t PullbackWorkRemainingMilliseconds()
bool get_closest_point(ON_2dPoint &outpt, const ON_BrepFace &face, const ON_3dPoint &point, const SurfaceTree *tree=NULL, double tolerance=BREP_FCP_ROOT_EPSILON)
uint64_t fallback_seed_refinements
double fallback_refinement_improvement_total
uint64_t continuity_seed_successes
uint64_t span_boxes_tested
uint64_t maximum_subdivision_nodes
uint64_t continuity_seed_iterations
uint64_t continuity_seed_finite_candidates
uint64_t multiseed_failures
uint64_t continuity_seed_searches
uint64_t continuity_seed_line_searches
uint64_t fallback_refinement_improvements
uint64_t continuity_seed_failures
uint64_t fallback_samples_evaluated
uint64_t multiseed_fallbacks
uint64_t fallback_calls_with_finite_primary
uint64_t subdivision_nodes
uint64_t span_boxes_built
double fallback_primary_improvement_total
uint64_t maximum_continuity_seed_iterations
uint64_t multiseed_successes
uint64_t surface_cache_hits
uint64_t closest_point_queries
uint64_t primary_search_us
uint64_t surfaces_prepared
uint64_t continuity_seed_us
double fallback_primary_improvement_maximum
double fallback_refinement_improvement_maximum
uint64_t maximum_winning_seed_index
uint64_t maximum_continuity_seed_line_searches
uint64_t fallback_late_seed_improvements
uint64_t primary_search_successes
PullbackFailureReason failure_reason
double maximum_recovery_distance
size_t rejected_projection_samples
double declared_tolerance
bool periodic_pole_cut_before
bool periodic_pole_cut_after
double maximum_recovery_tolerance
double maximum_projection_distance
bool surface_parameterization_cached
std::list< ON_2dPointArray * > * segments
std::shared_ptr< brlcad::PullbackContext > context
ON_Interval surface_domain[2]
size_t projection_samples
bool stop_after_first_rejection
size_t failed_seam_crossing_searches
size_t failed_projection_samples
bool samples_source_validated
brlcad::SurfaceTree * surftree