Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Unreleased

- The dimension style `Standard`, which every R2018 DXF holds, names the text style
`Standard`. It named none, and AutoCAD draws no text for a dimension in a style with no
text style: once `Standard` was made current, a dimension a drafter drew in it with
`DIMLINEAR` had no text. That one value, group 340 of the style, is new in every R2018 DXF.

## 0.5.1

This release has breaking changes, though its number is a patch's. A project that depends on
Expand Down
5 changes: 4 additions & 1 deletion docs/dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ shown or plotted. It draws nothing for a dimension in the block of another drawi
or an insert of the file would show none, and a program that only draws a dimension's block
would show none either.

A drawing with no dimension style is written as it was before dimensions.
Every R2018 drawing holds the dimension style `Standard`, with AutoCAD's own values and the
text style `Standard`. AutoCAD draws no text for a dimension in a style that names no text
style, so without it a dimension a drafter adds in `Standard` would have none. A drawing with
no dimension style holds nothing else for dimensions.

## What is not drawn yet

Expand Down
9 changes: 8 additions & 1 deletion src/dxf-r2018.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,14 @@ export function toDXFR2018(
);
const arrowheads = arrowheadsWithBlocks(dimensionStyles);
writeTable(g, handle, "DIMSTYLE", [
{ type: "DIMSTYLE", subclass: "AcDbDimStyleTableRecord", name: "Standard", handle: handle() },
{
type: "DIMSTYLE",
subclass: "AcDbDimStyleTableRecord",
name: "Standard",
handle: handle(),
// DIMTXSTY. A dimension in a style with no text style has no text.
fields: (g) => g(340, standardStyle),
},
...dimensionStyles.map((style) => ({
type: "DIMSTYLE",
subclass: "AcDbDimStyleTableRecord",
Expand Down
Loading