java.lang.Object
simpa.core.api.utils.SimpleTriangulator
Class for simple triangulation between profiles. Intended to create extruded
open or closed surfaces along some path.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTriangulator
(List<Profile> pl, boolean circular) Create a triangulation between profiles.SimpleTriangulator
(Profile profile, Profile next) Create a triangulation between two profiles. -
Method Summary
Modifier and TypeMethodDescriptionCreate a triangulation with end cups.triangulateProfile
(Profile profile, boolean entry) Create a triangulation by connecting the center point of the profile with the points of the profile.
-
Constructor Details
-
SimpleTriangulator
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 profilenext
- Next profile
-
SimpleTriangulator
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 profilescircular
- If true, the first and the last profile will be connected.
-
-
Method Details
-
getSurface
- Returns:
- Tringulated surface resulting from the profiles open at the ends.
-
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
Create a triangulation by connecting the center point of the profile with the points of the profile.- Parameters:
profile
- Profileentry
- Entry or exit cup. This determines the direction of the normal vector.- Returns:
- The triangulation .
-