IntersectionCurve.h

00001 //===========================================================================
00002 // GoTools - SINTEF Geometry Tools
00003 //
00004 // GoTools module: Intersections, version 1.0
00005 //
00006 // Copyright (C) 2000-2007 SINTEF ICT, Applied Mathematics, Norway.
00007 //
00008 // This program is free software; you can redistribute it and/or          
00009 // modify it under the terms of the GNU General Public License            
00010 // as published by the Free Software Foundation version 2 of the License. 
00011 //
00012 // This program is distributed in the hope that it will be useful,        
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of         
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          
00015 // GNU General Public License for more details.                           
00016 //
00017 // You should have received a copy of the GNU General Public License      
00018 // along with this program; if not, write to the Free Software            
00019 // Foundation, Inc.,                                                      
00020 // 59 Temple Place - Suite 330,                                           
00021 // Boston, MA  02111-1307, USA.                                           
00022 //
00023 // Contact information: E-mail: tor.dokken@sintef.no                      
00024 // SINTEF ICT, Department of Applied Mathematics,                         
00025 // P.O. Box 124 Blindern,                                                 
00026 // 0314 Oslo, Norway.                                                     
00027 //
00028 // Other licenses are also available for this software, notably licenses
00029 // for:
00030 // - Building commercial software.                                        
00031 // - Building software whose source code you wish to keep private.        
00032 //===========================================================================
00033 #ifndef _INTERSECTIONCURVE_H
00034 #define _INTERSECTIONCURVE_H
00035 
00036 
00037 #include "IntersectionPoint.h"
00038 #include "IntersectionLink.h"
00039 #include "ParamCurve.h"
00040 #include <boost/shared_ptr.hpp>
00041 #include <list>
00042 #include <vector>
00043 
00044 
00045 namespace Go {
00048 
00049 
00050 
00051 enum EvalKind {SPACECURVE, PARAMCURVE_1, PARAMCURVE_2};
00052 enum TangentDomain {GEOM, PARAM1, PARAM2};
00053 enum EstimateDirection {FORWARDS, BACKWARDS};
00054     
00055 
00056 class Zero_Parameter_Span_Error {}; // internally used error object
00057 class ParamSurfaceInt;
00058 class IntersectionCurve;
00059 
00060 
00061 // NB: Before you start to use the IntersectionCurve class, please
00062 // read the following.
00063 //
00064 // IntersectionCurve has now been split up in three curve-types:
00065 //
00066 // * InterpolatedIntersectionCurve - defined by Hermite interpolation
00067 // of IntersectionPoints
00068 //
00069 // * DegeneratedIntersectionCurve - represents an IntersectionCurve
00070 // that is collapsed into a single point.
00071 //
00072 // * IsoparametricIntersectionCurve - An IntersectionCurve that can be
00073 // described by an isoparametric curve in one of the underlying
00074 // objects.
00075 // 
00076 // The distinction between these curve types makes the implementation
00077 // of member functions much clearer.  However, it should not be
00078 // necessary for the user to know whether a given IntersectionCurve is
00079 // actually interpolated, degenerated or isoparametric.  Therefore,
00080 // the construction of IntersectionCurves is left to a special
00081 // function, 'constructIntersectionCurve(...)', into which the user
00082 // only has to pass the range of IntersectionPoints making up the
00083 // curve.  This function is the only way to construct an
00084 // IntersectionCurve, as the actual constructors are protected.
00085 // Therefore, please use the 'constructIntersectionCurve(...) whenever
00086 // you want to make an IntersectionCurve.
00087 
00090 
00091 //===========================================================================
00092 class IntersectionCurve {
00093 //===========================================================================
00094 public:
00096     virtual ~IntersectionCurve() {};
00097 
00100     virtual boost::shared_ptr<ParamCurve>
00101     getCurve() const = 0;
00102 
00111     virtual boost::shared_ptr<ParamCurve>
00112     getParamCurve(int obj_nmb) const = 0;
00113 
00120     virtual void getParamSpan(double& start, double& end) const = 0;
00121 
00132     virtual void evaluateAt(double pval, Point& pos, Point& tan) = 0;
00133     
00141     virtual void refine(const double& pos_tol, const double& angle_tol) = 0;
00142     
00147     virtual bool isIsocurve() const = 0;
00148 
00153     virtual bool isDegenerated() const = 0;
00154 
00163     boost::shared_ptr<IntersectionPoint> getGuidePoint(int index) const;
00164 
00178     virtual bool 
00179     getGuidePointTangent(boost::shared_ptr<IntersectionPoint> pt,
00180                          Point& tan, int type = 0) const;
00181     
00182 
00186     int numGuidePoints() const { return ipoints_.size();}
00187     
00191     void  writeIPointsToStream(std::ostream& os) const;
00192 
00193 protected:
00194     
00195     template<class iterator>
00196     IntersectionCurve(iterator  begin, iterator end)
00197         : ipoints_(begin, end) {}
00198 
00199     // The list of intersection points defining the curve
00200     std::list<boost::shared_ptr<IntersectionPoint> > ipoints_;
00201 
00202     // This is the function that should be used when creating an
00203     // IntersectionCurve.  It will take care of the decision of which
00204     // kind (concrete class) of curve that is appropriate.
00205     template<class iterator> friend 
00206     boost::shared_ptr<IntersectionCurve>
00207     constructIntersectionCurve(const iterator begin,
00208                                const iterator end);
00209 
00210 
00211 };
00212 
00213 
00215 
00216 //===========================================================================
00217 class DegeneratedIntersectionCurve : public IntersectionCurve {
00218 //===========================================================================
00219 public:
00220     virtual ~DegeneratedIntersectionCurve();
00221 
00222     virtual boost::shared_ptr<ParamCurve> getCurve() const;
00223 
00224     virtual boost::shared_ptr<ParamCurve> getParamCurve(int obj_nmb) const;
00225 
00226     virtual bool isIsocurve() const
00227     { return false; } // Maybe this should be investigated
00228 
00229     virtual bool isDegenerated() const
00230     { return true; }
00231 
00232     virtual void getParamSpan(double& start, double& end) const
00233     {
00234         start = 0;
00235         end = 1;
00236     }
00237 
00238     virtual void refine(const double& pos_tol, const double& angle_tol)
00239     {
00240         MESSAGE("Tried to refine a degenerate curve.  Ignoring...");
00241     }
00242 
00243     virtual void evaluateAt(double pval, Point& pos, Point& tan) 
00244     {
00245         pos = ipoints_.front()->getPoint();
00246         tan = ipoints_.front()->getTangent();
00247     }
00248 
00249 private:
00250 
00251     template<class iterator>
00252     DegeneratedIntersectionCurve(const iterator begin, const iterator end) 
00253         : IntersectionCurve(begin, end) 
00254     {
00255         MESSAGE("Created a degenerate IntersectionCurve object.");
00256     }
00257     
00258     template<class iterator>
00259     static bool degenerated_range(const iterator begin, const iterator end);
00260 
00261     template<class iterator> friend 
00262     boost::shared_ptr<IntersectionCurve>
00263     constructIntersectionCurve(const iterator begin,
00264                                const iterator end);
00265 };
00266 
00267 
00269 
00270 //===========================================================================
00271 class NonEvaluableIntersectionCurve : public IntersectionCurve
00272 //===========================================================================
00273 {
00274 public:
00275     virtual ~NonEvaluableIntersectionCurve();
00276 
00277     virtual boost::shared_ptr<ParamCurve> getCurve() const
00278     { return boost::shared_ptr<ParamCurve>(); }
00279 
00280     virtual boost::shared_ptr<ParamCurve> getParamCurve(int obj_nmb) const
00281     { return boost::shared_ptr<ParamCurve>(); }
00282 
00283     virtual void getParamSpan(double& start, double& end) const
00284     { start = end = 0; }
00285 
00286     virtual void evaluateAt(double pval, Point& pos, Point& tan) 
00287     {
00288         MESSAGE("Warning! Tried to evaluate non-evaluable IntersectionCurve.\n"
00289                 "Nothing done.");
00290     }
00291 
00292     virtual void refine(const double& pos_tol, const double& angle_tol)
00293     {    
00294         MESSAGE("Warning! Tried to refine non-evaluable IntersectionCurve.\n"
00295                 "Nothing done.");
00296     }
00297 
00298     virtual bool isIsocurve() const
00299     { return false; }
00300 
00301     virtual bool isDegenerated() const
00302     { return false; }
00303 
00304 private:
00305     template<class iterator>
00306     NonEvaluableIntersectionCurve(const iterator begin, const iterator end)
00307         : IntersectionCurve(begin, end)
00308     {
00309         MESSAGE("Warning! Created a non-evaluable IntersectionCurve.");
00310     }
00311     template<class iterator> friend 
00312     boost::shared_ptr<IntersectionCurve>
00313     constructIntersectionCurve(const iterator begin,
00314                                const iterator end);
00315 };
00316 
00317 
00320 
00321 //===========================================================================
00322 class IsoparametricIntersectionCurve : public IntersectionCurve
00323 //===========================================================================
00324 {
00325 public:
00326     virtual ~IsoparametricIntersectionCurve() {};
00327 
00328     virtual boost::shared_ptr<ParamCurve> getCurve() const;
00329 
00330     virtual boost::shared_ptr<ParamCurve> getParamCurve(int obj_nmb) const;
00331 
00332     virtual bool isIsocurve() const
00333     { return true; }
00334 
00335     virtual bool isDegenerated() const
00336     { return false; } // Maybe this should be investigated
00337 
00338     virtual void refine(const double& pos_tol, const double& angle_tol)
00339     { 
00340         MESSAGE("Tried to refine an isoparametric curve.  Ignoring...");   
00341     }
00342 
00343     virtual void getParamSpan(double& start, double& end) const 
00344     { 
00345         start = isopar_geom_curve_->startparam(); 
00346         end = isopar_geom_curve_->endparam();
00347     }
00348 
00349     virtual void evaluateAt(double pval, Point& pos, Point& tan) 
00350     {
00351         temp_.resize(2);
00352         isopar_geom_curve_->point(temp_, pval, 1);
00353         pos = temp_[0];
00354         tan = temp_[1];
00355     }
00356 
00357 protected:
00358     boost::shared_ptr<ParamCurve> isopar_geom_curve_;
00359     boost::shared_ptr<ParamCurve> isopar_param_curve_1_;
00360     boost::shared_ptr<ParamCurve> isopar_param_curve_2_;
00361     mutable std::vector<Go::Point> temp_;
00362 
00363     template<class iterator>
00364     IsoparametricIntersectionCurve(const iterator begin, const iterator end,
00365                                    int isopar)
00366         : IntersectionCurve(begin, end) 
00367     {
00368         precalculate_iso_curves(isopar);
00369     }
00370 
00371     void precalculate_iso_curves(int isopar); 
00372 
00373     template<class iterator>
00374     static std::vector<int>
00375     resolve_isoparametric_directions(const iterator begin, 
00376                                      const iterator end);
00377 
00378     template<class iterator> friend 
00379     boost::shared_ptr<IntersectionCurve>
00380     constructIntersectionCurve(const iterator begin,
00381                                const iterator end);
00382 };
00383 
00384 
00387 
00388 //===========================================================================
00389 class InterpolatedIntersectionCurve : public IntersectionCurve
00390 //===========================================================================
00391 {
00392 public:
00393     virtual ~InterpolatedIntersectionCurve() {}
00394 
00395     virtual void refine(const double& pos_tol, const double& angle_tol);
00396 
00397     virtual boost::shared_ptr<ParamCurve> getCurve() const;
00398 
00399     virtual boost::shared_ptr<ParamCurve> getParamCurve(int obj_nmb) const;
00400 
00401     virtual bool isIsocurve() const
00402     { return false; }
00403 
00404     virtual bool isDegenerated() const
00405     { return false; }
00406 
00407     virtual void getParamSpan(double& start, double& end) const
00408     {
00409         start = 0;
00410         end = 1;
00411     }
00412 
00413     virtual void evaluateAt(double pval, Point& pos, Point& tan);
00414 
00415     virtual bool
00416     getGuidePointTangent(boost::shared_ptr<IntersectionPoint> pt,
00417                          Point& tan, int type) const;
00418 
00419     // Write curve to stream (provided for debug reasons)
00420     void write(std::ostream& os) const;
00421 
00422     // Read curve from stream (provided for debug reasons)
00423     void read(std::istream& is) const;
00424 
00425 private:
00426     // Mapping between intersection points and their tangents
00427     // (geometrical, parametrical, parametrical), as interpreted by
00428     // this curve. (We precalculate because it is unsafe to bluntly
00429     // rely on the getTangent() member function of the
00430     // IntersectionPoint.  The tangent might be undefined, have an
00431     // undefined orientation, or depending on whether we differentiate
00432     // from the right or from the left).  The tangents are calculated
00433     // at construction time, and are expected to remain constant
00434     // throughout the lifetime of the IntersectionCurve.  On
00435     // refinement, when a new IntersectionPoint is inserted, the
00436     // tangent map should be updated too.
00437     std::map<boost::shared_ptr<IntersectionPoint>,
00438              std::pair<Go::Array<Go::Point, 3>, bool> > tangents_;
00439     double certified_pos_tol_;
00440     double certified_angle_tol_;
00441     mutable std::vector<Go::Point> temp_;
00442     mutable bool geom_cached_;
00443     mutable bool par1_cached_;
00444     mutable bool par2_cached_;
00445     mutable boost::shared_ptr<ParamCurve> cached_geom_curve_;
00446     mutable boost::shared_ptr<ParamCurve> cached_param_curve_1_;
00447     mutable boost::shared_ptr<ParamCurve> cached_param_curve_2_;
00448 
00449     template<class iterator>
00450     InterpolatedIntersectionCurve(const iterator begin, const iterator end)
00451         : IntersectionCurve(begin, end),
00452           certified_pos_tol_(std::numeric_limits<double>::max()),
00453           certified_angle_tol_(std::numeric_limits<double>::max()),
00454           geom_cached_(false), 
00455           par1_cached_(false), 
00456           par2_cached_(false)
00457     {
00458         resolve_tangents();
00459     }
00460 
00461     // Since not all participating IntersectionPoints may have
00462     // uniquely defined and oriented tangents, this routine makes
00463     // sure, upon construction of the IntersectionCurve, that the
00464     // tangents are treated consistently (they are oriented the same
00465     // way, branch-points and higher-order points treated without
00466     // ambiguity, etc.).  Note that ONLY start- and endpoints are
00467     // allowed to be branchpoints/higher-order points.
00468     void resolve_tangents(); 
00469 
00470     // Helper function for 'resolve_tangents' and
00471     // 'refine_interval_recursive' that decides from which side in
00472     // each parameter differentiation should be carried out for a
00473     // specific IntersectionPoint.
00474     void choose_differentiation_side(std::list<boost::
00475                                      shared_ptr<IntersectionPoint> >::
00476                                      const_iterator pt) const;
00477 
00478     // Helper function for 'resolve_tangents()', used to determine
00479     // whether the list containing the intersection points should be
00480     // inversed or not, depending on the tangents.
00481     void invert_sequence_if_necessary();
00482 
00483     // Helper function for 'resolve_tangents()', used to search for a
00484     // point with a clearly defined tangent direction and orientation,
00485     // which can be used as a reference for setting the orientation of
00486     // other, orientation-less, tangents in the curve.
00487     std::list<boost::shared_ptr<IntersectionPoint> >::iterator
00488     choose_reference_direction();
00489 
00490     // Helper function for 'resolve_tangents()', used to orient the
00491     // tangents in a range or IntersectionPoints, in accordance with
00492     // the tangent of a reference point, supposedly inside the given
00493     // range.
00494     void make_consistent_orientation(std::list<boost::
00495                                      shared_ptr<IntersectionPoint> >::
00496                                      iterator ref_elem);
00497 
00498     // Helper function that flips the tangent of a point (explicitly
00499     // if the point has a uniquely defined tangent, or in internal map
00500     // if not).
00501     void flip_tangent(std::list<boost::
00502                       shared_ptr<IntersectionPoint> >::iterator pt,
00503                       bool flip);
00504 
00505     // Helper function used to determine whether the orientation of
00506     // the tangent vector to 'mid' should be flipped in order to
00507     // correspond with its neighbours, 'prec' and 'next'.
00508     bool determine_flip(std::list<boost::
00509                         shared_ptr<IntersectionPoint> >::const_iterator prec,
00510                         std::list<boost::
00511                         shared_ptr<IntersectionPoint> >::const_iterator mid,
00512                         std::list<boost::
00513                         shared_ptr<IntersectionPoint> >::const_iterator next);
00514 
00515     // Determine the tangent of an IntersectionPoint (assumed to be a
00516     // member point of this IntersectionCurve.  For most purposes, the
00517     // tangent would be equal to the one obtained by calling
00518     // pt->getTangent(), but not always, since the point can be a
00519     // branchpoint or (worse) a higher-order point.  In those cases,
00520     // the tangent is determined by the curve's "individual
00521     // interpretation".  The possibility of an IntersectionPoint being
00522     // a branch/higher-order point is only present for endpoints.  It
00523     // is always assumed that interior points have well-defined
00524     // tangents.
00525     Point tangent_of(std::list<boost::
00526                      shared_ptr<IntersectionPoint> >::const_iterator pt) const;
00527 
00528     // Similar to the function above, except that it returns the
00529     // _parametrical_ tangent, in the parameter domain of one of the
00530     // intersecting objects.  If the function is called with
00531     // 'second_obj' set to false, then the parametrical tangent in the
00532     // first object is returned, and vice versa.
00533     Point param_tangent_of(std::list<boost::
00534                            shared_ptr<IntersectionPoint> >::const_iterator pt,
00535                            bool second_obj) const;
00536 
00537     // Helper function for 'resolve_tangents()', used to determine the
00538     // tangent direction (not orientation) for an IntersectionPoint
00539     // where this information cannot be unambiguously found in the
00540     // usual way (branchpoints or higher-order points), as well as
00541     // creating curve spesific copies of tangents of points without a
00542     // determined direction.
00543     void establish_curve_spesific_tangent(std::list<boost::
00544                                           shared_ptr<IntersectionPoint> >::
00545                                           const_iterator pt);
00546 
00547     // Helper function to calculate the tangent of an
00548     // IntersectionPoint based on the position and tangents of
00549     // neighbours, and without using tangent information in the
00550     // conserned IntersectionPoint itself.
00551     bool context_tangent_estimate(std::list<boost::
00552                                   shared_ptr<IntersectionPoint> >::
00553                                   const_iterator pt, 
00554                                   TangentDomain tdom, 
00555                                   EstimateDirection, 
00556                                   Point& result) const;
00557 
00558 //     // Using neighbouring points to estimate tangent at pt (necessary
00559 //     // if pt is a higher-order point or a branchpoint).
00560 //     Point geometric_tangent_estimate(std::list<boost::
00561 //                                   shared_ptr<IntersectionPoint> >::
00562 //                                   const_iterator pt) const;
00563 
00564     // Helper function for refine() function
00565     void refine_interval_recursive(std::list<boost::
00566                                    shared_ptr<IntersectionPoint> >::
00567                                    iterator start_point,
00568                                    const double& pos_tol,
00569                                    const double& angle_tol); // Recursive
00570                                                              // function
00571 
00572     // Evaluates surface point and tangent.  If tangent could not be
00573     // determined, return 'false', else return 'true'.
00574     bool eval_surf_point(const Point& midpoint_pos,
00575                          const Point& midpoint_tan,
00576                          const ParamSurfaceInt* psurf1,
00577                          const Point& midpoint_param_pos_1,
00578                          const ParamSurfaceInt* psurf2,
00579                          const Point& midpoint_param_pos_2,
00580                          Point& surface_point,
00581                          Point& surface_tangent,
00582                          Point& surface_1_param,
00583                          Point& surface_2_param,
00584                          int& jstat) const;
00585 
00586     void hermite_interpol(std::list<boost::shared_ptr<IntersectionPoint> >::
00587                           iterator start_point,
00588                           std::list<boost::shared_ptr<IntersectionPoint> >::
00589                           iterator end_point,
00590                           Point& mid_position,
00591                           Point& mid_tangent,
00592                           EvalKind kind) const;
00593 
00594     template<class iterator> friend 
00595     boost::shared_ptr<IntersectionCurve>
00596     constructIntersectionCurve(const iterator begin,
00597                                const iterator end);
00598 };
00599 
00600 
00601 // Use the below function to create an IntersectionCurve
00602 
00603 //===========================================================================
00604 template<class iterator> 
00605 boost::shared_ptr<IntersectionCurve>
00606 constructIntersectionCurve(const iterator begin,
00607                            const iterator end)
00608 //===========================================================================
00609 {
00610     typedef IsoparametricIntersectionCurve IsoCurve;
00611     typedef DegeneratedIntersectionCurve DegenCurve;
00612     typedef InterpolatedIntersectionCurve InterpolCurve;
00613     typedef NonEvaluableIntersectionCurve NonEvalCurve;
00614 
00615     // Do NOT override the below code.  curves that are degenerated
00616     // should NOT be treated as InterpolatedIntersectionCurve!!!!
00617     // Causes trouble and crashes.
00618 //     if (0) { // @@sbr Degenerated space-curve seems to be the trend
00619 //           // for a function ...
00620     std::vector<int> isopar
00621         = IsoCurve::resolve_isoparametric_directions(begin, end);
00622     if (isopar.size() > 0) {
00623         
00624         // The curve is isoparametric
00625         try {
00626             return boost::shared_ptr<IntersectionCurve>
00627                 (new IsoCurve(begin, end, isopar[0]));
00628         } catch (Zero_Parameter_Span_Error& e) {
00629             // Degenerated parameter span.  Making degenerated curve
00630             // instead.
00631             MESSAGE("Warning: tried to generate an isocurve but made"
00632                     " a degenerated curve instead.");
00633             return boost::shared_ptr<IntersectionCurve>
00634                 (new DegenCurve(begin, end));
00635         }
00636     } else if (DegenCurve::degenerated_range(begin, end)) {
00637         //@@sbr Temp!!! 0) { Currently not handling functions (i.e. 1-dim).
00638         // the curve is degenerated
00639         return boost::shared_ptr<IntersectionCurve>
00640             (new DegenCurve(begin, end));
00641     }
00642     
00643     // If we got here, we will try to make a normal, interpolated
00644     // IntersectionCurve
00645     boost::shared_ptr<IntersectionCurve> res;
00646     try {
00647         res = boost::shared_ptr<IntersectionCurve>
00648             (new InterpolCurve(begin, end));
00649     } catch(...) {
00650         // Could not make InterpolatedIntersectionCurve.  Probably
00651         // problem with tangents.  Making curve without evaluation
00652         // functionality instead.
00653         res = boost::shared_ptr<IntersectionCurve>
00654             (new NonEvalCurve(begin, end));
00655     }
00656     return res;
00657 }
00658 
00659 
00660 //===========================================================================
00661 template<class iterator> std::vector<int> IsoparametricIntersectionCurve::  
00662 resolve_isoparametric_directions(const iterator begin, const iterator end)
00663 //===========================================================================
00664 {
00665     // This is a static function
00666 
00667     std::vector<boost::shared_ptr<IntersectionPoint> > points(begin, end);
00668     ASSERT(points.size() >= 2);
00669 
00670     int num_par = points.front()->numParams1()
00671         + points.front()->numParams2();
00672     std::vector<bool> iso_candidates(num_par, true); // Candidates for
00673                                                      // isoparametric
00674     
00675     // Disqualify candidates
00676     int i;
00677     for (i = 0; i < int(points.size()) - 1; ++i) {
00678         // Keep only candidates that are isoparametric
00679         boost::shared_ptr<IntersectionLink> link
00680             = points[i]->getIntersectionLink(points[i+1].get());
00681         ASSERT(link.get() != 0);
00682         for (int par = 0; par < num_par; ++par) {
00683             if (!link->isIsoparametricIn(par)) {
00684                 iso_candidates[par] = false;
00685             }
00686         }
00687     }
00688     
00689     // We have now eliminated all directions that are not
00690     // isoparametric for all links in the curve
00691     std::vector<int> result;
00692     for (i = 0; i < num_par; ++i) {
00693         if (iso_candidates[i]) {
00694             result.push_back(i);
00695         }
00696     }
00697     return result;
00698 }
00699 
00700 //===========================================================================
00701 template<class iterator> bool DegeneratedIntersectionCurve::
00702 degenerated_range(const iterator begin, const iterator end)
00703 //===========================================================================
00704 {
00705     const double tol = (*begin)->getTolerance()->getEpsge();
00706 
00707     // If all points are within a geometric distance of 'tol' to the
00708     // first point, then the range is degenerated
00709 
00710     Point ref_pos = (*begin)->getPoint();
00711     bool found = false;
00712     for (iterator i = begin; i != end && !found; ++i) {
00713         Point cur_pos = (*i)->getPoint();
00714         found = (ref_pos.dist2(cur_pos) > tol * tol);
00715     }
00716     return !found;
00717 }
00718 
00719 
00721 }; // namespace Go;
00722 
00723 
00724 #endif  // _INTERSECTIONCURVE_H
00725 
00726 

Generated on Fri Nov 23 12:24:33 2007 for GoTools Intersections Library by  doxygen 1.5.1