math.geom2d.circulinear.buffer
Class BufferCalculator
- java.lang.Object
-
- math.geom2d.circulinear.buffer.BufferCalculator
-
public class BufferCalculator extends java.lang.ObjectCompute the buffer of a circulinear curve or domain, and gather some methods for computing parallel curves.This class can be instantiated, but also contains a lot of static methods. The default instance of BufferCalculator is accessible through the static method 'getDefaultInstance'. The public constructor can be called if different cap or join need to be specified.
-
-
Constructor Summary
Constructors Constructor and Description BufferCalculator()Creates a new buffer calculator with default join and cap factories.BufferCalculator(JoinFactory joinFactory, CapFactory capFactory)Creates a new buffer calculator with specific join and cap factories.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description CirculinearDomain2DcomputeBuffer(CirculinearCurve2D curve, double dist)Compute the buffer of a circulinear curve.CirculinearDomain2DcomputeBuffer(PointSet2D set, double dist)Compute buffer of a point set.CirculinearContinuousCurve2DcreateContinuousParallel(CirculinearContinuousCurve2D curve, double dist)Compute the parallel curve of a Circulinear and continuous curve.CirculinearCurve2DcreateParallel(CirculinearCurve2D curve, double dist)Computes the parallel curve of a circulinear curve (composed only of pieces of lines and circles).CirculinearBoundary2DcreateParallelBoundary(CirculinearBoundary2D boundary, double dist)CirculinearContour2DcreateParallelContour(CirculinearContour2D contour, double dist)static BufferCalculatorgetDefaultInstance()Returns the default instance of bufferCalculator.
-
-
-
Constructor Detail
-
BufferCalculator
public BufferCalculator()
Creates a new buffer calculator with default join and cap factories.
-
BufferCalculator
public BufferCalculator(JoinFactory joinFactory, CapFactory capFactory)
Creates a new buffer calculator with specific join and cap factories.
-
-
Method Detail
-
getDefaultInstance
public static BufferCalculator getDefaultInstance()
Returns the default instance of bufferCalculator.
-
createParallel
public CirculinearCurve2D createParallel(CirculinearCurve2D curve, double dist)
Computes the parallel curve of a circulinear curve (composed only of pieces of lines and circles). The result is itself a circulinear curve.
-
createParallelBoundary
public CirculinearBoundary2D createParallelBoundary(CirculinearBoundary2D boundary, double dist)
-
createParallelContour
public CirculinearContour2D createParallelContour(CirculinearContour2D contour, double dist)
-
createContinuousParallel
public CirculinearContinuousCurve2D createContinuousParallel(CirculinearContinuousCurve2D curve, double dist)
Compute the parallel curve of a Circulinear and continuous curve. The result is itself an instance of CirculinearContinuousCurve2D.
-
computeBuffer
public CirculinearDomain2D computeBuffer(CirculinearCurve2D curve, double dist)
Compute the buffer of a circulinear curve.The algorithm is as follow:
- split the curve into a set of curves without self-intersections
- for each split curve, compute the contour of its buffer
- split self-intersecting contours into set of disjoint contours
- split all contour which intersect each other to disjoint contours
- remove contours which are too close from the original curve
- create a new domain with the final set of contours
-
computeBuffer
public CirculinearDomain2D computeBuffer(PointSet2D set, double dist)
Compute buffer of a point set.
-
-
DMelt 3.0 © DataMelt by jWork.ORG