Commit Graph

34 Commits

Author SHA1 Message Date
Roy-043
2e02c6a944 Draft: ShapeString: use an actual font file as default, allow TTC files
* To help novice users supply an actual font file from the OS as the default for ShapeStringFontFile.
* The Draft code blocked the use of TTC font files. `Part.makeWireString()` can however handle them (although only the first font in the file can be used).

Additonally:
In a previous PR the bottom spacer was removed from the task panel. This PR brings it back as it is required in some cases. Without it  the "..." button of the file selector can become huge.
2025-05-05 18:15:47 +02:00
Roy-043
56d75c2c06 Draft: store 3 ShapeString parameters and remove font from prefs (#21054)
* Draft: store 3 ShapeString parameters and remove font from prefs

With this PR 3 ShapeString parameters are stored:
* ShapeStringFontFile: this replaces the old FontFile parameter.
* ShapeStringHeight
* ShapeStringText

The ShapeStringFontFile is just the last selected font file and not exposed in the Preferences editor.

Additionally:
* Changed the label of the text input box from "String" to "Text".
* Changed the label of the point reset button to sentence case.

* Remove faulty docstring
2025-04-29 07:13:17 -05:00
Roy-043
ed4dfba2a7 Draft: adjust formatting of params.py 2025-04-23 17:03:07 +02:00
tetektoza
2a983b587d Draft/BIM: Change Continue behavior and caching among commands (#20748)
* Draft: Cache ContinueMode setting for every tool separately

Currently ContinueMode is done to be held globally, so this patch
changes this to cache it inside `user.cfg` for every cmd separately.

* Draft: Add Chained Mode option for Dimension

Added new option under Dimension, although this is simply porting the
existing logic of "Continue" under "Chained Mode", whereas allowing
existing "Continue" mode to retrigger the command instead of placing
Dimensions in a chain.
2025-04-18 17:56:21 +02:00
Roy-043
354cc84935 Draft: add font name dropdown to preferences (#20400)
Fixes #20330.
2025-03-27 13:11:47 +01:00
Roy-043
5f7f9cb7ba Draft: Implement Dim Auto Flip Text
Fixes #19993.

* To determine the `FlipText` value the normal (either the working plane Z axis or its reverse) and the working plane X axis are used.
* A new fine-tuning parameter `DimAutoFlipText` can be used to disable the functionality. Its default value is `True`.
* The `FlipText` property did not work for angular dimensions and the `TextSpacing` property of angular dimensions was not multiplied by `ScaleMultiplier`. This has been corrected.
2025-03-08 15:30:31 +01:00
Roy-043
074807c378 Draft: change 'Filled' to 'Make face' in UI
Fixes #19715.

The related parameter has been renamed as well and other references to 'fill mode' have been updated.
2025-02-24 17:10:13 +00:00
Roy-043
288f3aad09 Draft: Save fillet settings
Fixes #16248.
2025-01-14 21:48:16 +01:00
JULIEN MASNADA
bcdfcce95c Improved SweetHome 3D importer (#17165)
* Fixed access to Addon::Metadat::Url attributes

* Fixed invalid vector in distance calculation

* SH3D importer initial version

* Cleaned up and added baseboard

* Make sure notificationWidth is properly enabled/disabled

* Added furnitureGroup, color prefs, light weight mesh object

* Allow to join walls

* Prepare to join wall, improved status feedback

* Removing trailing white space

* SH3D importer initial version

* Cleaned up and added baseboard

* Make sure notificationWidth is properly enabled/disabled

* Added furnitureGroup, color prefs, light weight mesh object

* Allow to join walls

* Prepare to join wall, improved status feedback

* Removing trailing white space

* fixing tipo, 80 charlines, etc

* Adding a basic import test

* Work in local but fails on pipeline. Commenting out.

* Adding testcase and join wall path

* Use ruled surface to fix failed sweep

* Fixed faces order when joining walls

* Fixed missing sample importer file

* Allow to change pref just before import

* Fixed excessive debug output

* Allow to import from string. Test use embedded string

* Fixed tipo in comment

Co-authored-by: João Matos <joao@tritao.eu>

* Improved door import

Also added coloring for wall section's edges when debuging

* Moved debug init script to FreeCAD-Docker repo

---------

Co-authored-by: João Matos <joao@tritao.eu>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
2024-12-20 09:46:39 +01:00
Roy-043
7541371779 Pattern name Diamant -> Diamond 2024-12-02 11:40:01 +01:00
Roy-043
fa65fcce0d Draft: Display default file and pattern in hatch task panel
Fixes #18197.
2024-12-02 11:40:01 +01:00
Chris Mayo
7183de92a4 Draft: Make startup and tests independent of BIM (#17390) 2024-11-16 17:43:46 +01:00
Roy-043
3a7c8ed1c5 Draft: Fix _param_observer_callback_scalemultiplier error
Fixes #17741.
2024-11-09 10:27:12 -05:00
Syres916
f00b236dfb [Draft] Improve the color activation and ability to change… (#16603)
* [Draft] Improve the color activation and ability to change size of the snap text

* [Draft] Correct dimension text size calculation
2024-09-19 09:03:33 +02:00
Roy-043
4fcbff191f Draft: Draft_SetStyle new Material handling
Discussion: #13657.
2024-05-09 10:49:19 +02:00
Roy-043
8e6a308e03 Draft: applyConstructionStyle was missing in params.py 2024-03-04 11:33:10 +01:00
Roy-043
cbd27854df Draft: update DefaultShapeColor in params.py to match new default 2024-02-19 10:11:48 +01:00
Ladislav Michl
05b0f35655 Draft: Use widgets from QtWidgets 2024-01-25 14:27:38 +01:00
Roy-043
544bd1e7ea Arch: implement new get_param functions
Additionally 2 Arch_Window bugs were fixed:
* If the W1 value was changed the box tracker was not repositioned relative to the cursor.
* The WindowColor was not applied because of a typo in the code. De current default color is quite dark BTW.

Note that all dimensional values that were not really defaults, but just the last entered values, have been removed from preferences-archdefaults.ui. As a result the layout looks a bit strange. That will be improved in a next PR.
2024-01-18 15:43:15 +01:00
Roy-043
1fa7eb76c6 Draft: implement new get_param functions (step 6)
See #11677

Added a parameter to the dictionary. The get_parameter and set_parameter functions now print a warning if a parameter is not found.
2023-12-15 14:59:59 +01:00
Roy-043
c2e16f2525 Draft: implement new get_param functions (step 5)
See #11677

Last bits...
2023-12-14 15:53:45 +01:00
Roy-043
d0a87b24d9 Draft: implement new get_param functions (step 4)
See #11677
2023-12-13 19:39:35 +01:00
Roy-043
17e5ef969c Moved another import 2023-12-13 16:32:15 +01:00
Roy-043
3e9b037c44 Moved an import to avoid circular import 2023-12-13 09:59:08 +01:00
Roy-043
12444a1d6b Draft: implement new get_param functions (step 3)
See #11677
2023-12-12 20:20:03 +01:00
Roy-043
3d9c520b0d Draft: implement new get_param functions (step 2)
See #11677
2023-12-12 14:48:09 +01:00
Roy-043
56d73f39ac Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
4262da5fc1 Draft: new get_param function with defaults
This PR introduces a new get_param function. For its default values it checks a dictionary largely filled by reading the preferences UI files. The goal is to have all defaults in one place to avoid inconsistencies. The dictionary is created once and then stored in a global variable.

Once merged this function will be implemented in Draft and Arch. The get_param function in utils.py will become obsolete.

Related issue: #10176
2023-12-11 10:18:50 +01:00
Roy-043
56b8f76cfb Draft: Introduce DefaultAnnoScaleMultiplier parameter
This parameter replaces DraftAnnotationScale.

The parameter can be changed in the preferences and with the Draft_SetStyle command.
2023-12-09 19:17:36 +01:00
Roy-043
096f77d28c Draft: use param observer to update tray 2023-11-27 23:56:00 +01:00
Roy-043
c36979f156 Draft: improve Snap bar show-hide preference
This PR replaces the showSnapBar and hideSnapBar preferences with a single new preference: SnapBarShowOnlyDuringCommands.

Additonally:
Improved some param observer callbacks.
2023-11-24 13:30:03 +01:00
Roy-043
0fdbf9726f Remove 2 unused variables 2023-11-23 09:43:48 +01:00
Roy-043
3fef8bfca0 Draft: param observer: improve handling of statusbar widgets
The Draft statusbar widgets should not be displayed in the Arch and BIM workbenches.

Also updated the copyright header to the current standard.
2023-11-23 09:43:48 +01:00
Roy-043
ccd7d33d70 Draft: add parameter observer
To avoid having to restart FreeCAD after changing parameters.
2023-11-21 20:42:16 +01:00