Module simpa.core

Class SimpleTriangulator

java.lang.Object
simpa.core.api.utils.SimpleTriangulator

public class SimpleTriangulator extends Object
Class for simple triangulation between profiles. Intended to create extruded open or closed surfaces along some path.
  • Constructor Details

    • SimpleTriangulator

      public SimpleTriangulator(Profile profile, Profile next)
      Create a triangulation between two profiles. The profiles must have the same number of points. The profile list is deep copied, so the original profiles are not modified.
      Parameters:
      profile - First profile
      next - Next profile
    • SimpleTriangulator

      public SimpleTriangulator(List<Profile> pl, boolean circular)
      Create a triangulation between profiles. The profiles must have the same number of points. The profile list is deep copied, so the original profiles are not modified.
      Parameters:
      pl - List of profiles
      circular - If true, the first and the last profile will be connected.
  • Method Details

    • getSurface

      public Triangulation getSurface()
      Returns:
      Tringulated surface resulting from the profiles open at the ends.
    • getSurfaceWithEndCups

      public Triangulation getSurfaceWithEndCups()
      Create a triangulation with end cups. The end cups are created by connecting the center of the profiles at the ends with the points of the profile. can be called only for non circular regions.
      Returns:
      The triangulation with end cups
    • triangulateProfile

      public Triangulation triangulateProfile(Profile profile, boolean entry)
      Create a triangulation by connecting the center point of the profile with the points of the profile.
      Parameters:
      profile - Profile
      entry - Entry or exit cup. This determines the direction of the normal vector.
      Returns:
      The triangulation .