mirror of https://github.com/CGAL/cgal
simplification and fix of drawing a bis seg
This fixes a drawing bug in the demo with input 3segconstr.cin: s -268 65 238 71 s 206 -89 -241 -11 s -94 171 -155 -196 Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
This commit is contained in:
parent
591e821e01
commit
31d9dd1eed
|
|
@ -1180,24 +1180,21 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
CGAL_SDG_DEBUG( std::cout << "debug first check npts="
|
||||
<< npts << std::endl; );
|
||||
|
||||
if ((npts == 3) and
|
||||
((p.is_segment() and not l.has_on_positive_side(vqps))
|
||||
or(p.is_point() and not l.has_on_negative_side(vqps)))) {
|
||||
npts = 2;
|
||||
}
|
||||
if (npts == 4) {
|
||||
if ((p.is_segment() and not l.has_on_positive_side(vqps))
|
||||
or(p.is_point() and not l.has_on_negative_side(vqps))) {
|
||||
if (l.perpendicular(pnt).has_on_positive_side(vqps)) {
|
||||
npts = 2;
|
||||
}
|
||||
else {
|
||||
if (compare_x_2(vqps,points[1]) == EQUAL
|
||||
and compare_y_2(vqps,points[1]) == EQUAL) {
|
||||
npts = 2;
|
||||
} else {
|
||||
npts = 3;
|
||||
}
|
||||
if (not l.perpendicular(pnt).has_on_negative_side(vqps)) {
|
||||
npts = 2;
|
||||
} else {
|
||||
if ((p.is_segment() and not l.has_on_positive_side(vqps))
|
||||
or(p.is_point() and not l.has_on_negative_side(vqps))) {
|
||||
npts = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue