Class Entity110_Line


  • public class Entity110_Line
    extends GeomSSEntity
    LINE ENTITY - This entity defines a line segment which may be isolated or used as a component of a Composite Curve Entity or a subfigure. A line is a bounded, connected portion of a straight line which has distinct start and terminate points.

    This entity, when read from an IGES file, is converted to a LineSegment curve. This entity type can be written out to an IGES file.

    Modified by: Joseph A. Huwaldt

    Version:
    September 13, 2016
    Author:
    JDN, Version 1.0
    • Constructor Detail

      • Entity110_Line

        public Entity110_Line​(Part p,
                              DirEntry de)
        Default constructor.
        Parameters:
        p - part to which this entity is contained
        de - Directory Entry for this entity
      • Entity110_Line

        public Entity110_Line​(Part part,
                              int DEnum,
                              LineSegment geom)
        Create this entity from the specified GeomSS geometry element.
        Parameters:
        part - The Part in which this entity is contained.
        DEnum - The line count from the start of the Directory Entry Section for this entry (odd number).
        geom - The GeomSS LineSegment geometry to return an Entity for.
    • Method Detail

      • canWrite

        public boolean canWrite()
        Returns true if the Entity can be written to an exchange file.
        Overrides:
        canWrite in class Entity
        Returns:
        true
      • check

        public void check()
        Checks to see if the entity is correct. The following restrictions are imposed: - The Label Display Pointer shall be 0
        Specified by:
        check in class Entity
      • read

        public void read​(java.io.RandomAccessFile in)
                  throws java.io.IOException
        Read the Parameter Data from the String read in by the superclass.
        Overrides:
        read in class Entity
        Parameters:
        in - input file
        Throws:
        java.io.IOException
      • write

        public int write​(java.io.PrintWriter writer,
                         int PDnum)
                  throws java.io.IOException
        Write this entities parameter data to the specified PrintWriter.
        Overrides:
        write in class Entity
        Parameters:
        writer - The PrintWriter to write the parameter data for this entity to.
        PDnum - The starting Parameter Data row index number.
        Returns:
        The Parameter Data row index number for the next row.
        Throws:
        java.io.IOException
      • getTypeString

        public java.lang.String getTypeString()
        Returns a short String describing this Entity object's type.
        Specified by:
        getTypeString in class Entity
        Returns:
        A short String describing this Entity object's type.
      • toString

        public java.lang.String toString()
        Dump to String.
        Overrides:
        toString in class Entity
        Returns:
        String containing the resulting text.