Difference between revisions of "Line definition"

From wiki.fine.cz
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 14: Line 14:
|}
|}


==== StandardLine ====
===== StandardLine =====
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Width</code>
|Thickness of line [mm], if folowed by *, means multiple of default width
|1*
|-
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|[[Colors|Color]] of line
|<code>clDefault</code>
|}
'''Example of Data XML'''
 
<code><Line Type="StandardLine" Width="2.5*" Color="clFill" /></code>
 
===== ElemLine =====
Line consisting of varius elements.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Line type
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Type</code>
|Type of line defined as <code>StandardLine</code> or <code>ElemeLine</code>
|(empty)
|}
 
===== Elem =====
Element of line
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Element type
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Kind</code>
|Type of element defined as <code>DefaultWidth</code>, <code>DefaultColor</code>, <code>Width</code>, <code>Color</code>, <code>Move</code>, <code>Line</code>, <code>Point</code>, <code>Circle</code>, <code>RegularPolygon</code>, <code>Polygon</code> or <code>Arc</code>
|(empty)
|}
 
====== DefaultWidth ======
Following elements are drawn with default width.
 
====== DefaultColor ======
Following elements are drawn with default color.
 
====== Width ======
Following elements are drawn with given width.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ToolWidth</code>
|Thickness of following elements [mm], if folowed by *, means multiple of default width
|(empty)
|}
 
====== Color ======
Following elements are drawn with given color.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|[[Colors|Color]] of following elements
|(empty)
|}
 
====== Move ======
Move to next position.
 
<code><Elem Kind="Move" DX="2" DY="0" /></code>
 
====== Line ======
Draw line to next position.
 
<code><Elem Kind="Line" DX="2" DY="0" /></code>
 
====== Point ======
Draw point.
 
====== Circle ======
Draw circle.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Radius
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|Radius of circle [mm]
|(empty)
|-
|Fill
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ShapeFilled</code>
|Draw filled
|(empty)
|}
<code><Elem Kind="Circle" Radius="1" ShapeFilled="false" /></code>
 
====== RegularPolygon ======
Draw regular polygon.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Radius
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|Radius of regular polygon
|(empty)
|-
|Fill
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ShapeFilled</code>
|Draw filled
|(empty)
|-
|Vertices count
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PolygonN</code>
|Number of vertices of regular polygon
|(empty)
|-
|Polygon orientation
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PolygonAngle</code>
|Orientation of regular polygon
|(empty)
|}
<code><Elem Kind="RegularPolygon" Radius="0.5" ShapeFilled="true" PolygonN="4" PolygonAngle="0.785398163397448" /></code>
 
====== Polygon ======
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Vertices
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Pt</code>
|[[Point definition|Vertice]] of polygon
|(empty)
|}
<code><Elem Kind="Polygon" ShapeFilled="true"></code>
 
<code>  <Pt X="0" Y="0.5" /></code>
 
<code>  <Pt X="0" Y="2.5" /></code>
 
<code>  <Pt X="0.5" Y="3" /></code>
 
<code>  <Pt X="1.5" Y="2.75" /></code>
 
<code>  <Pt X="1.75" Y="1.5" /></code>
 
<code>  <Pt X="2.25" Y="1" /></code>
 
<code>  <Pt X="1.75" Y="0.25" /></code>
 
<code>  <Pt X="1" Y="0" /></code>
 
<code>  <Pt X="0.5" Y="0.25" /></code>
 
<code></Elem></code>
 
====== Arc ======
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Coordinate change X
|<sup>[[Legend of XML elements|[A]]]</sup> <code>DX</code>
|End coordinate X of arc [mm]
|(empty)
|-
|Coordinate change Y
|<sup>[[Legend of XML elements|[A]]]</sup> <code>DY</code>
|End coordinate Y of arc [mm]
|(empty)
|-
|Arc height
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Height</code>
|Height of arc [mm], positive value is to left of line
|(empty)
|}
<code><Elem Kind="Arc" DX="2" DY="0" Height="1" /></code>
 
'''Example of Data XML'''
'''Example of Data XML'''


Line 21: Line 224:
<code>  <Elem Kind="Line" DX="2" DY="0" /></code>
<code>  <Elem Kind="Line" DX="2" DY="0" /></code>


<code>  <Elem Kind="Move" DX="-1" DY="1" /></code>
<code>  <Elem Kind="Line" DX="-1" DY="1.73205080756888" /></code>
 
<code>  <Elem Kind="Line" DX="-1" DY="-1.73205080756888" /></code>
 
<code>  <Elem Kind="Move" DX="4" DY="0" /></code>
 
<code><Elem Kind="Polygon" ShapeFilled="true"></code>
 
<code>    <Pt X="0" Y="0.5" /></code>
 
