You are here: Surpac Concepts > Macros > SCL > SCL Graphics Drawing > SclGraphicsInsertEllipticalArc
GEOVIA Surpac

SclGraphicsInsertEllipticalArc

Overview

Insert an elliptical arc into the currently open node of the graphics database.

Synopsis

SclGraphicsInsertEllipticalArc $xcen $ycen $zcen $xmajor $ymajor $zmajor $xminor $yminor $zminor $startangle $endangle

Description

This command inserts an elliptical arc which is defined by three points on its circumference and a start angle and end angle. Defining an ellipse in this way permits an ellipse of any orientation to be defined. The ellipse line weight, line pattern, and colour are determined by other SclGraphics commands.

Arguments

  • xcen, ycen, zcen
  • Pass by value. The XYZ coordinates of the centre of the ellipse.

  • xmajor, ymajor, zmajor
  • Pass by value. The XYZ coordinates of one end of the major axis of the ellipse.

  • xminor, yminor, zminor
  • Pass by value. The XYZ coordinates of one end of the minor axis of the ellipse.

  • startangle, endangle
  • The portion of the ellipse that is to be drawn is defined using a normalised angle for the start and end positions. Permissible values for the angles are between 0.0 and 1.0 with 0.0 being at the start position of the major axis and 1.0 causing a full ellipse to be drawn. Therefore, if exactly half an ellipse is to be drawn from one end of the major axis to the other end of the major axis the startangle and endangle parameters should have values of 0.0 and 0.5 respectively.

Returns

The key to the elliptical arc so that it can be selectively deleted using SclGraphicsDeleteByKey.

Examples

#
# Create a node and insert an elliptical arc
#
SclGraphicsOpen mygraphicsnode
  # insert the circle and remember its key
  set key [SclGraphicsInsertEllipticalArc 100 200 50 110 210 50 120 200 50 0.0 0.5]
  # set the rendering attributes
  SclGraphicsSetColour "lines=yellow"
  SclGraphicsSetLineWeight 2
  SclGraphicsSetLInePattern "-.-."
SclGraphicsClose
# and now make sure we can see it
SclGraphicsUpdateDisplay

See Also

SclGraphicsSetLinePattern
SclGraphicsSetLineWeight

SclGraphicsSetColour