public abstract class Abstract2dModel extends Object
Implements IModel interface and adds convenient methods to make it easier to move or rotate the 2D models. Every primitive 2D object and 2D transition extend this class.
Modifier | Constructor and Description |
---|---|
protected |
Abstract2dModel(Coords2d move) |
Modifier and Type | Method and Description |
---|---|
Boundaries2d |
getBoundaries2d()
Calculate the including cuboid for the current model.
|
protected abstract Collection<Area2d> |
getInnerPointCircle(FacetGenerationContext context) |
protected abstract Boundaries2d |
getModelBoundaries() |
Collection<Area2d> |
getPointCircle(FacetGenerationContext context)
Returns with a list of points which forms the shape.
|
protected abstract SCAD |
innerToScad(IColorGenerationContext context)
Generates the OpenSCAD representation of the model without.
|
abstract Abstract2dModel |
move(Coords2d delta)
Moves this object by the given coordinates.
|
SCAD |
toScad(IColorGenerationContext context)
Renders this model and returns with the generated OpenSCAD code.
|
protected final Coords2d move
protected Abstract2dModel(Coords2d move)
protected abstract SCAD innerToScad(IColorGenerationContext context)
protected abstract Boundaries2d getModelBoundaries()
public Boundaries2d getBoundaries2d()
public SCAD toScad(IColorGenerationContext context)
context
- the color context to be used for the generationpublic abstract Abstract2dModel move(Coords2d delta)
delta
- the coordinates used by the moveprotected abstract Collection<Area2d> getInnerPointCircle(FacetGenerationContext context)
public final Collection<Area2d> getPointCircle(FacetGenerationContext context)
context
- the context to be used for the generationCopyright © 2014–2020, Printing in 3D. All rights reserved.