-
Notifications
You must be signed in to change notification settings - Fork 54
Improve isValid #123
Comments
Maybe SFS validity and pre-condition validity should be uncoupled (especially usefull for conversion of polygons SFS-Valid <-> CGAL-Valid) |
@vmora It's possible to do approximate computation with Epeck kernel : See this example from Sébastien : (should be "just" twice slower than pure double operations) |
approx() takes the centre of the interval boxes, which is here enough to compute a distance, right ? |
"Maybe SFS validity and pre-condition validity should be uncoupled (especially usefull for conversion of polygons SFS-Valid <-> CGAL-Valid)" |
hmmm : just the list of assertions in CGAL ? |
the only ones I know about is the polygon hole-touching ring case and the "plane polygon" required by SFS
maybe an idea... if not complete to ensure robustness -> upstream the problem ;) |
Validation caching can make great improvements to the performance of this algorithm. In summary, once a geometry has been validated, the result need not be recalculated if it has not been mutated, yet this is repeatedly done, and is very expensive, in particular for Polygons. Included in the list of mutations that dispose of any cached validation result is the access to non-const geometry components of a given Geometry, which may, via the non-const reference, be mutated. Of course there is no certainty that the client would mutate through use of these accessors, but there is no way to tell. A solution is to offer const& accessors to ensure preservation of the Geometry and hence avoid clearing any cached validation state. Its expected that speedups as a result of this are of order 1000. In addition, minor improvements include:
Its expected that such caching provides significant speedups where applicable. |
The isValid algorithm seems very slow.
Identified points to improve so far:
The text was updated successfully, but these errors were encountered: