com.partnersoft.formats.dxf
Class DxfVertex

java.lang.Object
  extended by com.partnersoft.formats.dxf.DxfEntity
      extended by com.partnersoft.formats.dxf.DxfVertex
All Implemented Interfaces:
DxfStructure

public class DxfVertex
extends DxfEntity

A DXF VERTEX entity.

A VERTEX is a point in a POLYLINE. Despite the name, POLYLINEs and their VERTEXes can represent all kinds of shapes, including curves, polygons and polyface meshes.

Primary reference is pages 109-110 of the AutoCAD 2007 DXF Reference, available from the AutoDesk website.

Copyright 2000-2006 Partner Software, Inc.

Version:
$Id: DxfVertex.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis

Constructor Summary
DxfVertex()
           
 
Method Summary
 double getBulge()
          Bulge, code 42, optional, default 0.
 double getCurveFitTangentDirection()
          Curve fit tangent direction, code 50.
 double getEndWidth()
          Ending width, code 41, optional, default 0.
 java.util.List<DxfGroup> getGroups(DxfVersion version)
          Get the internal state as DXFGroups.
 int getPolyfaceMeshIndex1()
          Polyface mesh vertex index, code 71, optional, default 0.
 int getPolyfaceMeshIndex2()
          Polyface mesh vertex index, code 72, optional, default 0.
 int getPolyfaceMeshIndex3()
          Polyface mesh vertex index, code 73, optional, default 0.
 int getPolyfaceMeshIndex4()
          Polyface mesh vertex index, code 74, optional, default 0.
 double getStartWidth()
           
 java.lang.String getType()
          The type name of this structure.
 double getX()
          Location X, code 10, required.
 double getY()
          Location Y, code 10, required.
 double getZ()
          Location Z, code 10, required.
 boolean isCurveFitDefined()
          A curve-fit tangent is defined for this vertex.
 boolean isExtraVertex()
          Vertex is an extra created by curve fitting.
 boolean isPolyfaceMesh()
          Vertex is a polyface mesh vertex.
 boolean isPolygon3d()
          Vertex is a polygon mesh vertex.
 boolean isPolyline3d()
          Vertex is a 3D polyline vertex.
 boolean isSplineControlPoint()
          Vertex is a spline control point.
 boolean isSplineVertex()
          Vertex is a spline vertex created by spline-fitting.
 void setBulge(double bulge)
           
 void setCurveFitDefined(boolean curveFitDefined)
           
 void setCurveFitTangentDirection(double curveFitTangentDirection)
           
 void setEndWidth(double endWidth)
           
 void setExtraVertex(boolean extraVertex)
           
 void setGroups(java.util.List<DxfGroup> groups)
          Set the internal state based on the given groups.
 void setPolyfaceMesh(boolean polyfaceMesh)
           
 void setPolyfaceMeshIndex1(int polyfaceMeshIndex1)
           
 void setPolyfaceMeshIndex2(int polyfaceMeshIndex2)
           
 void setPolyfaceMeshIndex3(int polyfaceMeshIndex3)
           
 void setPolyfaceMeshIndex4(int polyfaceMeshIndex4)
           
 void setPolygon3d(boolean polygon3d)
           
 void setPolyline3d(boolean polyline3d)
           
 void setSplineControlPoint(boolean splineControlPoint)
           
 void setSplineVertex(boolean splineVertex)
           
 void setStartWidth(double startWidth)
           
 void setX(double x)
           
 void setY(double y)
           
 void setZ(double z)
           
 java.lang.String toString()
           
 
Methods inherited from class com.partnersoft.formats.dxf.DxfEntity
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, setTransparency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DxfVertex

public DxfVertex()
Method Detail

getType

