Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] TechDraw: Snap Dimensions Values / Align Dimensions / Move without changing relative text position on dimension #11636

Open
5 of 6 tasks
maxwxyz opened this issue Dec 4, 2023 · 13 comments
Labels
Feature FR for improvements or new features Snapping UI/UX WB TechDraw Related to the TechDraw Workbench

Comments

@maxwxyz
Copy link
Collaborator

maxwxyz commented Dec 4, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Snap the dimensions in TechDraw:

  • Create them with an equal (defined) spacing to the model
  • Snap the text on the dimension to the center of the dimension arrows
  • Align the dimension (arrows) while moving to other dimensions (snapping)
  • Move the dimension without changing the local (relative) position of the dimension text (so it stays in the center)

Quick demo, creating a new dimension I have to carefully place them in line with the existing one but while dragging, the value won't stay centered:

TD-dimensions.mp4

I know that the text can be centered with position chain dimension but every time I have to move or adjust a dimension, the value is not centered. Maybe there could be an option to center it, or it snaps centered while dragging, or I can hold a key while dragging to restrict the value text from moving relative.

Full version info

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.35274 (Git)
Build type: Release
Branch: main
Hash: dc063eabec61bffc72c92595c66a4649f25fe381
Python 3.10.13, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.6, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * 3DfindIT 1.2.0
  * BIM 2021.12.0
  * CfdOF 1.24.8
  * CurvedShapes 1.0.5
  * Curves 0.6.15
  * Defeaturing 1.2.1
  * fasteners 0.4.71
  * FEMbyGEN 2.0.0
  * freecad.gears 1.0.0
  * freecad_metal_workbench 0.0.1
  * OpenDark 2023.11.27
  * sheetmetal 0.3.12
  * woodworking 0.21.30486

Subproject(s) affected?

Techdraw

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Roy-043 Roy-043 added WB TechDraw Related to the TechDraw Workbench Feature FR for improvements or new features labels Dec 4, 2023
@pure-machinery
Copy link

This would be a pretty good feature in my opinion.

For example in Creo you create something called Snap lines which can be offset either from a geometric entity or view bounding box. These can be used for snapping dimensions, symbols, annotations. Another usage of this is that you can cut extension lines that cover another dimension with the snap lines.

But there is very little functionality for organizing the drawing in TechDraw currently. It would be awesome to see some of it added.

@pierreporte
Copy link

This is a must for good quality drawings.

Something very important for centering the text of dimensions: it must take into account everything like prefixes, suffixes, added text, whatever. In some programs like Alibre or Catia only the base value is centered. You have to move the text by hand for it to be visually in the middle of the arrow.

@luzpaz luzpaz added the Snapping label Dec 4, 2023
@WandererFan
Copy link
Contributor

Create them with an equal (defined) spacing to the model

I don't understand this one.

Snap the text on the dimension to the center of the dimension arrows

there is a comment in the code about this.
'''
//TODO: should have better initial datumLabel position than (0, 0) in the DVP?? something closer to the object being measured?
'''
Will be a bit tricky to figure out when to set the position to the midpoint of the dimension line and when to leave it alone because the dim text has been dragged or the X,Y manually changed. You can't just always force it to the middle since the text sometimes doesn't fit or needs to be moved to avoid blocking something else.

Align the dimension (arrows) while moving to other dimensions (snapping)

off the top of my head: select Dimension A + the geometry when creating Dimension B could mean align B to A. I can see how this could work for horizontal/vertical dims. Not sure I see how to figure out the alignment for oblique dimensions.

Move the dimension without changing the local (relative) position of the dimension text (so it stays in the center)

might be able to implement horizontal only or vertical only movement using the using the keyboard arrows.

Somewhere I have notes to myself about a "dimension group" that would link a set of dimension object for chain and ordinal dimensions. The extension functions don't remember which dims are to stay "linked" together.

@WandererFan
Copy link
Contributor

Snap lines sound like "guides" in Inkscape. Easy to add the lines, harder to use them for alignment. Will take some thinking.

@pierreporte
Copy link

Are we talking about snap/guide lines that are linked to views or to the page? Both would be interesting but view-linked ones are IMO the most useful by far.

@maxwxyz
Copy link
Collaborator Author

maxwxyz commented Dec 6, 2023

@WandererFan numbers referencing the demo below.

  • 1-2: The idea was that the dimensions snap to other existing dimensions, so that they can be aligned easily by snapping to each other (multiple vertical or horizontal dimensions, no chains). Even on different views, that the page looks ordered and clean. (could also be combined with the idea of page snap guides)
  • 3: Same behavior when dragging the text/value of the dimension on the arrow/dimension line: it could snap centered if you move it near the center of the arrow/dimension line.
  • 4-5: That is meant by the first point Create them with an equal (defined) spacing to the model: New dimensions should have a default distance to the model geometry/lines and also parallel dimension lines above existing ones should have a defined distance. Maybe that can be achieved by snapping to those distances as well. I think there is a standard which defined that:

Dimension lines are drawn at a distance of 10 mm from the body edges as a fine solid line. If several dimension lines are required, they should be drawn parallel at a distance of 7 mm - under no circumstances should they cross.

grafik

@PaddleStroke
Copy link
Contributor

PaddleStroke commented May 29, 2024

Can you please detail what you mean by the remaining point?

Create them with an equal (defined) spacing to the model

Currently it is possible to position them in a 'cascading' disposition. And the distance is defined by the cascading spacing variable. Which sounds like what this point is meaning.

2024-05-29.09-38-10.mp4

Is this not what you meant?

@maxwxyz
Copy link
Collaborator Author

maxwxyz commented May 29, 2024

@PaddleStroke no. What is meant:

  1. Snap also to a distance of the model edge which is the feature the dimension is measuring:
    It usually should be 10 mm (in comparison to 7mm between cascading dimensions). This should snap to the distance on both sides of the model line. So the dimensions have the same and a defined spacing to the model. This 10 mm could also be a factor of the 7 mm cascading, maybe 1,5x cascading distance)
    grafik
  2. When you currently create a new dimension (not with the smart tool) the dimension s usually directly placed on the model line which is annoying as it is not legible and you have to move all dimensions. This should be utomatically created 10mm outside of the model line (where snapping in point 1 should also snap to)
    grafik
    grafik

Is this understandable?

@PaddleStroke
Copy link
Contributor

Ah yes this is not possible yet. I thought I had done this but actually not yet.

@PaddleStroke
Copy link
Contributor

Why 1.5x cascadespacing ? I would rather use cascadespacing directly so that it looks evenly paced?

@maxwxyz
Copy link
Collaborator Author

maxwxyz commented May 29, 2024

Why 1.5x cascadespacing ? I would rather use cascadespacing directly so that it looks evenly paced?
I think it is recommended to use minimum 10 mm to the model and minimum 7 between cascading. Not sure why, maybe that it does not stick too close to the model itself.

@pierreporte
Copy link

The spacing values should be a document parameter (similar to template or projection).

@PaddleStroke
Copy link
Contributor

Well I have just spent my whole afternoon on this which should have been simple, but I couldn't get it to work properly. I'm dropping it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature FR for improvements or new features Snapping UI/UX WB TechDraw Related to the TechDraw Workbench
Projects
None yet
Development

No branches or pull requests

7 participants