Class CrossSection2D

java.lang.Object
cz.fidentis.analyst.data.shapes.CrossSection2D

public class CrossSection2D extends Object
A 2D cross-section curve computed from CrossSection3D.
  • Constructor Details

    • CrossSection2D

      public CrossSection2D(List<List<javax.vecmath.Point2d>> curveSegments)
      Constructor used in tests.
      Parameters:
      curveSegments - list of curve segments
    • CrossSection2D

      public CrossSection2D(List<List<javax.vecmath.Point2d>> curveSegments, List<javax.vecmath.Point2d> featurePoints)
      Constructor. Projects the given 3d curve and its feature points into 2d.
      Parameters:
      curveSegments - list of curve segments
      featurePoints - 2d feature points lying close to the curve
  • Method Details

    • getFeaturePoints

      public List<javax.vecmath.Point2d> getFeaturePoints()
    • getCurveSegments

      public List<List<javax.vecmath.Point2d>> getCurveSegments()
    • getNormals

      public List<Line2D> getNormals()
    • setNormals

      public void setNormals(List<Line2D> normals)
    • setNormalAt

      public void setNormalAt(int index, Line2D normal)
      Sets normal vector at the given index
      Parameters:
      index - index
      normal - normal vector
    • subSample

      public CrossSection2D subSample(int sampling)
      Returns a reduced curve according to sampling
      Parameters:
      sampling - numerical representation of how much we want to keep the original curve 100 will keep the original, 0 will be fully reduced
      Returns:
      reduced list of points
    • hausdorffDistance

      public double hausdorffDistance(CrossSection2D curve, int sampling)
      Returns 2D Hausdorff distance.
      Parameters:
      curve - Another curve
      sampling - Sub-sampling
      Returns:
      2D Hausdorff distance
    • isEndPoint

      public boolean isEndPoint(javax.vecmath.Point2d point)
      Return true if given point is an endpoint of a curve.
      Parameters:
      point - point of curve
      Returns:
      true if point is and endpoint of one of curve segments