Commit Graph

3805 Commits

Author SHA1 Message Date
Roy-043
7e986d85f5 Draft: toolbar names to title case
This was  missed in #22331.
2025-08-10 21:27:38 +02:00
Roy-043
9178540438 Draft: update WP Proxy string for consistency (#23012)
* Update gui_planeproxy.py
2025-08-10 13:01:27 +00:00
Max Wilfinger
1850c5dc0f Fix missed strings for UI consistency
Fix ellipsis rendering
2025-08-08 06:37:59 -05:00
Max Wilfinger
386c5cd910 Draft: Update UI strings for consistency (#22331)
* Draft: Update UI strings for consistency

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-08-06 23:02:16 +02:00
Roy-043
e4a635ad07 Draft: project point in split operation and copy original wire (#22452)
* Roy 043 patch 1 (#6)

* Update split.py

* Update gui_split.py

* Add recompute to update wire in split test

* Avoid circular import: init_draft_statusbar -> params -> init_draft_statusbar

* Remove accidentally added "ui/preferences-webgl.ui"
2025-08-05 14:41:03 -05:00
Roy-043
ab1db2c231 Draft: fix size of file button in Hatch task panel
Fixes #22790.

To keep the file button at the correct size a vertical bottom spacer is required.
2025-08-04 11:05:48 -05:00
Roy-043
3a94a42956 Draft: fix display of cross-shaped cursor
If snapping was off, and after clicking the first point of a new line (for example), the cursor would be a default arrow instead of the intended cross-shaped cursor.

Note that the arrow cursor is still displayed for a fraction of a second after this fix.

May also fix #16559.
2025-08-04 11:02:38 -05:00
Roy-043
fed3301fe2 Draft: show dotted lineTracker in Trimex extrude mode (#22509)
* Draft: show dotted lineTracker in Trimex extrude mode

* Fix copy-paste error
2025-07-28 18:02:01 +02:00
Roy-043
d590fdf3e6 Draft: fix handling of MouseDelay
The MouseDelay sets a point value to None. In some cases this point was then still used resulting in attribute errors.

See:
https://github.com/FreeCAD/FreeCAD/issues/19531#issuecomment-2651341711
2025-07-28 17:52:02 +02:00
Yorik van Havre
512a22d39b Merge pull request #22251 from furgo16/dxf-new-import-ui-and-more
Redesign DXF import UI, add Part primitives and Draft object import modes
2025-07-28 17:49:25 +02:00
alafr
30f5e0eaac Draft: Enable Draft Edit for Draft Labels (#13445)
* Draft: implement DraftLabelGuiTools

TODO:
1- support for custom StraightDirection with any number of points
2- fix EditNode positions when the label is inside a Part

* Draft: enable Draft Edit for Draft Label object

TODO:
Make the edition possible also with double-click in the tree view

* Draft: Trigger Edit on double click on Label in the tree view

Fix part 1/2 of comment https://github.com/FreeCAD/FreeCAD/pull/13445#issuecomment-2079672899

* Draft: Edit Label: enable to move one or move both nodes

The following apply to both edit points of the straight segment:
- If a point is moved exactly on the direction of the straight segment (set the WP to the Label object and use Shift key while moving the node), then it's length is changed without moving the other point.
- If a point is moved in any other direction, both points are moved and the straight segment's length is unchanged

Part 2/2 of https://github.com/FreeCAD/FreeCAD/pull/13445#issuecomment-2079672899
2025-07-27 17:26:12 +02:00
Roy-043
3b8dc20acc Draft: fix hang on snapping to large point cloud 2025-07-21 11:04:53 -05:00
Ilya Baidakov
702e16a353 Add custom template path support for WebGL export (#21695)
* Add custom template path support for WebGL export
- Extract hardcoded template into separate file and store in Mod/BIM/Resources/templates
- Remove hardcoded template from code
- Add new section to Import-Export Preference page ("WebGL"). This introduces two new parameters
- Make export() return bool to indicate success or failure for controlled headless export
- Add new unit tests for WebGL export to ensure functionality
- Update CMakeLists.txt to include the new template resource

* Apply suggestions from code review

Changes to literals, suggested after DWG review

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Removed unused import

* Removed unused import

---------

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>
2025-07-14 22:25:57 +00:00
Furgo
66f92850da Remove debug print statement 2025-07-14 10:18:04 +02:00
Furgo
75d6cee905 Import: DXF, fix CodeQL errors 2025-07-14 10:18:04 +02:00
Furgo
f18b33565d Import: DXF, make straight polylines Draft-editable 2025-07-14 10:18:04 +02:00
Furgo
8ab525ddb9 Import: DXF, correctly transfer Draft.Line points to make them editable 2025-07-14 10:18:04 +02:00
Furgo
9b33975697 Import: DXF, add suggestions and improve UI copy. 2025-07-14 10:18:04 +02:00
Furgo
d1e131863b Import: DXF, first working version of dimensions import 2025-07-14 10:18:04 +02:00
Furgo
9f9104e182 Import: DXF, make ellipses parametric 2025-07-14 10:18:04 +02:00
Furgo
a295f9dd5c Import: DXF, first working version of Draft objects import 2025-07-14 10:18:04 +02:00
Furgo
5951d759f8 Import: DXF, first working version for import as Part primitives 2025-07-14 10:18:04 +02:00
Furgo
293ebf801c Import: DXF, add dedicated import dialog 2025-07-14 10:18:04 +02:00
Furgo
37cd1a657a Import: DXF importer, refactor preferences UI 2025-07-14 10:18:04 +02:00
Furgo
ef9378bd5b Import: improve DXF C++ importer support for BLOCK and INSERT entities (#22045)
* Import: DXF importer, block and inserts overhaul

Implement support for blocks as definitions and inserts
as instances.

A BLOCK definition becomes a hidden master object in a
_BlockDefinitions group (currently a Part::Compound).
An INSERT becomes a visible App::Link that points to
that master definition.

* Import: DXF parser/importer add debug print statements

* Import: DXF importer, various improvements

- Add more code comments
- Correctly increase object count
- Improve readability of anonymous block checks

* Import: DXF (all) report anonymous blocks separately

* Import: DXF importer (App + GUI) add nested inserts support

* Import: DXF importer (GUI) fix preserving colors for inserts

* Import: DXF importer, make primitives naming more specific

* Import: DXF parser/importer remove debug print statements

* Import: DXF parser, work around DXF color index 7

* Import: DXF importer GUI, temporary debug print to show layer color data

* Import: DXF importer, fix nested inserts hierarchy

* Import: DXF importer, prefix and suffix underscores to names

To work around mangling from FreeCAD's unique name generator.

* Import: DXF importer, implement flattening blocks on import

* Revert "Import: DXF importer GUI, temporary debug print to show layer color data"

This reverts commit b6ece395c9d2b8a1e0796d6f7b0d58842a2f3686.

* Import: DXF importer, fix imported text orientation

The DXF file provides the text rotation angle in degrees.
The used rotZ function expects the angle in radians,
thus the conversion needs to be made.

Fixes: #21548

* Import: DXF importer, honour the preference to not import layouts

* Import: DXF importer, move unreferenced blocks to separate group

This provides better classification, but it has a performance hit:
we import all blocks as before, we sort them and we reparent them
to the correct group. The reparentipart with Grou.setValues()
appears to be an expensive call. Probably because internally the
FreeCAD dependency graph is modified.

* Import: DXF importer, count compound children in the report

* Import: DXF importer, cleanup defined blocks group if empty
2025-07-12 13:38:13 +02:00
Roy-043
a30197fd6c Draft: 1st downgrade of lofts and sweep should be de-parametrization 2025-07-12 13:29:32 +02:00
Roy-043
0ccfaf2d8a Draft: gui_utils.py minor improvement for autogroup 2025-07-07 17:03:21 +02:00
Roy-043
3e39a01312 Draft: make_sketch.py should not use view direction (#22249) 2025-07-07 17:02:14 +02:00
Roy-043
12f4d1da2e BIM: fix profile selection (#22223)
* Update params.py

* Update ArchStructure.py

* Update BimProfile.py
2025-07-07 14:39:55 +02:00
Roy-043
22c92d550c Update DraftGui.py 2025-07-05 22:44:22 +02:00
Roy-043
8add557e2f Draft: fix setting of self.Type
Fixes #17750.

`self.Type` should be set in `__init__` and `loads`, and not in `onDocumentRestored`.
2025-06-30 11:05:25 -05:00
Chris Hennes
faa56d4e3f Merge pull request #21985 from furgo16/dxf-stats-reporter
Import: add DXF statistics reporter
2025-06-30 10:55:57 -05:00
Syres916
b0c63c5537 [BIM][Draft] QCheckBox fix regressions introduced by PR #21939 (#22199)
* [BIM][Draft] QCheckBox fix regressions introduced by PR #21939

* [BIM] Remove unwanted index values - CodeQL feedback
2025-06-27 11:25:36 +02:00
tetektoza
a5eff61993 Draft: Remove redundant QGroupBoxes from some of the array panels (#21980)
* Draft: Remove main QGroupBox from Circular Array tool

* Draft: Remove main QGroupBox from Polar Array tool

* Draft: Remove main QGroupBox from Ortho Array tool

* Draft: Remove AxisMode QGroup from Ortho Array tool

* Draft: Remove main QGroup from ShapeString tool
2025-06-26 10:11:26 +02:00
Furgo
0056f4d9a9 Import: DXF reporter, add unsupported indicator 2025-06-25 07:41:03 +02:00
Furgo
9ac905b140 Import: DXF reporter, add filename to report 2025-06-25 07:41:03 +02:00
Furgo
318f205708 Import: DXF backend/frontend, report more unsupported features info
Now for unsupported features we report on line numbers and on the entity
handle, in case that unsupported feature is a DXF entity. To avoid
flooding the output, only a maximum of 5 instances are reported with
details. The rest simply add up to the global count and are ellipsized
in the report.

Report output is now in sentence case.
2025-06-25 07:41:03 +02:00
Furgo
f84ed59a43 Import: DXF backend, frontent; add time measurement 2025-06-25 07:41:03 +02:00
Furgo
77e4047871 Import: DXF frontend, improve scale reporting 2025-06-25 07:41:03 +02:00
Furgo
d17db2ded1 Import: DXF Python frontend, implement stats reporter 2025-06-25 07:41:03 +02:00
alafr
8329a181c9 Draft : fix Label Justification (#13444)
Draft Label ViewObject.Justification property was overriden by Object.StraightDistance property. The Justification in the 3D view was reset after recompute. This commit fixes the problem by setting Object.StraightDistance automatically when ViewObject.Justification is changed and vice versa. Also fixes the frame position when Justification is Center.
2025-06-24 10:45:46 +02:00
Syres916
8844319d33 [BIM][Draft][CAM] preparation for deprecation of QCheckBox… (#21939)
* [BIM][Draft]{CAM] preparation for deprecation of QCheckBox stateChanged -> checkStateChanged
2025-06-18 11:24:21 +02:00
Chris Hennes
21b607a110 Draft: Eliminate redundant assignment to self (#22006)
* Draft: Eliminate redundant assignment to self

* Removed confusing comment.

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-06-17 09:40:01 +02:00
Furgo
38499d4470 DXF: rename "Group layers into blocks" setting (#21896)
* DXF: rename "Group layers into blocks" setting

* DXF: apply suggested improvement children => contents

* Import: DXF, change tooltip to reflect the reality of the current code

https://github.com/FreeCAD/FreeCAD/pull/21896#issuecomment-2958611607
2025-06-17 09:38:38 +02:00
Roy-043
e6408f41af Rebase and minor adjustments 2025-06-16 18:25:59 +02:00
Chris Hennes
a5cc926bf5 Merge pull request #21921 from furgo16/add-prefcheckablegroupbox
Gui, Draft, BIM: Add PrefCheckableGroupBox, use it in IFC exporter preferences page
2025-06-16 11:06:30 -05:00
Roy-043
b1358b7f55 Draft: OrthoArray task panel change some strings to sentence case (#21959)
X Axis -> X axis
Same for Y and Z.
2025-06-12 19:52:52 +02:00
Furgo
cf5cf2babf Draft: handle reading defaults from PrefCheckableGroupBox 2025-06-11 02:44:52 +02:00
Mino-Tsuzuku
e70fde5773 Draft: Fix several SVG import bugs (#20293)
* Fix #19422 SVG: use tag create wrong size object
Fix #19072 SVG: import <defs> keyword as object without <use>
and Fix bug that not reported, <symbol> keyword as object without <use>
and Fix bug that not reported, nested use tag not import correctly.
 To do this. I make preprocessor that replace use tag to it's referenced object.
and remove symbol tag and defs tag from loaded svg.
 there is a subeffect, name of imported object that related to symbol tag is changed.

* Fix  incorrect import when use tag nesting context.

* fix error when use tag not exist.

* rebased aprospero PR20293.
fix several bugs.
1,x and y attribute of use tag is not processed under certain condition.
2,Doesn't finish importing when referenced ID is not exist.
3,Doesn't finish importing when use tag use href instead of xlink:href

* Refactor: Use data.get() for cleaner dictionary key handling

* Refactored code for simplicity following suggested changes.

* Add <a> tag support.( <a>tag  is  almost same with <g> tag at visual effect )

* Correct mistakes in the if condition handling href and xlink:href

* Modify the code to retain the original namespace definitions, as removing all namespaces may cause incorrect importing process.
2025-06-09 23:44:37 +02:00
tetektoza
46b7c6c385 Draft: Introduce 1-axis mode for ortho array (#21602)
* Draft: Introduce 1-axis mode for ortho array

As the title says - the 1 axis mode allows to switch between all of the
axises mode and allows to modify only 1 axis at the time that user can
select with the checkbox.

* Draft: Rename to Linear Mode and remove redundant comments

* Draft: Display only one interval for the selected axis

* Draft: Cache selected variables in user.cfg - axis mode, intervals, etc...

* Draft: Make sure the checkboxes in OrthoArray are exclusively selected

* Draft: Apply review comments

Changed a couple of things according to review:
* linear mode is now being used as default during first startup (it
  wasn't before)
* applied Roy's comments about coding style, etc.
* grouped everything into separate QGroupBox which is dedicated for
  Linear Mode and has it's own labels, although spinboxes are shared so
  during mode switch we reparent them now
* removed Orthogonal Array's icon
* in the QGroup applied naming suggested in the review, X Intervals ->
  interval, etc.
* changed to radio buttons since we want exclusivity in selection
2025-06-09 17:33:51 +02:00