Barend Gehrels
cd0ec07f64
[geometry] Minor - pass ringtype separately
...
(further this change was part of a non-committed change)
2014-01-08 13:26:00 +01:00
Barend Gehrels
b889923619
[geometry] Take care that FP ratio (which is still used) is between 0-1 too.
...
If not we take the robust ratio.
This fixes case ticket_9081_15 where the intersection point was far outside
the belonging segment (causing a new spike)
2013-12-22 14:16:15 +01:00
Barend Gehrels
1a1cb4cff0
[geometry] Moved debug string
2013-12-22 14:14:37 +01:00
Barend Gehrels
9cd79d8033
[geometry] Instead of (non-rescaled) append, we clean rescaled dups afterwards.
...
We don't do it on the fly to avoid additional rescaling, it is done only once per point
This also changes occasionally some number-of-points in testcases (now more cleaned)
2013-12-22 14:12:40 +01:00
Barend Gehrels
2c2c384652
[geometry] Remove sanity check as planned
2013-12-22 13:43:55 +01:00
Barend Gehrels
50f8696aaf
[geometry] Let has_intersections also rescale
2013-12-22 13:42:51 +01:00
Barend Gehrels
f467f6ff31
[geometry] Avoid using Boost.Rational for all comparisons
...
Only if values are close, we resort to Boost.Rational (for int) for exact comparisons.
This avoids most conversions.
2013-12-21 17:58:59 +01:00
Barend Gehrels
0333e7c313
[geometry] replaced boost::rational with segment_ratio which is more specialized for our needs.
...
segment_ratio contains specific methods (on a segment the ratio is [0..1]) and
can be based on double or float too (Boost.Rational cannot do that).
Boost.Rational is still used under the hood for comparisons (which will be
made more efficient later)
2013-12-21 17:35:44 +01:00
Barend Gehrels
ef3992a921
[geometry] big cleanup removed old code from cart_intersect
2013-12-20 19:10:42 +01:00
Barend Gehrels
b00311f502
[geometry] Removed (need for) arrangment and moved disjoint.
...
Disjoint is now based on ratios too. All is now based on ratios, greatly
simplifying the original code with many lines and conditions.
2013-12-20 19:06:05 +01:00
Barend Gehrels
e0d9036aef
[geometry] removed segment_equal, now all collinear go to one fuction.
...
Function now renamed to segments_collinear, and the other to segments_crosses
We calculate opposite now only in "direction", where it is used to pass through.
That one also checks on equality
Test 5103 now (or with previous action for touches) also passes again.
2013-12-20 18:50:08 +01:00
Barend Gehrels
4a5b85c870
[geometry] Collinear touch now also uses new unified method
...
This fixes the holes_intersect_and_touch case
NOTE: method should now be renamed, not ...two_intersection_points
2013-12-19 22:38:52 +01:00
Barend Gehrels
06b03d534c
[geometry] Let rescale derive from not_implemented as is new style
2013-12-19 22:36:38 +01:00
Barend Gehrels
f3d1fb4736
[geometry] Bugfix in rescaling, points may not be const& (of course)
...
They were initialized from local variables and returned
2013-12-19 22:35:54 +01:00
Barend Gehrels
9a9efcff89
[geometry] Work in progress: factor (rational) instead of distance
...
This is a large commit. It replaces enriched.distance with factor. Factor
is based on integer calculations, calculated in cart_intersect, from the
passed robust points, so always trustable.
We had to do this because without certain tests failed because of FP
problems with distance (calculated with FP).
This commit also greatly simplifies relate_collinear, where most things and checks
are replaced by simple unified calculations. This is also based on robust
fractions (but could have been done earlier).
Many (but not all) testcases commented in previous commit are now uncommented
again, they now work thanks to the fractions. There are also testcases
uncommented which now work correctly using clang/Linux
This commit breaks compiling disjoint (because of rescale), and running buffer
(also because of rescale), and some more (probably all because or rescaling),
this has to be fixed soon after.
2013-12-18 19:19:10 +01:00
Barend Gehrels
107621943d
[geometry] Use robust determinant for comparisons
...
This breaks one extra testcase which should be verified later
2013-12-14 19:49:35 +01:00
Barend Gehrels
c173233efa
[geometry] Propagated rescale_policy further / from earlier phase
2013-12-14 19:45:21 +01:00
Barend Gehrels
a77aef8d16
Merge branch 'develop' into rescale_to_integer
2013-12-14 16:54:04 +01:00
Barend Gehrels
ce38ea7072
[geometry] Adapted buffer for recent changes in within
2013-12-14 16:52:47 +01:00
Barend Gehrels
ff7cb5c21e
Merge branch 'develop' into rescale_to_integer
2013-12-14 13:38:28 +01:00
Barend Gehrels
d988e1ac93
[geometry] Work in progress: rescaling to robust-type
...
A robust type is integer for float/double. The rescaled points will only
be used for side-information and equality and distance-comparisons, not
to calculate the intersection points themselves.
Currently the code is #ifdefed
2013-12-14 13:25:46 +01:00
Adam Wulkiewicz
a238da019b
[geometry] added touches(Ls, Poly), added details for other combinations of linear-areal geometries
2013-12-14 04:01:32 +01:00
Adam Wulkiewicz
5ce07d86f6
[geometry] touches generic_interrupt_policy fixed to not update the state if non-touching turn was found earlier
2013-12-12 03:33:48 +01:00
Adam Wulkiewicz
f78626b0f2
[geometry] added parameters reversal for touches()
2013-12-11 17:28:52 +01:00
Adam Wulkiewicz
5b417cc66b
[geometry] touches(Ls,Ls) algorithm modified
2013-12-11 11:47:16 +01:00
Adam Wulkiewicz
a0cca4848a
[geometry] removed a condition in touches(Ls, Ls) for consistency
2013-12-11 02:14:05 +01:00
Adam Wulkiewicz
8d690ff164
[geometry] added touches(Ls, Ls) + tests
2013-12-11 02:08:54 +01:00
Adam Wulkiewicz
f95efb34ee
[geometry] added tests for touches(Pt, MLs) and touches(Pt, MPoly), fixed error in point_in_geometry(Pt, MLs), fixed error in within(Pt, MLs) tests
2013-12-11 01:42:25 +01:00
Adam Wulkiewicz
437c94ad77
added touches(Point, Geometry)
2013-12-11 00:24:16 +01:00
Adam Wulkiewicz
54434f6e82
[geometry] generic touches implementation moved to detail::touches::generic_touches, added dispatch::touches used in bg::touches
2013-12-10 21:39:39 +01:00
Adam Wulkiewicz
9d34be1c09
[geometry] optimization: equals::has_only_turns() replaced by interrupt policy
2013-12-10 21:26:23 +01:00
Adam Wulkiewicz
7fae091c72
added point_in_geometry_dispatch for Box
2013-12-09 22:44:02 +01:00
Adam Wulkiewicz
c211dd01db
Merge branch 'develop' of github.com:boostorg/geometry into develop
2013-12-09 22:39:37 +01:00
Barend Gehrels
f999c1b1a7
[geometry] added ring/polygon rescaling
2013-12-09 22:11:25 +01:00
Barend Gehrels
24fddebe8c
[geometry] handle unhandled iu/iu case
2013-12-09 22:02:46 +01:00
Adam Wulkiewicz
4d195e28b0
[geometry] types renamed in within_no_turns
2013-12-09 04:20:29 +01:00
Adam Wulkiewicz
ffa81b45e0
[geometry] added tests for intersects()
2013-12-08 14:42:17 +01:00
Adam Wulkiewicz
8ef20f9f88
added disjoint() for previously non-supported Geometries
2013-12-08 13:20:01 +01:00
Adam Wulkiewicz
5436fb2cfa
added within() and covered_by() for Pt-Ls and Pt-MLs, fixed error in point_in_geometry for MLs
2013-12-08 12:36:31 +01:00
Adam Wulkiewicz
004908caf9
[geometry] added support for MultiLinestrings in copy_segment_point, point_on_border, range_by_section, sectionalize, ring_return_type, ring_type
2013-12-08 02:28:46 +01:00
Adam Wulkiewicz
a34c03ff3b
[geometry] compilation errors fixed in point_in_geometry/within/covered_by for multi geometries
2013-12-08 02:23:56 +01:00
Adam Wulkiewicz
72205cf03e
[geometry] added point_in_geometry() and used in within() and covered_by(), also added within_no_turns()
2013-12-08 00:41:39 +01:00
Barend Gehrels
c06e55af16
[geometry] Minor trivial change
2013-12-07 11:37:12 +01:00
Barend Gehrels
32eb7090d5
[geometry] Use rescale_policy in enrich_intersection_points and sectionalize
...
Also in get_turns forward them further up to point-comparison
2013-12-07 11:36:42 +01:00
Barend Gehrels
f100acae4e
[geometry] Silenced (some) warnings in extension code
2013-12-07 11:28:41 +01:00
Barend Gehrels
f9469b91f1
[geometry] Fixed projection example/test
2013-12-07 11:24:21 +01:00
Barend Gehrels
59969ce883
[geometry] removed parameters in private functions which were unused
...
(They are unused because we now pass the "sides" struct with this information).
This also makes the corresponding parameters for the main entry redundant,
so we can remove them too, later
2013-12-05 22:50:43 +01:00
Barend Gehrels
6bdc8c0d02
[geometry] Remove unused parameters in get_turn_info and direction
2013-12-05 22:31:17 +01:00
Barend Gehrels
88c365a45d
[geometry] Remove all trailing spaces (extensions)
2013-12-05 19:42:44 +01:00
Barend Gehrels
eb3260708e
[geometry] Remove all trailing spaces (algorithms)
2013-12-05 19:36:58 +01:00