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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ How to write it (see AGENTS.md):
## Unreleased

### New
- Your settings in one file: Export Settings and Import Settings (Manage › Customization, or CONFIGEXPORT and CONFIGIMPORT) save the theme, Options, units, grid and snap, lineweights, plot style and command aliases to a TOML file and read it back on any computer.
- 3DMOVE, 3DROTATE, ROTATE3D, 3DSCALE, MIRROR3D, 3DALIGN and 3DARRAY move, turn, scale, mirror, align and array objects in space, under Modify ▸ 3D Operations, with AutoCAD's prompts and aliases (3M, 3R, 3AL, 3A).
- LINE takes points in space: type x,y,z or @dx,dy,dz and the line keeps its height.
- The command line's AutoComplete learns which commands you use: the ones you run most, and most recently, move up the list, so typing LI soon offers LINE first if you draw lines more than you list. The arrow keys move through the suggestions, and Reset Suggestion Order in the command line's right-click menu forgets what was learned.
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ unicode-bidi = "0.3.18"
icu_segmenter = { version = "~2.3", default-features = false, features = ["compiled_data", "lstm"] }
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff"] }
encoding_rs = "0.8.35"
# The portable settings file (CONFIGEXPORT, CONFIGIMPORT): TOML, keys kept in the order written.
toml = { version = "1.1", default-features = false, features = ["std", "serde", "parse", "display", "preserve_order"] }
# XML for the SVG reader (streaming parser, no entity expansion beyond the five predefined ones)
quick-xml = "0.42"

Expand Down
5 changes: 4 additions & 1 deletion apps/draftcraft/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fn services() -> Services {
/// filter's extension, and macOS accepts only listed extensions, replacing any other with the
/// first one. DWG must be listed for a `.dwg` name to survive, and a drawing opened from DWG
/// then defaults to DWG; other names keep DXF first.
fn filters_for_save(name: &str) -> [(&'static str, &'static str); 9] {
fn filters_for_save(name: &str) -> [(&'static str, &'static str); 10] {
let mut filters = [
("Drawing (DXF)", "dxf"),
("Drawing (DWG)", "dwg"),
Expand All @@ -212,6 +212,8 @@ fn filters_for_save(name: &str) -> [(&'static str, &'static str); 9] {
("ZIP archive", "zip"),
// ATTOUT's attribute values.
("Text, tab-delimited (TXT)", "txt"),
// CONFIGEXPORT's settings file.
("DraftCraft settings (TOML)", "toml"),
];
let lower = name.to_ascii_lowercase();
filters.sort_by_key(|(_, ext)| !lower.ends_with(&format!(".{ext}")));
Expand Down Expand Up @@ -524,6 +526,7 @@ mod tests {
assert_eq!(first("office.dwt"), "dwt");
assert_eq!(first("Project.dcss"), "dcss");
assert_eq!(first("Floorplan.txt"), "txt");
assert_eq!(first("draftcraft-settings.toml"), "toml");
for name in ["a.dwg", "b.dxf", "c"] {
let exts: Vec<_> = filters_for_save(name).iter().map(|(_, e)| *e).collect();
assert!(exts.contains(&"dwg") && exts.contains(&"dxf"), "{name}");
Expand Down
2 changes: 2 additions & 0 deletions crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ draftcraft-render = { workspace = true }
craft-docpath = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
# The portable settings file (CONFIGEXPORT, CONFIGIMPORT).
toml = { workspace = true }
thiserror = { workspace = true }
log = { workspace = true }
# 3D solids (feature `solids`, docs/solids.md): the kernel facade, the only way to the kernel.
Expand Down
2 changes: 2 additions & 0 deletions crates/engine/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod array;
mod audit;
pub(crate) mod blocks;
pub mod clipboard;
pub mod config;
pub mod constraints;
mod draw;
mod draw2;
Expand Down Expand Up @@ -221,6 +222,7 @@ pub fn command_specs() -> &'static [CommandSpec] {
v.extend(inquiry::specs());
v.extend(settings::specs());
v.extend(options::specs());
v.extend(config::specs());
v.extend(utility::specs());
v.extend(table::specs());
v.extend(tolerance::specs());
Expand Down
Loading
Loading