public class DxfLWPolyline extends DxfEntity
A LWPOLYLINE represents not just a multi-segment polyline in 3D space, but also allows specification of extrusions and bulges, so the segments may in fact be curves. A LWPOLYLINE is a more compact version of a POLYLINE; it uses repeated coordinate groups instead of individual VERTEX objects. More recent versions of AutoCAD automagically convert most POLYLINE objects to LWPOLYLINE objects when loading.
Representation of component groups is direct except for "polyline flag" (code 70), which we split into two booleans, closed and plinegen. The properties repeated for each vertex are are represented by DxfLWPolylineVertex objects.
Primary reference is pages 81-82 of AutoCAD 2007 DXF Reference, available from the AutoDesk website.
Copyright 2000-2006 Partner Software, Inc.
| Constructor and Description |
|---|
DxfLWPolyline() |
| Modifier and Type | Method and Description |
|---|---|
double |
getConstantWidth()
Constant width, code 43, optional, default 0.
|
double |
getElevation()
Elevation, code 38, optional, default 0.
|
double |
getExtrusionX()
Extrusion direction X, group 210, optional, default 0.
|
double |
getExtrusionY()
Extrusion direction Y, group 220, optional, default 0.
|
double |
getExtrusionZ()
Extrusion direction Z, group 230, optional, default 1.
|
java.util.List<DxfGroup> |
getGroups(DxfVersion version)
Get the internal state as DXFGroups.
|
double |
getThickness()
Thickness, code 39, optional, default 0.
|
java.lang.String |
getType()
The type name of this structure.
|
java.util.List<DxfLWPolylineVertex> |
getVertices()
Vertices.
|
boolean |
isClosed()
True if polyline should be closed.
|
boolean |
isPlinegen()
True if plinegen is set.
|
void |
setClosed(boolean closed) |
void |
setConstantWidth(double constantWidth) |
void |
setElevation(double elevation) |
void |
setExtrusionX(double extrusionX) |
void |
setExtrusionY(double extrusionY) |
void |
setExtrusionZ(double extrusionZ) |
void |
setGroups(java.util.List<DxfGroup> groups)
Set the internal state based on the given groups.
|
void |
setPlinegen(boolean plinegen) |
void |
setThickness(double newThickness) |
void |
setVertices(java.util.List<DxfLWPolylineVertex> vertices)
Sets the vertex list, replacing the old list.
|
java.lang.String |
toString() |
getApplicationDefinedStructures, getColor, getColorName, getHandle, getLayer, getLinetype, getLinetypeScale, getLineWeight, getMaterial, getOwnerHandle, getPlotStyle, getProxyEntityGraphics, getRgbColor, getShadowMode, getTransparency, isInvisible, isPaperSpace, setApplicationDefinedStructures, setColor, setColorName, setHandle, setInvisible, setLayer, setLinetype, setLinetypeScale, setLineWeight, setMaterial, setOwnerHandle, setPaperSpace, setPlotStyle, setProxyEntityGraphics, setRgbColor, setShadowMode, setTransparencypublic java.lang.String getType()
DxfStructure
\/**
* Type name of this structure. Always returns "POINT".
* \@return "POINT"
*\/
public String getType() {
return "POINT";
}
getType in interface DxfStructuregetType in class DxfEntitypublic java.util.List<DxfGroup> getGroups(DxfVersion version)
DxfStructuregetGroups in interface DxfStructuregetGroups in class DxfEntitypublic void setGroups(java.util.List<DxfGroup> groups)
DxfStructuresetGroups in interface DxfStructuresetGroups in class DxfEntitygroups - list of groups containing data for this structurepublic java.lang.String toString()
toString in class java.lang.Objectpublic double getThickness()
public void setThickness(double newThickness)
public boolean isClosed()
This is derived from the 1-bit in group 70 (polyline flag).
public void setClosed(boolean closed)
public double getConstantWidth()
Not used if variable widths (startWidth/endWidth on DxfLWPolylineVertex) are set.
public void setConstantWidth(double constantWidth)
constantWidth - the constantWidth to setpublic double getElevation()
public void setElevation(double elevation)
public double getExtrusionX()
public void setExtrusionX(double extrusionX)
public double getExtrusionY()
public void setExtrusionY(double extrusionY)
public double getExtrusionZ()
public void setExtrusionZ(double extrusionZ)
public boolean isPlinegen()
This is derived from the 128-bit in group 70 (polyline flag).
public void setPlinegen(boolean plinegen)
public java.util.List<DxfLWPolylineVertex> getVertices()
public void setVertices(java.util.List<DxfLWPolylineVertex> vertices)
vertices - new list of vertices