home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
graphic
/
cad
/
xcad3000
/
xcdoc
/
drawline
< prev
next >
Wrap
Text File
|
1995-07-10
|
6KB
|
148 lines
5.2.1 DRAW LINE
The DRAW LINE command is used to draw a single line segment or a continuous
set of single line segments.
COMMAND FORMAT
#DRAW LINE [modifiers] :Loc x1 ... xn [:Loc x1 ... xn] etc.
If the command is used with no modifiers, line entities are created between
each location digitised. To start a new line sequence, enter a colon at
any time to re-enter IDENTS. ( See fig. 5.1 ).
MODIFIERS
DRAW LINE has two sets of modifiers, a set of modifiers that define special
construction techniques, plus a set of modifiers which apply to all con-
struction techniques.
LAYER Requires a layer number. This will override the current
active layer.
DEPTH Requires a depth number. This will override the current
active depth.
LENGTH Requires a real value. This value defines the length that
each line segment will be drawn regardless of the entered
construction technique. A negative value will draw the line
in a direction opposite to the direction entered.
HARDFONT Indicates a hardware line style will be entered.
.STYLE One of the predefined styles, a value between 0 and 15.
.THICKNESS Line thickness, a value between 1 and 5.
SOFTFONT Indicates a software line style will be entered. For a full
description of the SOFTFONT option, see the documentation
for the command DEFINE SOFTFONT.
The following modifiers define various construction techniques, and thus are
all mutually exclusive.
HORIZONTAL Format:
#DRAW LINE HORIZONTAL :Loc x1 x2 :Loc ...
Will draw a horizontal line starting at location x1 and
x-clipped at location x2.
VERTICAL Format:
#DRAW LINE VERTICAL :Loc x1 x2 :Loc ...
Will draw a vertical line starting at location x1 and
y-clipped at location x2.
PERPENDICULAR Format:
#DRAW LINE PERPENDICULAR :Ent x1 :Loc x2 x3 :Ent ...
Will draw a line perpendicular to an existing entity. 'x1'
can be either a line, string, polygon or arc.
'x2' defines where the line will start. This will be the
point where a normal projected from 'x2' intersects with the
identified entity.
'x3' defines where the line will end unless the LENGTH
modifier has been used. This will be the point where a
normal projected from 'x3' intersects with the virtual line
originating at 'x2'. ( See fig. 5.2 ).
ANGLE Format:
#DRAW LINE ANGLE value :Ent x1 :Loc x2 x3 :Ent ...
Will draw a line at an angle to an existing entity. The
value is in degrees between -360 and +360. 'x1' can be
either a line, string or polygon.
'x2' and 'x3' define the line start and end in the same way
as PERPENDICULAR. ( See fig. 5.3 ).
TANGENTIAL Format:
#DRAW LINE TANGENTIAL :Ent x1 x2 :Ent ...
or
#DRAW LINE TANGENTIAL :Ent x1 :Loc x2 :Ent ...
Will draw a line that is tangential to two entities or a line
tangential to an arc from a location on the drawing. The
line start and end points will be the point of intersection
of the tangent.
Valid entity combinations are cpoint, line, string or
polygon tangential to an arc, or 2 arcs. In the case of a
line that is a tangential to an arc from a line, string or
polygon, the line is constructed perpendicular to the line
segment and at a tangent to the arc. ( See figs. 5.4 to 5.6
).
Some cases have up to 4 possible solutions such as a line
that is tangential to 2 circles. In these cases, the solution
returned is dependent on the locations entered when identi-
fying the construction entities.
PARALLEL Format:
#DRAW LINE PARALLEL [value] :Ent x1 :Loc x2 x3 x4 :Ent ...
Will draw a line parallel to an existing entity. 'x1' can be
either a line, string or polygon. If the entity is a string
or polygon, the segment nearest to 'x1' will be used.
'x2' defines which side of the identified entity to draw the
line. If a value is entered after PARALLEL, the line will be
drawn at the specified distance from the construction entity.
( See fig. 5.7 ). If no value was entered, the distance is
defined as the length of a normal projected from 'x2' to the
construction entity. ( See fig. 5.8 ).
'x3' defines the start of the line. This is the point of
intersection of a normal projected from 'x3' to the virtual
line.
'x4' defines the end point of the line in the same manner as
described above.
RECTANGLE Format:
#DRAW LINE RECTANGLE :Loc x1 x2 :Loc ...
Will draw 4 lines in the shape of a rectangle. 'x1' and
'x2' define the extents of the rectangle. ( See fig. 5.9 ).
ATTRIBUTE Used to enter one or more attributes associated with this
entity. For a full description of the ATTRIBUTE option, see
the documentation for the command ADD ATTRIBUTE.