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, toScad
public 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)
Abstract2dModel
innerToScad
in class Abstract2dModel
protected Boundaries2d getModelBoundaries()
getModelBoundaries
in class Abstract2dModel
public Abstract2dModel move(Coords2d delta)
Abstract2dModel
move
in class Abstract2dModel
delta
- the coordinates used by the movepublic Collection<Area2d> getInnerPointCircle(FacetGenerationContext context)
getInnerPointCircle
in class Abstract2dModel
Copyright © 2014–2020, Printing in 3D. All rights reserved.