public class Polygon extends Abstract2dModel
move| Modifier | Constructor and Description |
|---|---|
protected |
Polygon(Coords2d move,
List<Coords2d> coords) |
|
Polygon(List<Coords2d> coords)
Creates a polygon.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<Area2d> |
getInnerPointCircle(FacetGenerationContext context) |
protected Boundaries2d |
getModelBoundaries() |
protected SCAD |
innerToScad(IColorGenerationContext context)
Generates the OpenSCAD representation of the model without.
|
Abstract2dModel |
move(Coords2d delta)
Moves this object by the given coordinates.
|
getBoundaries2d, getPointCircle, toScadpublic Polygon(List<Coords2d> coords)
Creates a polygon. The polygon consists of the given coordinates. The polygon is always closed, so it has an edge between the last and first coordinates.
The given list should contain at least 3 coordinates, otherwise an
IllegalValueException is thrown.
coords - the coordinatesIllegalValueException - in case the given list contains
fewer than 3 elementsprotected SCAD innerToScad(IColorGenerationContext context)
Abstract2dModelinnerToScad in class Abstract2dModelprotected Boundaries2d getModelBoundaries()
getModelBoundaries in class Abstract2dModelpublic Abstract2dModel move(Coords2d delta)
Abstract2dModelmove in class Abstract2dModeldelta - the coordinates used by the movepublic Collection<Area2d> getInnerPointCircle(FacetGenerationContext context)
getInnerPointCircle in class Abstract2dModelCopyright © 2014–2020, Printing in 3D. All rights reserved.