Commit Graph

64306 Commits

Author SHA1 Message Date
Panagiotis Cheilaris 761f6f720b removal of too-strong assertion in iecf
This is a fix for the following input (r2minpt.cin):

s -91 36 36 87
p -23 4
p -17 37
p -17 40

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:27 +02:00
Panagiotis Cheilaris 14c220e670 fix of debug message (q->r)
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:27 +02:00
Panagiotis Cheilaris 65fdf43fd1 in vsqr check for same_slope_at_corner
Avoid computing a predicate for the support line of a query segment,
if that segment has a common endpoint with another segment and this
endpoint also defines the vertex and also the two segments have the
same slope. In that case, the sl value should be ZERO.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:27 +02:00
Panagiotis Cheilaris 4d8b3c020f show sl value in debug message
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:27 +02:00
Panagiotis Cheilaris 6132650bd6 have_same_slope predicate
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:27 +02:00
Panagiotis Cheilaris 287612533d choose segment direction with distance
Use the most distant point to choose segment direction in
the bisector of two segments computation.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris 9208ebfbd7 return SMALLER in linf_refine, only for h/v lines
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris b65c265d51 set on oriented boundary, when endpoint
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris b086dfd879 show cmplabsxy value in debug
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris 9ff68f92ce show sl in a debug message
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris 926f5ec0ca change type of numpts_in_pqr to unsigned int
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris ef23e1a490 validity test simplification
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris 1f5df0aad8 if endpoint of segment, then ON_ORIENTED_BOUNDARY
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris 2d852f3e31 SDG Linf insertion function from SDG L2
These new insert functions are from the SDG L2 code and will be
useful for the test_sdg_new_range_api test for the SDG Linf code.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:26 +02:00
Panagiotis Cheilaris c4c5e451ab support input of one-point polygons in demo
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris dc55fd82f2 ipescript ipe2plg converts ipe to plg format
The script ipe2plg converts all paths and points
in the first page of the ipe file given as the command
line argument to the polygon .plg format of CGAL.
The result is printed to the standard output.
Use redirection to save to a .plg file.

The file ipe2plg.lua has to be put in the appropriate
place, e.g., ~/.ipe/scripts/ and here is an example use:

ipescript ipe2plg test1.ipe > test1.plg

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris 057f581e83 insert_point_on_segment correct neighbors
This fixes the computation of neighbors for
insert_point_on_segment and is the same as the
insert_exact_point_on_segment fix.

Here are some inputs that are affected.

(5sqin.cin)

s 0 0 0 100
s 0 100 100 100
s 100 100 100 0
s 0 0 100 0
s -100 50 150 50

(lala3.cin)

s 1 2 3 2
s 13 25 13 25
s 27 24 54 24
s 43 31 43 35
s 41 51 71 51
s 57 93 57 141
s 75 117 96 117
s 143 95 143 143
s 81 162 117 162
s 101 171 101 211
s 189 156 222 156
s 219 123 219 219
s 121 199 199 199
s 229 159 229 229
s 156 186 246 186

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris 4060e41f69 insert_point_on_segment neighbor assertion
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris d67b1987f7 check correct number splitting site neighbors
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris c734497e6e insert_exact_point_on_segment correct connection
I might have to do the same with insert_point_on_segment.

This fixes a bug in the validity check of diammid1.cin:
s -200 0 0 200
s 0 -200 200 0
s -200 0 0 -200
s 0 200 200 0
p 100 100
p -100 -100
p 100 -100
p -100 100

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris 05289ca9b9 set otherf and f_i
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris dac4146698 debug show otherf, f_i, otherg, g_i
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:25 +02:00
Panagiotis Cheilaris b4cae70cce debug message about flips_nop and flips_pon
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris a5d6cafd79 strong check of easy degenaracies
This fixes a bug in validity check of ipe10gperm.cin:

s	10	120	60	20
s	30	110	100	40
s	60	40	70	60

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 2abab31e98 return zero for equivalent points
This avoids a ping-pong effect in the PSSP case.

It fixes the validity check of the following input br50noseg.cin:

s -50 -20    0 +30
s   0 +30  +50 -20
p -20   0
p +20   0

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris c56a0a004d in PSSP case check fast: t endpoint of hv segment
This is to fix validity checks of inputs like (rx8m8var.cin):

s -11 82 -11 4
p 58 60
p 89 1
p -11 16
s -11 16 89 1

This fixes the validity check of point t = p -11 82.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 25c8765c5e print message for r too
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 8cb21ad305 better debug message in vring (show segments)
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 86294a01b2 in PSSP case check fast: t is endpoint of segments
This is to fix validity checks of inputs like (rx8m8var.cin):

s -11 82 -11 4
p 58 60
p 89 1
p -11 16
s -11 16 89 1

This fixes point t = p -11 16, but I still have to fix
point t = p -11 82.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 2edced7122 format better debugging messages
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 5af17c6a3e removal of two too strong assertions
The following inputs had problems before this fix:

(s2.cin)
s -100 50 200 -100
p 0 100
p 0 150
p 0 0

(s2hor.cin)
s -100 50 200 -100
p 100 0
p 150 0
p 0 0

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:24 +02:00
Panagiotis Cheilaris 5ffb9e29dc use of new tie breaking predicates
Many changes to support the tie breaking predicates
in the implementation and the declaration part of
the algorithm class.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris 1980d9d31b tie breaking versions of oriented_side predicates
They have an additional point dummy argument in class
Oriented_side_C2.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris ce499e0e4b compute f0_no, f0_op, f0_po, f0_on in split
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris b7b6e13a91 remove tie-breakers in Oriented_side_C2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris 9e638f78b7 validity check fix for vring code
This fixes validity checking for spl1.cin input (and others):
s -100 110 200 80
s 200 80 -110 -190
p 0 0
p 0 100

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris dd3c65ccb3 inside sides point checking and fix for validity
I added point_inside_touching_sides_v function
in vsqrnew code, which is an adaptation of the
respective vring code.

This fixes, among other things, the validity checking
of input ppswedge.cin:
s -200 -200 0 0
s -200 200 0 0

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris b6ae8e5e7e check also for hqref of segment
The check for point t against a segment s is too
strong at the moment. I have to implement a predicate
similar to point_inside_touching_sides of the ring code.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris 6bf9993ef4 remove a return zero just after checking point p
Before this fix, the point t was not tested at all with
segments q or r.

This fixes a bug for input (v4nox.cin):

s 100 100 300 300
s -100 110 200 80
p 0 150

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:23 +02:00
Panagiotis Cheilaris c859b91a72 check point_inside_touching_sides
If point t is inside any of the two sides of the square
that touch the touching corner of a segment s in p, q, r,
then return negative.

Use helper function point_inside_touching_sides.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris f02dc5e1c3 compute positive or negative slope 45 degree lines
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris 49c42babc5 debig message for zero return value in q: segment
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris 7385566aa8 tie-breaker for finite vertex Oriented_side_C2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris ac272f4e67 rename proj_of_infv to testpnt in Oriented_side_C2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris 6b24bd98ad debug: show inf Oriented_side zero override
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris a592ff776b count nop and pon zeros in find_faces_to_split
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris 6771413f74 move os0_fc_start setting just after os setting
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris b260448f11 debug: print results at end of find_faces_to_split
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:22 +02:00
Panagiotis Cheilaris f443754b00 first found f1 or f2 assertions
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:21 +02:00
Panagiotis Cheilaris d513c40258 new face_output function in impl SDG Linf class
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:21 +02:00