Commit Graph

3601 Commits

Author SHA1 Message Date
Roy-043
2b35ad2281 Draft: Minor cosmetic changes to test files 2025-01-03 22:11:05 +01:00
Roy-043
28d177a725 Add another missing import 2025-01-03 20:32:17 +01:00
Roy-043
4ba16cebb7 Add missing import 2025-01-03 20:10:47 +01:00
Roy-043
4d37256877 Update CMakeLists.txt 2025-01-03 19:56:20 +01:00
Roy-043
0bc9737ca6 Draft: Introduce base classes for Draft tests
To avoid code duplication.
2025-01-03 16:51:42 +01:00
Roy-043
c7630ac065 Draft: Make test_modification tests independent of fillmode
Fixes #18315.

In the issue discussion the more obvious solution (change the MakeFace property of the Draft_Wires) was missed.
2025-01-03 11:38:51 +01:00
Roy-043
9b8b962f56 Draft: Remove unnecessary CamelCase names
The related functions were introduced in V0.19. They should not be also available under CamelCase names.
2024-12-26 12:06:29 +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
db12b31b76 Draft: Fix handling of coin nodes
Fixes #18523.
2024-12-16 18:24:36 +01:00
Syres916
74abfd39d9 [Gui] Show Preferences page by name rather than index 2024-12-16 11:43:13 -05:00
Yorik van Havre
af84424a77 BIM: NativeIFC 2D support - section planes 2024-12-11 10:24:43 +01:00
Yorik van Havre
7913280486 BIM: Support for NativeIFC in BimViews 2024-12-11 09:23:59 +01:00
luzpaz
20d64a7f0f Fix various typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,rin,ro,rougly,sectionin,seperator,serie,shs,sinc,siz,som,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`
2024-12-10 15:09:51 +01:00
wmayer
0607c555d6 Arch/Draft: Fix transparency vs. alpha issues
Fix #18295
2024-12-09 11:50:14 +01:00
Roy-043
28749e44dd Merge pull request #17379 from yorikvanhavre/draft-fix-annotation
Draft: better check for Gui object
2024-12-06 18:05:41 +01:00
Roy-043
e28286a2ef Draft: allow point for Trimex extrusion to be co-planar with the face
Fixes #14826.

If the point for the extrusion height is co-planar with the face, the normal of the face is used for the direction of the extrusion. The user can then enter a positive or negative value in the task panel. It is probably not the ideal solution, but better than what we have now I think.
2024-12-06 13:10:18 +01:00
Roy-043
6858a1c0b4 Draft: make Trimex extrude mode link-aware
Fixes #14670.
2024-12-05 15:53:38 +01:00
Roy-043
672819fd6b Merge pull request #18299 from Roy-043/Draft-change-position-of-Scale-multiplier-field-in-UI
Draft: change position of 'Scale multiplier' field in UI
2024-12-05 12:17:38 +01:00
Roy-043
e41ac03bcc Merge pull request #18307 from Roy-043/Draft-Fix-make_point-color-regression
Draft: Fix make_point color regression
2024-12-05 11:53:24 +01:00
Roy-043
32fa1f7411 Merge pull request #18212 from Roy-043/Draft-Fix-finish-behavior-of-Draft_Edit-on-doc-close
Draft: Fix finish behavior of commands on doc close
2024-12-05 11:52:07 +01:00
Roy-043
270d48b42b Draft: Fix make_point color regression
PR #12226 accidentally removed the handling of the color argument of the make_point function.
2024-12-05 08:36:34 +01:00
luzpaz
96c838f3b9 Fix various typos
Found with codespell
2024-12-04 23:18:00 -05:00
Roy-043
afdf07717d Draft: change position of 'Scale multiplier' field in UI
Fixes #16501.
2024-12-04 19:44:35 +01:00
Roy-043
7a7c042ab8 Draft: Legacy DXF importer: fix layer block behavior (#18129)
Fixes #16550.
Fixes #16552.

* Layer blocks receive a name with the "LayerBlock_" prefix.
* They are put in a layer if the "Use layer" import option is checked.
* If Draft or Sketch objects are created a Part_Compound instead of a Draft_Block is created. This was done because a Draft_Block does not claim its children. I am not sure about this change. Maybe the behavior of the Draft_Block should be changed instead.

@yorikvanhavre: do you know why a Draft_Block does not claim its children?
2024-12-04 14:45:55 +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
Roy-043
0ae35d6bab Include other Draft commands 2024-11-30 16:48:41 +01:00
Roy-043
e40cab88ad Draft: Fix finish behavior of Draft_Edit on doc close
Forum topic:
https://forum.freecad.org/viewtopic.php?p=794746#p794746
2024-11-30 11:47:10 +01:00
Roy-043
0cd5768fbd Draft: Draft_Fillet: fix error in #17945 (#18150)
* Draft: Draft_Fillet: fix error in #17945

In #17945 the delete option of the command results in an error if subobjects are selected.

* Command should not be available if there is no selection

* Update copyright notice
2024-11-29 20:37:48 +01:00
Roy-043
1e00d8f898 Merge pull request #18142 from Roy-043/Draft-fix-focus-behavior-of-radius-input
Draft: fix focus behavior of radius input
2024-11-29 18:08:20 +01:00
Roy-043
27d2e5d07f Merge pull request #18164 from Roy-043/Draft-Fix-cursor-scaling-for-xcb-platform
Draft: Fix cursor scaling for xcb platform
2024-11-29 17:56:06 +01:00
Roy-043
d9a4f8a590 Draft: fix color of arrays (#18123)
If `get_diffuse_color` returned a list with a single color, the list was wrongly multiplied. Regression introduced in V0.21, but in that version the error was masked by how Core handled the diffuse color.

Fixes #17052.
2024-11-29 17:54:29 +01:00
Roy-043
735a07678d Draft: Draft_Split: apply original view props to split off object
Fixes #16210.

Note that `Draft.format_object` is called from gui_split.py (in the commit). This is not consistent with other tools where this is handled in the `make_*` functions. In this case the new object is formatted twice. The 1st time by the `make_wire` code which (wrongly) applies the current default props.
2024-11-29 10:56:29 +01:00
Roy-043
42d09e08d5 Draft: fix handling of Links in TD DraftViews
Forum topic:
https://forum.freecad.org/viewtopic.php?t=92476

For LinkGroups and Links to Std_Groups that do not have a default placement, a temporary hidden document is used to handle the placement of their children. This is a bit of a hack of course.
2024-11-29 10:55:31 +01:00
Roy-043
bc5bf9bbdc Draft: Sort AutoGroup dropdown menu alphabetically
Fixes #16191.
2024-11-29 10:51:00 +01:00
Roy-043
0cf2cec816 Draft: Fix cursor scaling for xcb platform
Forum topic:
https://forum.freecad.org/viewtopic.php?t=92281

Apparently the extra scaling for the "xcb" platform is wrong.
2024-11-28 14:01:52 +01:00
Roy-043
6b1131dd5a Draft: fix focus behavior of radius input
Fixes #16249.

The input did receive the focus, but the existing value was not selected.

The circle, arc, trim and offset tools had a related issue. The whole radius/distance value, including the unit string, was selected, instead of just the numerical portion.
2024-11-26 16:48:35 +01:00
Roy-043
9d38f0e857 Draft: Legacy DXF importer: fix layer block behavior
Fixes #16550.
Fixes #16552.

* Layer blocks receive a name with the "LayerBlock_" prefix.
* They are put in a layer if the "Use layer" import option is checked.
* If Draft or Sketch objects are created a Part_Compound instead of a Draft_Block is created. This was done because a Draft_Block does not claim its children. I am not sure about this change. Maybe the behavior of the Draft_Block should be changed instead.

@yorikvanhavre: do you know why a Draft_Block does not claim its children?
2024-11-25 20:15:16 +01:00
Roy-043
9ec977f89d Draft: Allow selection of subelements for Draft_Fillet
Fixes #17505.
2024-11-25 18:21:50 +01:00
Roy-043
298e6921a7 Draft: fix color of arrays
If `get_diffuse_color` returned a list with a single color, the list was wrongly multiplied. Regression introduced in V0.21, but in that version the error was masked by how Core handled the diffuse color.

Fixes #17052.
2024-11-25 17:43:56 +01:00
paul
6c85c37b38 [Draft Gui_Stretch] Improve Stretch Rectangle Behaviour (#18063)
* [Draft gui_stretch] Improve Stretch Rectangle Behaviour

Feature Improvement discussed at FreeCAD Forum :
- https://forum.freecad.org/viewtopic.php?t=92124#p792118  (Draft_Stretching the whole rectangle creates a new wire)

Currently, 3 cases in general, proposed PR improve Case 3 below :

1. The original object is a Rectangle, if after stretching it is no longer a rectangle, it makes a copy turning it into a Wire which reflect the result of stretching.
   - Current behanviour is good for user, no change.
2. If after stretching it is still a rectangle, the code just resize the original.
   - Current behanviour is good for user, no change.
3. Now, if the user 'stretch' the whole rectangle, the code creates a copy as DWire in the 'stretched location'.
** - Users find this not intuitive, better just move the whole rectangle.
2024-11-25 14:47:06 +01:00
Roy-043
0656f19bde BIM+Draft: Bring back human figure
* For the human figure attached to the Draft grid a hard-coded point list is used (instead deriving the points from human figure.brep). This is more efficient and avoids a dependency on the BIM WB.
* The default for the human figure preference of the grid was changed to false. And the tooltip adjusted.
2024-11-25 13:34:53 +01:00
Roy-043
ed209dab68 Draft: minor improvements for gui_edit.py (#17970)
* Draft: minor improvements for gui_edit.py

* Fix error...
2024-11-25 13:34:23 +01:00
Roy-043
638e677bd3 Increase the delay to be on the safe side. 2024-11-25 11:40:55 +01:00
Roy-043
51666cafc0 Draft: avoid listing status bar widgets in toolbar area context menu
Fixes #16832.

In V1.0 the two Draft status bar widgets appear as checkboxes without label in the toolbar area context menu. They should not be listed in that menu, as was the case in V0.21. Their visibility is controlled via preferences.

Additionally, in case the Draft WB is only preloaded, the widgets would display in another workbench. This is prevented by using a delay.
2024-11-25 11:40:55 +01:00
Yorik van Havre
89d1d717eb BIM: Optimized leader UI (#17310)
* BIM: Optimized leader UI - fixes #17284

* Correct task panel icon for BIM Leader.
* Make BIM Leader task panel title translatable.
* Use a single mode parameter for the Line class.

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
2024-11-16 18:10:04 +01:00
Roy-043
1c19a7e85d Draft: fix tray construction mode button for Light and Dark themes (#17886)
Fixes #17869.
2024-11-16 18:04:26 +01:00
Gauthier Brière
f08cf60155 [Draft] add font path relative (#17819)
* Permit a font file path relative to the FreeCAD file

* Use obj.Document instead of App.ActiveDocument

* use filename = instead of directory =
2024-11-16 18:02:02 +01:00
Yorik van Havre
8f9718ebc6 Draft: minor fixes (#17793)
- more tolerance on faultly solids in shape2Dview
- fixed display of dimensions in arch override unit
2024-11-16 17:52:55 +01:00
Roy-043
f723f36d2a Draft: Fix extra_scale error in hatch.py (#17715)
Fixes #17712.
2024-11-16 17:49:35 +01:00