<code>    <Pt X="0" Y="2.5" /></code>
 
<code>    <Pt X="0.5" Y="3" /></code>
 
<code>    <Pt X="1.5" Y="2.75" /></code>
 
<code>    <Pt X="1.75" Y="1.5" /></code>
 
<code>    <Pt X="2.25" Y="1" /></code>
 
<code>    <Pt X="1.75" Y="0.25" /></code>
 
<code>    <Pt X="1" Y="0" /></code>
 
<code>    <Pt X="0.5" Y="0.25" /></code>


<code>  <Elem Kind="Line" DX="0" DY="-2" /></code>
<code>  </Elem></code>


<code>  <Elem Kind="Move" DX="7" DY="0" /></code>
<code>  <Elem Kind="Move" DX="2" DY="0" /></code>


<code></Line></code>
<code></Line></code>

Latest revision as of 06:56, 7 June 2022

Used to store line definition.

Data XML definition

Property XML Description Default
Line type [A] Type Type of line defined as StandardLine or ElemeLine (empty)
StandardLine
Property XML Description Default
Line width [A] Width Thickness of line [mm], if folowed by *, means multiple of default width 1*
Color [A] Color Color of line clDefault

Example of Data XML

<Line Type="StandardLine" Width="2.5*" Color="clFill" />

ElemLine

Line consisting of varius elements.

Property XML Description Default
Line type [A] Type Type of line defined as StandardLine or ElemeLine (empty)
Elem

Element of line

Property XML Description Default
Element type [A] Kind Type of element defined as DefaultWidth, DefaultColor, Width, Color, Move, Line, Point, Circle, RegularPolygon, Polygon or Arc (empty)
DefaultWidth

Following elements are drawn with default width.

DefaultColor

Following elements are drawn with default color.

Width

Following elements are drawn with given width.

Property XML Description Default
Width [A] ToolWidth Thickness of following elements [mm], if folowed by *, means multiple of default width (empty)
Color

Following elements are drawn with given color.

Property XML Description Default
Color [A] Color Color of following elements (empty)
Move

Move to next position.

<Elem Kind="Move" DX="2" DY="0" />

Line

Draw line to next position.

<Elem Kind="Line" DX="2" DY="0" />

Point

Draw point.

Circle

Draw circle.

Property XML Description Default
Radius [A] Radius Radius of circle [mm] (empty)
Fill [A] ShapeFilled Draw filled (empty)

<Elem Kind="Circle" Radius="1" ShapeFilled="false" />

RegularPolygon

Draw regular polygon.

Property XML Description Default
Radius [A] Radius Radius of regular polygon (empty)
Fill [A] ShapeFilled Draw filled (empty)
Vertices count [A] PolygonN Number of vertices of regular polygon (empty)
Polygon orientation [A] PolygonAngle Orientation of regular polygon (empty)

<Elem Kind="RegularPolygon" Radius="0.5" ShapeFilled="true" PolygonN="4" PolygonAngle="0.785398163397448" />

Polygon
Property XML Description Default
Vertices [E] Pt Vertice of polygon (empty)

<Elem Kind="Polygon" ShapeFilled="true">

  <Pt X="0" Y="0.5" />

  <Pt X="0" Y="2.5" />

  <Pt X="0.5" Y="3" />

  <Pt X="1.5" Y="2.75" />

  <Pt X="1.75" Y="1.5" />

  <Pt X="2.25" Y="1" />

  <Pt X="1.75" Y="0.25" />

  <Pt X="1" Y="0" />

  <Pt X="0.5" Y="0.25" />

</Elem>

Arc
Property XML Description Default
Coordinate change X [A] DX End coordinate X of arc [mm] (empty)
Coordinate change Y [A] DY End coordinate Y of arc [mm] (empty)
Arc height [A] Height Height of arc [mm], positive value is to left of line (empty)

<Elem Kind="Arc" DX="2" DY="0" Height="1" />

Example of Data XML

<Line Type="ElemLine">

  <Elem Kind="Line" DX="2" DY="0" />

  <Elem Kind="Line" DX="-1" DY="1.73205080756888" />

  <Elem Kind="Line" DX="-1" DY="-1.73205080756888" />

  <Elem Kind="Move" DX="4" DY="0" />

<Elem Kind="Polygon" ShapeFilled="true">

    <Pt X="0" Y="0.5" />

    <Pt X="0" Y="2.5" />

    <Pt X="0.5" Y="3" />

    <Pt X="1.5" Y="2.75" />

    <Pt X="1.75" Y="1.5" />

    <Pt X="2.25" Y="1" />

    <Pt X="1.75" Y="0.25" />

    <Pt X="1" Y="0" />

    <Pt X="0.5" Y="0.25" />

  </Elem>

  <Elem Kind="Move" DX="2" DY="0" />

</Line>