Skip to content

Driving and fixed dimensions: resize parts from a dimension's value - #83

Draft
Jairolaya12x wants to merge 1 commit into
BenchUp3D:mainfrom
Jairolaya12x:allow-dimension-tool-fix-sizes
Draft

Jairolaya12x wants to merge 1 commit into
BenchUp3D:mainfrom
Jairolaya12x:allow-dimension-tool-fix-sizes

Conversation

@Jairolaya12x

Copy link
Copy Markdown
Contributor

Descripción:

Summary

Dimensions can now drive and protect the geometry they measure, a first step toward parametric parts.

Resize from a dimension

  • Selecting a linear dimension shows a Length field in Properties. Type a new value (formulas and units work, e.g. 600mm - 2*18mm) and press Enter or Apply.
  • Keep fixed chooses which point stays in place: start point, end point or center. The choice is remembered across restarts.
  • If both ends are on the same piece, the piece is stretched: vertices beyond the midpoint move along the dimension, so a board gets longer without changing its thickness. If the ends are on different pieces, the moving piece is
    translated.
  • Works inside groups and components (linked instances update too). Locked geometry is refused, and so is any length that would fold the geometry. Every change is one undoable step.
  • The field appears as soon as a dimension is placed, with no need to reselect it.

Fixed dimensions

  • New dimensions placed with the Dimensions tool are fixed by default. Fix length in Properties toggles this (undoable). Dimensions in existing projects load as free, so older files behave as before.
  • Any edit that would change a fixed length (Push/Pull, Move, Scale…) is refused with a notice that gives the held size.
  • Push/Pull on a fixed size builds a new part instead of stretching: it adds a new layer of faces, so the measured part keeps its size and the new part gets its own.
  • Driving one dimension respects all other fixed dimensions.

Notices

  • Notices now appear in a console-style line at the bottom of the viewport. Refusals are shown in amber with a warning icon.

Implementation

  • benchup-core/src/dimension_stretch.rs: set_dimension_length, set_dimension_fixed, changed_fixed_dimension. Edits run in the owning object's edit context so component peers stay in sync.
  • Dimension.fixed (serde default false, omitted when false).
  • benchup-app/src/dimension_length.rs: Properties UI. commit_changed_edit enforces fixed dimensions on every recorded edit.
  • The fixed point preference is in ToolPreferences and is saved immediately without a model edit.
  • New strings are in all six catalogs.
Screenshot 2026-11-16 142419
Recording.2026-11-16.142702.1.mp4

@Jairolaya12x

Copy link
Copy Markdown
Contributor Author

Hey @dannycoulombe I was checking that someone said something about parametric measures, maybe this can be the first part to allow to use them, but let me know, also I added this to improve the editing of the shapes, because in other comments I saw that people have problems with this and maybe this can allow the improvement of building.
Please let me know if look ok for you,
Also do you think that is possible move or adjust the UI to improve the usage of tools per function or something like that? I mean creation process, material, tools or whatever.

Regards 🔥

This branch has not been deployed

No deployments
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