omdl
v0.9.5
OpenSCAD Mechanical Design Library
|
Drafting defaults and configurations. More...
Files | |
file | config.scad |
Drafting defaults and configurations. | |
Globals | |
$draft_make_3d = false | |
<boolean> Extrude 2D drafted constructions to 3D. | |
$draft_line_fn = 4 | |
<integer> Arc fragment size for line construction. | |
$draft_arrow_fn = 8 | |
<integer> Arc fragment size for arrowhead construction. | |
$draft_scale = 1 | |
<integer> Line construction drafting scale multiplier. | |
draft_sheet_scale = 1 | |
<integer> Sheet construction drafting scale multiplier. | |
draft_sheet_size = "A" | |
<string> Drafting sheet size identifier. More... | |
draft_sheet_config = "L84TS" | |
<string> Drafting sheet configuration identifier. More... | |
draft_layers_show = ["all"] | |
<string-list> List of active drafting layer names. More... | |
draft_config_map = draft_config_map_style1 | |
<map> Drafting configuration defaults map. More... | |
Maps | |
draft_config_map_style1 | |
<map> A drafting configuration map; style1. More... | |
draft_title_block_map_style1 | |
<map> A title block map; style 1. More... | |
draft_table_format_map_ccc | |
<map> Table format map; centered, centered, centered –justified. | |
draft_table_format_map_cll | |
<map> Table format map; centered, left, left –justified. | |
draft_table_format_map_crr | |
<map> Table format map; centered, right, right –justified. | |
Getters | |
function | draft_get_config (k) |
Get drafting configuration default helper function. More... | |
function | draft_get_sheet_size (ci) |
Get sheet size value helper function. More... | |
function | draft_get_sheet_config (ci) |
Get sheet configuration value helper function. More... | |
Drafting defaults and configurations.
function draft_get_config | ( | k | ) |
Get drafting configuration default helper function.
k | <string> A map key. |
k
in the configuration map assigned to draft_config_map.Example:
layers = draft_get_config("layers-dim"); dimll1 = draft_get_config("dim-leader-length");
function draft_get_sheet_config | ( | ci | ) |
Get sheet configuration value helper function.
ci | <string> The column identifier. |
Example:
zoy = draft_get_sheet_config(ci="zoy") smx = draft_get_sheet_config(ci="smx") * draft_sheet_scale; smy = draft_get_sheet_config(ci="smy") * draft_sheet_scale;
function draft_get_sheet_size | ( | ci | ) |
Get sheet size value helper function.
ci | <string> The column identifier. |
Example:
std = draft_get_sheet_size(ci="std"); sdx = draft_get_sheet_size(ci="sdx") * draft_sheet_scale; sdy = draft_get_sheet_size(ci="sdy") * draft_sheet_scale;
draft_config_map = draft_config_map_style1 |
<map> Drafting configuration defaults map.
The following examples demonstrates how to override select values of an existing configuration map.
Example:
Definition at line 860 of file config.scad.
draft_config_map_style1 |
<map> A drafting configuration map; style1.
Configuration values for drafting primitives and tools. Specific values can be overridden as shown in draft_config_map or completely new maps may assembled to implement new styles as desired.
style1 table
key | value |
---|---|
font-sheet-zone-reference | Liberation Sans |
font-title-block-heading | Liberation Sans |
font-title-block-entry | Liberation Sans |
font-table-title | Liberation Sans |
font-table-heading | Liberation Sans |
font-table-entry | Liberation Sans |
make-3d-height | 1 |
line-width-min | 0.2 |
line-segment-min | 1.25 |
line-use-hull | true |
arrow-line-length-min | 4 |
arrow-angle-min | 15 |
table-cmh | 6.35 |
table-cmv | 6.35 |
table-coh | 1 |
table-cov | -1 |
table-hlines | [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]] |
table-vlines | [[0, 0], [0, 0], [0, 0]] |
table-text-format | ["", [-1, -1], [0.4, -0.9], [0, -1.2], 0, 1, ["left", "center"]] |
note-cmh | 6.35 |
note-cmv | 6.35 |
dim-cmh | 3.175 |
dim-cmv | 3.175 |
dim-text-place | [0, 1] |
dim-text-size | undef |
dim-round-mode | [1, 2] |
dim-offset | 0.79375 |
dim-leader-length | 12.7 |
dim-leader-weight | 1 |
dim-leader-style | 1 |
dim-leader-arrow | [2, 1] |
dim-leader-box-weight | 1 |
dim-leader-box-style | 1 |
dim-line-weight | 1 |
dim-line-style | 1 |
dim-line-arrow | 2 |
dim-line-extension-style | 1 |
dim-line-extension-length | 6.35 |
dim-line-distance | 9.525 |
dim-radius-weight | 1 |
dim-radius-style | 1 |
dim-radius-arrow | 2 |
dim-angle-weight | 1 |
dim-angle-style | 1 |
dim-angle-arrow | 2 |
dim-angle-extension-style | 3 |
dim-angle-extension-ratio | 1 |
dim-center-length | 1.5875 |
dim-center-weight | 0.5 |
dim-center-style | 1 |
dim-center-extension-style | 3 |
layers-default | ["all", "default"] |
layers-sheet | ["all", "sheet"] |
layers-table | ["all", "table"] |
layers-note | ["all", "note"] |
layers-titleblock | ["all", "titleblock"] |
layers-dim | ["all", "dim"] |
All dimensions are in millimeters.
Definition at line 715 of file config.scad.
draft_layers_show = ["all"] |
<string-list> List of active drafting layer names.
Layer identifiers may be assigned arbitrary names. A set of default names are used when not explicitly assigned. Multiple layers can be set active as in the following example.
Example:
Definition at line 554 of file config.scad.
draft_sheet_config = "L84TS" |
<string> Drafting sheet configuration identifier.
Available configurations:
Sheet configurations table
configuration name (id) | configuration description (info) |
---|---|
L84TS | Small sheet landscape layout with 8x4 traditional zones |
P48TS | Small sheet Portrait layout with 4x8 traditional zones |
Configuration keys table
key | value |
---|---|
id | configuration name |
info | configuration description |
sll | sheet landscape layout |
smx | sheet margin x |
smy | sheet margin y |
szm | zone margin xy |
zox | zone ordering x |
zoy | zone ordering y |
zlx | zone labels x |
zly | zone labels y |
zrf | zone reference font |
zfs | zone font scaling |
slc | sheet line config |
flc | frame line config |
zlc | zone line config |
glc | grid line config |
olc | origin line and arrow config |
Definition at line 538 of file config.scad.
draft_sheet_size = "A" |
<string> Drafting sheet size identifier.
Sheet sizes
Available sizes in inches table
sheet size (id) | standard (std) | sheet x-dimension (sdx) | sheet y-dimension (sdy) |
---|---|---|---|
A | ANSI | 8.5 | 11 |
B | ANSI | 11 | 17 |
C | ANSI | 17 | 22 |
D | ANSI | 22 | 34 |
E | ANSI | 34 | 44 |
A5 | ISO A | 5.86614 | 8.26772 |
A4 | ISO A | 8.26772 | 11.6929 |
A3 | ISO A | 11.6929 | 16.5354 |
A2 | ISO A | 16.5354 | 23.3858 |
A1 | ISO A | 23.3858 | 33.1102 |
A0 | ISO A | 33.1102 | 46.811 |
B5 | ISO B | 6.9685 | 9.84252 |
B4 | ISO B | 9.84252 | 13.937 |
B3 | ISO B | 13.937 | 19.685 |
B2 | ISO B | 19.685 | 27.8346 |
B1 | ISO B | 27.8346 | 39.3701 |
B0 | ISO B | 39.3701 | 55.6693 |
Letter | Other | 8.5 | 11 |
Legal | Other | 8.5 | 14 |
Executive | Other | 7.5 | 10 |
C5E | Other | 6.41732 | 9.01575 |
Comm10 | Other | 4.13386 | 9.48819 |
DLE | Other | 4.33071 | 8.66142 |
Folio | Other | 8.26772 | 12.9921 |
Ledger | Other | 17.0079 | 10.9843 |
Tabloid | Other | 10.9843 | 17.0079 |
Available sizes in mm table
sheet size (id) | standard (std) | sheet x-dimension (sdx) | sheet y-dimension (sdy) |
---|---|---|---|
A | ANSI | 215.9 | 279.4 |
B | ANSI | 279.4 | 431.8 |
C | ANSI | 431.8 | 558.8 |
D | ANSI | 558.8 | 863.6 |
E | ANSI | 863.6 | 1117.6 |
A5 | ISO A | 149 | 210 |
A4 | ISO A | 210 | 297 |
A3 | ISO A | 297 | 420 |
A2 | ISO A | 420 | 594 |
A1 | ISO A | 594 | 841 |
A0 | ISO A | 841 | 1189 |
B5 | ISO B | 177 | 250 |
B4 | ISO B | 250 | 354 |
B3 | ISO B | 354 | 500 |
B2 | ISO B | 500 | 707 |
B1 | ISO B | 707 | 1000 |
B0 | ISO B | 1000 | 1414 |
Letter | Other | 215.9 | 279.4 |
Legal | Other | 215.9 | 355.6 |
Executive | Other | 190.5 | 254 |
C5E | Other | 163 | 229 |
Comm10 | Other | 105 | 241 |
DLE | Other | 110 | 220 |
Folio | Other | 210 | 330 |
Ledger | Other | 432 | 279 |
Tabloid | Other | 279 | 432 |
Definition at line 318 of file config.scad.
draft_title_block_map_style1 |
<map> A title block map; style 1.
A title block is constructed using zoned tables. A new layout can be designed by defining a new map or by merging overrides to this style map. The map keys and structure depends on the implementation of the title block rendering operation.
Definition at line 1107 of file config.scad.