FreeCAD icon indicating copy to clipboard operation
FreeCAD copied to clipboard

Copying parts of an expression sketch after pasting breaks the expression (Ctrl+C / Ctrl+V).

Open kaiwas opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Problem description

If we copy an element with an assigned expression and paste it, then the inserted element will display the correct constraint value, but it will no longer be an expression. However, there is no way to identify this in the 3D window. To see this you need to open constraints.

https://github.com/user-attachments/assets/a345bb9b-8021-48a7-998a-6dfdc5ffea29

Copy-Paste.FCStd.del_this_and_zip.zip

Full version info

OS: Manjaro Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38314 (Git) AppImage
Build type: Release
Branch: main
Hash: 3fa339e9eb71d34542e463b3f4581857a9e696fb
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Russian/Russia (ru_RU)
Installed mods: 
  * OpenTheme 2024.7.3
  * PitchedRoof

Subproject(s) affected?

Sketcher

Anything else?

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

kaiwas avatar Jul 23 '24 12:07 kaiwas

New transformation tools also break expressions.

https://github.com/user-attachments/assets/79f7255d-5d4a-4af8-acb4-e7fac9ad9303

kaiwas avatar Jul 23 '24 14:07 kaiwas

Is this working in the stable version?

maxwxyz avatar Jul 24 '24 04:07 maxwxyz

Is this working in the stable version?

No. It seems there has never been functionality for “saving” expressions. The copy tools in version 0.21 also "break" expressions (convert them to simple numbers).

https://github.com/user-attachments/assets/605b0dc3-d73d-433f-8d37-ab6377206c45

kaiwas avatar Jul 24 '24 06:07 kaiwas

If you try to formulate the most negative feature of the program in a short phrase, then I would say that it is “Loss of previously entered data.” This problem occurs in many places. (In my opinion). I assume that an adult CAD system should not have such a disadvantage. Data ever entered by the user must be stable and not lost unless the user wants it.

kaiwas avatar Jul 24 '24 06:07 kaiwas

Hi! This issue hasn’t seen activity in a while. If it’s still relevant, please update to the latest FreeCAD weekly build download here to see if the problem is resolved.

If the issue persists, let us know by adding a comment with any updates or details. Otherwise, we’ll close this issue automatically in 20 days to keep our backlog tidy. Feel free to comment anytime to keep it open. Closed issues can always be reopened. Thanks for helping improve FreeCAD!

Access additional FreeCAD resources:

  • Forum: https://forum.freecad.org
  • Blog: https://blog.freecad.org
  • Wiki: https://wiki.freecad.org

github-actions[bot] avatar Dec 03 '24 19:12 github-actions[bot]

The problem is still relevant

https://github.com/user-attachments/assets/7d909a00-e944-46a5-9e1f-5c5803820c79


OS: Manjaro Linux (KDE/plasma/xcb)
Architecture: x86_64
Version: 1.1.0dev.39416 (Git) Conda AppImage
Build type: Release
Branch: main
Hash: f6268ffd2877dadb4440ade541e12c388a517d6e
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: Russian/Russia (ru_RU)
Stylesheet/Theme/QtStyle: OpenLight.qss/OpenLight/Fusion
Installed mods: 
  * FreeCAD_SketchArch
  * lattice2 1.0.0
  * PitchedRoof
  * freecad.gears.backup1731915834.4791615 1.3.0 (Disabled)
  * addFC 0.7.5
  * freecad.gears 1.3.0
  * sheetmetal 0.5.10
  * OpenTheme 2024.9.1

kaiwas avatar Dec 04 '24 07:12 kaiwas

I think it is not that easy as you can copy sketches from other documents or from the web or any other place where the expressions or variables do not exist in the document you are pasting them.

maxwxyz avatar Jul 02 '25 10:07 maxwxyz

I think it is not that easy as you can copy sketches from other documents or from the web or any other place where the expressions or variables do not exist in the document you are pasting them.

Yes. I agree. There is something to think about. But! Much more importantly - all the losses happen unnoticed. Perhaps at least a pop-up warning is required that "Expressions were converted to a number".

kaiwas avatar Jul 02 '25 10:07 kaiwas

can copy sketches from other documents or from the web or any other place

By the way, in my opinion this is not a problem, if expressions are used somewhere - they should be saved. It would even be convenient. But for now - silent data loss occurs.

If something is copied, then after pasting the element should remain a complete copy. Otherwise it is not copying, but something incomprehensible.

kaiwas avatar Jul 02 '25 11:07 kaiwas