|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reprap.geometry.polygons.AllSTLsToBuild
public class AllSTLsToBuild
This class holds a list of STLObjects that represents everything that is to be built. An STLObject may consist of items from several STL files, possible of different materials. But they are all tied together relative to each other in space.
Nested Class Summary | |
---|---|
(package private) class |
AllSTLsToBuild.BoundingBox
3D bounding box |
(package private) class |
AllSTLsToBuild.LineSegment
Line segment consisting of two points. |
(package private) class |
AllSTLsToBuild.SliceCache
Ring buffer cache to hold previously computed slices for doing infill and support material calculations. |
Field Summary | |
---|---|
private AllSTLsToBuild.SliceCache |
cache
Recently computed slices |
private boolean |
frozen
Is the list editable? |
private java.util.List<STLObject> |
newstls
New list of things to be built for reordering |
private java.util.List<RrRectangle> |
rectangles
A plan box round each item |
private java.util.List<STLObject> |
stls
The list of things to be built |
private AllSTLsToBuild.BoundingBox |
XYZbox
The XYZ box around everything |
private RrInterval |
Zrange
The lowest and highest points |
Constructor Summary | |
---|---|
AllSTLsToBuild()
Simple constructor |
Method Summary | |
---|---|
void |
add(AllSTLsToBuild a)
Add a new collection |
void |
add(STLObject s)
Add a new STLObject |
private void |
addAllEdges(javax.media.j3d.Shape3D shape,
javax.media.j3d.Transform3D trans,
double z,
Attributes att,
java.util.ArrayList<AllSTLsToBuild.LineSegment>[] edges)
Run through a Shape3D and set edges from it at plane z Apply the transform first |
private void |
addEdge(javax.vecmath.Point3d p,
javax.vecmath.Point3d q,
javax.vecmath.Point3d r,
double z,
Attributes att,
java.util.ArrayList<AllSTLsToBuild.LineSegment>[] edges)
Add the edge where the plane z cuts the triangle (p, q, r) (if it does). |
private AllSTLsToBuild.BoundingBox |
BBox(java.lang.Object value,
javax.media.j3d.Transform3D trans)
Unpack the Shape3D(s) from value and find their exclosing XYZ box |
private AllSTLsToBuild.BoundingBox |
BBoxPoints(javax.media.j3d.Shape3D shape,
javax.media.j3d.Transform3D trans)
Run through a Shape3D and find its enclosing XYZ box |
RrPolygonList |
computeInfill(int stl,
LayerRules layerConditions)
Compute the infill hatching polygons for this set of patterns |
RrPolygonList |
computeOutlines(int stl,
LayerRules layerConditions,
RrPolygonList hatchedPolygons,
boolean shield)
Compute the outline polygons for this set of patterns. |
RrPolygonList |
computeSupport(int stl,
LayerRules layerConditions)
Compute the support hatching polygons for this set of patterns |
void |
destroyLayer()
|
private int |
findSTL(STLObject st)
Find an object in the list |
private void |
freeze()
Freeze the list - no more editing. |
STLObject |
get(int i)
Get the i-th STLObject |
STLObject |
getNextOne(STLObject st)
Find an object in the list and return the next one. |
private RrPolygon |
getNextPolygon(java.util.ArrayList<AllSTLsToBuild.LineSegment> edges)
Stitch together the some of the edges to form a polygon. |
double |
maxZ()
Find the top of the highest object. |
RrRectangle |
ObjectPlanRectangle()
Return the XY box round everything |
private void |
recursiveSetEdges(java.lang.Object value,
javax.media.j3d.Transform3D trans,
double z,
Attributes att,
java.util.ArrayList<AllSTLsToBuild.LineSegment>[] edges)
Unpack the Shape3D(s) from value and set edges from them |
void |
remove(int i)
Delete an object |
boolean |
reorderAdd(STLObject st)
Reorder the list under user control. |
private RrPolygonList |
simpleCull(java.util.ArrayList<AllSTLsToBuild.LineSegment> edges)
Get all the polygons represented by the edges. |
int |
size()
Return the number of objects. |
private BooleanGridList |
slice(int stl,
int layer,
LayerRules layerRules)
Generate a set of pixel-map representations, one for each extruder, for STLObject stl at height z. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.List<STLObject> stls
private java.util.List<RrRectangle> rectangles
private java.util.List<STLObject> newstls
private AllSTLsToBuild.BoundingBox XYZbox
private RrInterval Zrange
private boolean frozen
private AllSTLsToBuild.SliceCache cache
Constructor Detail |
---|
public AllSTLsToBuild()
Method Detail |
---|
public void add(STLObject s)
s
- public void add(AllSTLsToBuild a)
s
- public STLObject get(int i)
i
-
public void remove(int i)
i
- private int findSTL(STLObject st)
st
-
public STLObject getNextOne(STLObject st)
st
-
public int size()
public boolean reorderAdd(STLObject st)
st
-
private void freeze()
private AllSTLsToBuild.BoundingBox BBoxPoints(javax.media.j3d.Shape3D shape, javax.media.j3d.Transform3D trans)
shape
- trans
- z
- private AllSTLsToBuild.BoundingBox BBox(java.lang.Object value, javax.media.j3d.Transform3D trans)
value
- trans
- z
- public RrRectangle ObjectPlanRectangle()
public double maxZ()
private RrPolygon getNextPolygon(java.util.ArrayList<AllSTLsToBuild.LineSegment> edges)
edges
-
private RrPolygonList simpleCull(java.util.ArrayList<AllSTLsToBuild.LineSegment> edges)
edges
-
public RrPolygonList computeSupport(int stl, LayerRules layerConditions)
stl
- layerConditions
-
public RrPolygonList computeInfill(int stl, LayerRules layerConditions)
stl
- layerConditions
- startNearHere
-
public RrPolygonList computeOutlines(int stl, LayerRules layerConditions, RrPolygonList hatchedPolygons, boolean shield)
layerConditions
- hatchedPolygons
- shield
-
private BooleanGridList slice(int stl, int layer, LayerRules layerRules)
stl
- z
- extruders
-
public void destroyLayer()
private void addEdge(javax.vecmath.Point3d p, javax.vecmath.Point3d q, javax.vecmath.Point3d r, double z, Attributes att, java.util.ArrayList<AllSTLsToBuild.LineSegment>[] edges)
p
- q
- r
- z
- private void addAllEdges(javax.media.j3d.Shape3D shape, javax.media.j3d.Transform3D trans, double z, Attributes att, java.util.ArrayList<AllSTLsToBuild.LineSegment>[] edges)
shape
- trans
- z
- private void recursiveSetEdges(java.lang.Object value, javax.media.j3d.Transform3D trans, double z, Attributes att, java.util.ArrayList<AllSTLsToBuild.LineSegment>[] edges)
value
- trans
- z
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |