A line object uses start point, end point, normal, and thickness properties to define the geometry
to be drawn. In examples, the pLine variable stores a pointer to a line object.
Start and End Points
The Start and End Point properties define the start and end points of the line in three-dimensional coordinates.
Both start and end points havethe coordinates (0,0,0) by default.
To get the start point, use the startPoint() method which does not have arguments and returns the
three-dimensional point as an instance of the OdGePoint3d type. For example:
To set the start point, use the setStartPoint() method which requires the three-dimensional point as an
argument of the OdGePoint3d type and does not return a value. For example:
To get the end point, use the endPoint() method which does not have arguments and returns the three-dimensional
point as an instance of the OdGePoint3d type. For example:
OdGePoint3d end = pLine->endPoint();
odPrintConsoleString(L"\nEnd point = (%g,%g,%g)", end.x, end.y, end.z);
To set the end point, use the setEndPoint() method which requires the three-dimensional point as an argument
of the OdGePoint3d type and does not return a value. For example:
The Normal property defines the normal to an arbitrary plane in which the line can be placed. The normal defines
the orientation of the plane that passes through the line in world space. The normal has the coordinates (0,0,1)
by default.
To get the normal, use the normal() method which does not have arguments and returns the three-dimensional
unit vector as an instance of the OdGeVector3d type. For example:
OdGeVector3d normal = pLine->normal();
odPrintConsoleString(L"\nNormal = (%g,%g,%g)", normal.x, normal.y, normal.z);
To set the normal, use the setNormal() method which requires the three-dimensional vector as an argument
of the OdGeVector3d type and does not return a value. For example:
The Thickness property defines the thickness of a line as a Double value in drawing units. A positive value
defines the thickness to be drawn along the normal direction. A negative value defines the thickness
to be drawn in the opposite direction from the normal. A zero value defines a line without thickness. The
thickness is zero by default.
To get the thickness, use the thickness() method which does not have arguments and returns the thickness
as a Double value. For example: