draftcraft

Plot styles

A plot style table decides how objects print. CADCraft applies it to PDF plots (PLOT, EXPORTPDF and anything that plots through them). It also applies it to a layout shown with Display plot styles on: on screen and in the layout’s PNG and SVG exports.

Tables

Kind Picks the style by Styles
Colour-dependent (.ctb) the object’s index colour (a true colour uses its nearest index colour) exactly 255, Color_1 … Color_255
Named (.stb) the object’s PlotStyle property Normal first, then any names

A style can set these:

Field Meaning “Use object” value
color output colour, "#rrggbb" absent / null
grayscale print the colour as the grey of its luminance (Rec. 709 weights) false
screening ink intensity 0–100 %, mixing toward the white paper 100
linetype linetype name (loaded, or from the built-in library; Continuous draws solid) absent / null
lineweight hundredths of a millimetre, 0–211; used when lineweights are plotted absent / null
end, join, fill line end, line join and area fill style object

Colour 7 prints black.

Line ends, joins and fill patterns

Fill Pattern
checkerboard 0.5 mm squares, every other one filled
crosshatch horizontal and vertical bars, 0.2 mm wide
diamonds 0.35 mm squares turned 45°, every 0.7 mm
horizontalBars, verticalBars bars a third of the repeat wide
slantLeft, slantRight \ and / bars a third of the repeat wide
squareDots 0.2 mm squares every 0.5 mm

Wipeouts are never patterned. A plot that would need more than two million pattern cells keeps the remaining areas solid. Layouts draw these while the display list is built. A model-space plot draws them at its plot scale.

Built-in tables

These are CADCraft’s own definitions, not copies of any vendor’s files.

Table What it does
default.ctb keeps every object property
monochrome.ctb prints every colour black
grayscale.ctb prints every colour as the grey of its luminance
default.stb Normal (object properties), Black, Screened 50%, Thick (0.50 mm)
monochrome.stb Normal prints black; Screened 50% prints black at 50 %

A table kept in the drawing shadows a built-in table of the same name.

Named plot styles

Layers have a plot style name (default Normal). Objects have ByLayer (the default), ByBlock or a style name. ByLayer takes the layer’s style. On layer 0 inside a block, that is the block reference’s layer. ByBlock takes the block reference’s style. A name the table doesn’t have prints as Normal. A colour-dependent table ignores the property.

Commands

Table files

Tables are saved in our own format: UTF-8 JSON with a format marker. Fields left at “use the object’s” are omitted.

{
  "cadcraftPlotStyleTable": 1,
  "name": "office.stb",
  "description": "Office pens",
  "kind": "named",
  "styles": [
    { "name": "Normal" },
    { "name": "Pen 5", "color": "#000000", "screening": 40, "lineweight": 35, "linetype": "HIDDEN", "end": "round" }
  ]
}

Reading fixes hostile values:

Binary .ctb/.stb files are not read. We haven’t found a public specification of that format.

In DXF files