Documentation of 'math.geom2d.circulinear.buffer.BufferCalculator' Java class
BufferCalculator
math.geom2d.circulinear.buffer

Class BufferCalculator



  • public class BufferCalculator
    extends java.lang.Object
    Compute 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 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.
      • computeBuffer

        public CirculinearDomain2D computeBuffer(CirculinearCurve2D curve,
                                                 double dist)
        Compute the buffer of a circulinear curve.

        The algorithm is as follow:

        1. split the curve into a set of curves without self-intersections
        2. for each split curve, compute the contour of its buffer
        3. split self-intersecting contours into set of disjoint contours
        4. split all contour which intersect each other to disjoint contours
        5. remove contours which are too close from the original curve
        6. create a new domain with the final set of contours

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.