public java.lang.String getType()
Description copied from interface: DxfStructure
The type name of this structure. Generally this will be the same for all instances of the same implementing Java class, so a typical example might be:
 \/**
  * Type name of this structure. Always returns "POINT".
  * \@return "POINT"
  *\/
 public String getType() {
     return "POINT";
 }
 

Specified by:
getType in interface DxfStructure
Specified by:
getType in class DxfEntity
Returns:
type name of structure as defined in AutoCAD DXF specification

getGroups

public java.util.List<DxfGroup> getGroups(DxfVersion version)
Description copied from interface: DxfStructure
Get the internal state as DXFGroups.

Specified by:
getGroups in interface DxfStructure
Overrides:
getGroups in class DxfEntity
Returns:
list of groups containing the state data for this structure

setGroups

public void setGroups(java.util.List<DxfGroup> groups)
Description copied from interface: DxfStructure
Set the internal state based on the given groups.

Specified by:
setGroups in interface DxfStructure
Overrides:
setGroups in class DxfEntity
Parameters:
groups - list of groups containing data for this structure

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getBulge

public double getBulge()
Bulge, code 42, optional, default 0.


setBulge

public void setBulge(double bulge)

isCurveFitDefined

public boolean isCurveFitDefined()
A curve-fit tangent is defined for this vertex.

This is derived from the 2-bit of vertex flags (code 70).


setCurveFitDefined

public void setCurveFitDefined(boolean curveFitDefined)

getCurveFitTangentDirection

public double getCurveFitTangentDirection()
Curve fit tangent direction, code 50.


setCurveFitTangentDirection

public void setCurveFitTangentDirection(double curveFitTangentDirection)

getEndWidth

public double getEndWidth()
Ending width, code 41, optional, default 0.


setEndWidth

public void setEndWidth(double endWidth)

isExtraVertex

public boolean isExtraVertex()
Vertex is an extra created by curve fitting.

This is derived from the 1-bit of vertex flags (code 70).


setExtraVertex

public void setExtraVertex(boolean extraVertex)

isPolyfaceMesh

public boolean isPolyfaceMesh()
Vertex is a polyface mesh vertex.

This is derived from the 128-bit of vertex flags (code 70).


setPolyfaceMesh

public void setPolyfaceMesh(boolean polyfaceMesh)

getPolyfaceMeshIndex1

public int getPolyfaceMeshIndex1()
Polyface mesh vertex index, code 71, optional, default 0.


setPolyfaceMeshIndex1

public void setPolyfaceMeshIndex1(int polyfaceMeshIndex1)

getPolyfaceMeshIndex2

public int getPolyfaceMeshIndex2()
Polyface mesh vertex index, code 72, optional, default 0.


setPolyfaceMeshIndex2

public void setPolyfaceMeshIndex2(int polyfaceMeshIndex2)

getPolyfaceMeshIndex3

public int getPolyfaceMeshIndex3()
Polyface mesh vertex index, code 73, optional, default 0.


setPolyfaceMeshIndex3

public void setPolyfaceMeshIndex3(int polyfaceMeshIndex3)

getPolyfaceMeshIndex4

public int getPolyfaceMeshIndex4()
Polyface mesh vertex index, code 74, optional, default 0.


setPolyfaceMeshIndex4

public void setPolyfaceMeshIndex4(int polyfaceMeshIndex4)

isPolygon3d

public boolean isPolygon3d()
Vertex is a polygon mesh vertex.

This is derived from the 64-bit of vertex flags (code 70).


setPolygon3d

public void setPolygon3d(boolean polygon3d)

isPolyline3d

public boolean isPolyline3d()
Vertex is a 3D polyline vertex.

This is derived from the 32-bit of vertex flags (code 70).


setPolyline3d

public void setPolyline3d(boolean polyline3d)

isSplineControlPoint

public boolean isSplineControlPoint()
Vertex is a spline control point.

This is derived from the 16-bit of vertex flags (code 70).


setSplineControlPoint

public void setSplineControlPoint(boolean splineControlPoint)

isSplineVertex

public boolean isSplineVertex()
Vertex is a spline vertex created by spline-fitting.

This is derived from the 8-bit of vertex flags (code 70).


setSplineVertex

public void setSplineVertex(boolean splineVertex)

getStartWidth

public double getStartWidth()

setStartWidth

public void setStartWidth(double startWidth)

getX

public double getX()
Location X, code 10, required.


setX

public void setX(double x)

getY

public double getY()
Location Y, code 10, required.


setY

public void setY(double y)

getZ

public double getZ()
Location Z, code 10, required.


setZ

public void setZ(double z)