Repository navigation
fix: create_drawing_view keeps the sheet's scale - #287
Merged
Merged
Conversation
… 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.
…mat, with its top and right views
…e_hole's point pick can see both faces
… 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
…2 A3 sheet) in Demos, with its GIF
…s-sheet-scale # Conflicts: # CHANGELOG.md # docs/assets/progress/tool-list-size.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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(andadd_drawing_view) read the sheet's scale before placing the view and set it back afterwards. The user's SolidWorks option is never changed.sheet_scale,sheet_rescale_undone(the scale SolidWorks had picked) andfits_sheet. When a view runs off the paper, the message says so and points toset_sheet_scaleorfit_sheet_scale.fit_sheet_scale: truekeeps SolidWorks's fit (the old behaviour).Tests
tests/live/test_live_sw_drawing_view_scale.pypasses on SolidWorks 2026: a 1:2 sheet stays 1:2 and the view fits the paper; withfit_sheet_scale, SolidWorks's own scale is kept.OpenSpec change:
drawing-view-keeps-sheet-scale.