mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 09:43:20 +02:00
ae8d393859
That's commits84f9d3c3b4
and7ca942d0e9
41 lines
995 B
Bash
Executable File
41 lines
995 B
Bash
Executable File
#!/bin/sh
|
|
. ./Common
|
|
|
|
###############################################################################
|
|
|
|
tst "bug: p2d_no_intersect could wrap around and bite itself" <<EOF
|
|
struct p2d *p = p2d_new();
|
|
|
|
p2d_append(p, v2d_new(0, 0));
|
|
p2d_append(p, v2d_new(1, 27.8058649225));
|
|
p2d_append(p, v2d_new(1, 2));
|
|
p2d_close(p);
|
|
p2d_area(p, 3, 3);
|
|
EOF
|
|
|
|
expect <<EOF
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
tst "bug: collinear path segments tripped angle_3" <<EOF
|
|
struct p2d *p = p2d_new();
|
|
struct p2d *q;
|
|
|
|
p2d_append(p, v2d_new(0, 0));
|
|
p2d_append(p, v2d_new(1, 27.8058649225));
|
|
p2d_append(p, v2d_new(1, 2.0947540869));
|
|
p2d_append(p, v2d_new(1, 2));
|
|
p2d_close(p);
|
|
q = p2d_area(p, 3, 3);
|
|
p2d_write_gnuplot_all(stdout, q);
|
|
EOF
|
|
|
|
# Not output since the polygon is too small. This did not cause the above bug
|
|
# but just happened to be a property of the problem polygon.
|
|
|
|
expect <<EOF
|
|
EOF
|
|
|
|
###############################################################################
|