1 | 86a87,88
|
---|
2 | > if(resizing == 0) return *this;
|
---|
3 | > if(empty()) return *this;
|
---|
4 | 90c92
|
---|
5 | < if(resizing > 0)
|
---|
6 | ---
|
---|
7 | > else
|
---|
8 | 92d93
|
---|
9 | < return *this;
|
---|
10 | 94,95c95
|
---|
11 | < if(resizing == 0) return *this;
|
---|
12 | < if(empty()) return *this;
|
---|
13 | ---
|
---|
14 | >
|
---|
15 | 103,105c103,109
|
---|
16 | < //make_arc(std::vector<point_data< T> >& return_points,
|
---|
17 | < //point_data< double> start, point_data< double> end,
|
---|
18 | < //point_data< double> center, double r, unsigned int num_circle_segments)
|
---|
19 | ---
|
---|
20 | >
|
---|
21 | > // scale arc up so that minimum radius corresponds to 'resizing',
|
---|
22 | > // for bug ticket #6063.
|
---|
23 | > const double our_pi=3.1415926535897932384626433832795028841971;
|
---|
24 | > double arcRadScaling = 1.0/cos(2.0*our_pi/double(num_circle_segments)/2.0);
|
---|
25 | > double arcRadius = double(std::abs(resizing))*arcRadScaling;
|
---|
26 | >
|
---|
27 | 107,109c111,112
|
---|
28 | < point_data<double> center(0.0, 0.0), start(0.0, (double)resizing);
|
---|
29 | < make_arc(circle, start, start, center, std::abs((double)resizing),
|
---|
30 | < num_circle_segments);
|
---|
31 | ---
|
---|
32 | > point_data<double> center(0.0, 0.0), start(0.0, arcRadius);
|
---|
33 | > make_arc(circle, start, start, center, arcRadius, num_circle_segments);
|
---|
34 | 116a120,127
|
---|
35 | >
|
---|
36 | > // Intersect with result of 'normal' (non-minkowski-sum) offset,
|
---|
37 | > // to remove offsets larger than the given 'resizing' when not near corners.
|
---|
38 | > // Also for bug ticket #6063
|
---|
39 | > polygon_set_data<coordinate_type> normal_offset_result(*this);
|
---|
40 | > normal_offset_result.bloat(std::abs(resizing));
|
---|
41 | > result = result & normal_offset_result;
|
---|
42 | >
|
---|
43 | 120a132
|
---|
44 | >
|
---|