Let the buffer create sharp corners. More...
#include <buffer_join_miter.hpp>
Public Member Functions | |
join_miter (double miter_limit=5.0) | |
Constructs the strategy. More... | |
template<typename Point , typename DistanceType , typename RangeOut > | |
bool | apply (Point const &ip, Point const &vertex, Point const &perp1, Point const &perp2, DistanceType const &buffer_distance, RangeOut &range_out) const |
Fills output_range with a sharp shape around a vertex. More... | |
template<typename NumericType > | |
NumericType | max_distance (NumericType const &distance) const |
Let the buffer create sharp corners.
This strategy can be used as JoinStrategy for the buffer algorithm. It creates a sharp corners around each convex vertex. It can be applied for (multi)linestrings and (multi)polygons. If corners are sharp by themselves, the miters might become very long. Therefore there is a limit (miter_limit), in terms of the used distance, which limits their length. The miter is not changed to a bevel form (as done in some other software), it is just adapted to the specified miter_limit but keeps its miter form. This strategy is only applicable for Cartesian coordinate systems.
{ [heading Example] [buffer_join_miter] [heading Output] [$img/strategies/buffer_join_miter.png] [heading See also]
|
inlineexplicit |
Constructs the strategy.
miter_limit | The miter limit, to avoid excessively long miters around sharp corners |
|
inline |
Fills output_range with a sharp shape around a vertex.
References boost::geometry::math::abs(), BOOST_ASSERT, boost::distance(), boost::geometry::equals(), max_distance(), boost::multiprecision::backends::p, boost::geometry::math::sqrt(), and boost::vertex().
|
inline |
Referenced by apply().