Skip to content

fix: create_drawing_view keeps the sheet's scale - #287

Merged
andrewbartels1 merged 8 commits into
mainfrom
fix/drawing-view-keeps-sheet-scale
Nov 30, 2026
Merged

andrewbartels1 merged 8 commits into
mainfrom
fix/drawing-view-keeps-sheet-scale

Conversation

@andrewbartels1

Copy link
Copy Markdown
Owner

What

SolidWorks's own option Tools › Options › Drawings › Automatically scale new drawing views (swAutomaticScaling3ViewDrawings, on by default) rescales an empty sheet to fit the first view placed on it. On SolidWorks 2026 a sheet set to 1:2 read 2:1 after a front view of a 30 mm block was placed, so the view came out four times the size asked for.

  • create_drawing_view (and add_drawing_view) read the sheet's scale before placing the view and set it back afterwards. The user's SolidWorks option is never changed.
  • The reply gives sheet_scale, sheet_rescale_undone (the scale SolidWorks had picked) and fits_sheet. When a view runs off the paper, the message says so and points to set_sheet_scale or fit_sheet_scale.
  • New input fit_sheet_scale: true keeps SolidWorks's fit (the old behaviour).
  • README: the boolean-logic demo (cube and sphere) is added to the demo table.

Tests

  • Unit tests beside each module; the full suite passes (4,923 tests, 100% coverage); mypy is clean.
  • Live test tests/live/test_live_sw_drawing_view_scale.py passes on SolidWorks 2026: a 1:2 sheet stays 1:2 and the view fits the paper; with fit_sheet_scale, SolidWorks's own scale is kept.

OpenSpec change: drawing-view-keeps-sheet-scale.

… the README

SolidWorks's 'Automatically scale new drawing views' option rescaled an
empty sheet to fit its first view (a 1:2 sheet read 2:1). The scale is set
back; the reply gives sheet_scale, sheet_rescale_undone and fits_sheet;
fit_sheet_scale keeps SolidWorks's fit. The option itself is left alone.
… for the base, Right for the upright), where create_hole's point pick lands on the point
…hrough both ways, which no view affects; the base's holes stay create_hole from the Top view
…s-sheet-scale

# Conflicts:
#	CHANGELOG.md
#	docs/assets/progress/tool-list-size.md
@andrewbartels1
andrewbartels1 merged commit d31c8a9 into main Nov 30, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant