Class CadPatternFile
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Reads .pat files into CadHatchPatterns, and carries the presenter's own set of patterns (BuiltIn), written from their geometry in millimetres, the default. No file of AutoCAD's is carried or looked for: a .pat file is read only where the user picks it or keeps it in a support folder of their own (CadSupportFiles).
public static class CadPatternFile
- Inheritance
-
CadPatternFile
- Inherited Members
Fields
- BuiltInName
The name the presenter's own set goes by: no file has it on disk.
Properties
- BuiltIn
Gets the presenter's own 48 patterns, in millimetres: ANSI31, ANSI32, ANSI33, ANSI34, ANSI37, ANGLE, BRICK, CROSS, DASH, DOTS, EARTH, HONEY, LINE, NET, SQUARE, STEEL and ZIGZAG; ANSI35, ANSI36, ANSI38, GRASS, GRATE, HEX, INSUL, NET3 and TRIANG; ISO02W100 to ISO15W100; and AR-B816, AR-BRSTD, AR-CONC, AR-HBONE, AR-PARQ1, AR-RROOF, AR-RSHKE and AR-SAND, drawn at their real size (AR-BRSTD a brick 200 by 100 with joints of 10). SOLID is a fill, not a pattern of lines.
Methods
- FindBuiltIn(string)
A pattern of the presenter's own set by name, letters of either case the same; null where it has none.
- Parse(string)
Reads the patterns of the text of a .pat file, as AutoCAD reads them: a pattern begins at a line starting
*, its name all before the first comma, and runs to the next; a comment from a;, blank lines and the blanks about the numbers passed over; the first pattern of a name kept. A pattern with a line of fewer than five numbers, more than six dashes or a number that cannot be read, or with no line, is left out, as AutoCAD refuses it.
- Read(string)
Reads a .pat file: UTF-8 where its bytes are, else each byte its own character.