Commit Graph

24830 Commits

Author SHA1 Message Date
Matthijs Kooijman
ffbac23432 Draft: Improve docs for get_group_contents spaces parameter
The documentation suggested subtly different semantics from what the
code implements.
2021-05-09 17:33:46 +02:00
Matthijs Kooijman
2a60d81c7d Arch: Do not draw draft-like groups twice in section view
When drawing a section view, first a list of objects to draw is made.
Starting with the objects selected by the section plane, any groups or
group-like objects are recursively expanded. The resulting list contains
all contained objects, but also the expanded groups themselves (due to
Draft.get_group_contents with addgroups set).

This list of objects is then further categorized and processed. In this
categorization, there was already an exception for DocumentObjectGroup
instances, which were omitted from the resulting `nonspaces` list
(presumably since there is no point in drawing the groups themselves
when their contents are already in the list).

However, any groups that only contain flat objects would be caught by
`looksLikeDraf()` and added to the `drafts` list, before this exception
could ignore them.

This causes these groups to be processed by Draft.get_svg, which does so
by calling itself recursively on the group contents. Effectively, this
means that the contents of such groups is drawn on the section view
twice. Even more, since Draft.get_svg does not do a visibility check
like Arch.getSVG does, this causes invisible objects to show up when not
intended.

This commit fixes this by moving the DocumentObjectGroup exception a bit
further up, so all these objects should be dropped.

An alternative fix might be to pass addgroups=False to
Draft.get_group_contents (in getSectionData), but that also prevents
group-like objects (Building, BuildingPart, Space, Site) from being
returned, but those likely need to be returned so they can be sectioned
if needed (though if just spaces are needed, then
Draft.get_group_contents also have a spaces argument to return just
those).
2021-05-09 17:19:05 +02:00
Yorik van Havre
2a72f30531 Merge pull request #4775 from amrit3701/arch/rebar-allow_negative_offset
[Arch]: allow Rebar OffsetStart and OffsetEnd in negative also
2021-05-03 22:08:02 +02:00
Amritpal Singh
feb8746563 Arch: allow Rebar OffsetStart and OffsetEnd in negative also 2021-05-03 23:06:05 +05:30
wmayer
a6e7bdf849 allow to enable PCH for gcc and clang 2021-05-03 17:37:58 +02:00
Yorik van Havre
a5bab10ff7 Draft: Added a 'solid faces' projection mode to shape2dviews to treat individual faces 2021-04-30 16:44:20 +02:00
Yorik van Havre
e605b2f930 Draft: Allow to set 'arch' unit override on dimensions 2021-04-29 19:51:34 +02:00
Yorik van Havre
117ec1b918 Merge pull request #4766 from waebbl/module-test-issue
[Test] fix failing test in Test module
2021-04-29 12:47:15 +02:00
Yorik van Havre
e66b51946b Merge pull request #4688 from marioalexis84/draft-feature_name
Draft: Make featureName attribute translation-independent
2021-04-29 12:40:38 +02:00
Yorik van Havre
c0c49ebffc Merge branch 'master' into draft-feature_name 2021-04-29 12:40:27 +02:00
Bernd Waibel
203d408429 [Test] fix failing test
Solves an issue with the test module when running test-suite
as described in
https://forum.freecadweb.org/viewtopic.php?f=10&t=58099

Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
2021-04-28 22:09:55 +02:00
Yorik van Havre
d5393bb1e1 Merge pull request #4764 from KeithSloan/addElement
OpenSCAD - Add element ( Load | Save | Refresh )
2021-04-28 12:37:45 +02:00
wmayer
545d055766 Gui: [skip ci] fix crash in SequencerBar::setProgress or SequencerDialog::setProgress when used in worker threads 2021-04-28 12:02:52 +02:00
wmayer
0909fa76aa Base: allow to use the classes XUTF8Str and StrXUTF8 outside FreeCADBase 2021-04-28 10:56:17 +02:00
luz paz
63cd79538e Misc: remove py2 code 2021-04-27 18:52:01 +02:00
Keith Sloan
985cbad2fa Add Load/Save/Refresh to add OpenSCAD Elements 2021-04-27 17:42:06 +01:00
wmayer
56c92d1198 Fix generation and build of python classes for 3.8 2021-04-27 14:35:34 +02:00
wmayer
f439e62639 Path: [skip ci] fix memory leaks 2021-04-27 14:32:35 +02:00
wmayer
0e7d9171db Path: [skip ci] fix memory leaks 2021-04-27 13:02:57 +02:00
markus
d6fa0b1d18 Fix generation and build of python classes for 3.9 2021-04-27 00:41:53 +02:00
wmayer
0ff70c61ed Sketcher: [skip ci] fix memory leak in GeometryFacade 2021-04-27 00:20:57 +02:00
wmayer
5e2abd4f80 Sketcher: [skip ci] remove superfluous semicolons 2021-04-26 23:05:18 +02:00
wmayer
3347c5e632 Base: [skip ci] do not make PyBaseProxy class declaration dependent on ATTR_TRACKING 2021-04-26 15:57:17 +02:00
Yorik van Havre
3a3fe0c778 Added KiCAD Corp to the credits 2021-04-26 12:55:57 +02:00
wmayer
01d621406f Sketcher: [skip ci] fix memory leak in GeometryFacadePy 2021-04-26 12:30:02 +02:00
wmayer
8371162427 Base: remove obsolete swig source files 2021-04-26 11:20:13 +02:00
wmayer
58f72ccc80 Part: remove some more deprecated Py2 code 2021-04-26 11:13:22 +02:00
wmayer
76fb44c2d8 Image: remove some more deprecated Py2 code 2021-04-26 11:12:51 +02:00
wmayer
1e589f05df Drawing: remove some more deprecated Py2 code 2021-04-26 11:12:34 +02:00
wmayer
adc5ffa803 Path: remove some more deprecated Py2 code 2021-04-26 11:11:35 +02:00
wmayer
cca3981b3f Points: remove some more deprecated Py2 code 2021-04-26 11:04:53 +02:00
wmayer
83dcfae0f6 Raytracing: remove some more deprecated Py2 code 2021-04-26 11:04:26 +02:00
wmayer
72a3b9cb51 Spreadsheet: remove some more deprecated Py2 code 2021-04-26 11:03:48 +02:00
wmayer
b831d9d7f2 TD: remove some more deprecated Py2 code 2021-04-26 11:01:59 +02:00
wmayer
2c0ce4eda4 Gui: remove some more deprecated Py2 2021-04-26 10:59:32 +02:00
wmayer
e92325c9c9 App: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:55:56 +02:00
wmayer
c563198b35 Base: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:29:48 +02:00
luz paz
59b7e9fdd0 Base: remove Py2 code 2021-04-26 09:23:58 +02:00
bitacovir
1d4722f32c [UI] Replace SVG icon files for Plain SVG format 2021-04-25 22:04:17 +02:00
wmayer
5626bab055 App: [skip ci] fix memory leaks:
Found two memory leaks in class Enumeration
* method tearDown() always ignored to free the memory of the first element
* assignment operator didn't call tearDown() when needed
2021-04-25 21:58:24 +02:00
Keith Sloan
1e82643eed Add load/save/refresh to addElement 2021-04-25 15:10:46 +01:00
wmayer
8c4d77f2ca TD: do not delete mtextedit.h for in-source builds 2021-04-25 13:15:20 +02:00
luz paz
e0ab0382b3 Part: remove py2 code 2021-04-25 11:29:35 +02:00
luz paz
17ffa8255b Gui: remove py2 code 2021-04-25 11:27:48 +02:00
luz paz
2321c90c76 Mesh: remove py2 code 2021-04-25 11:26:39 +02:00
luz paz
1212bef4cd [FEM] remove Py2 code 2021-04-25 11:25:29 +02:00
0penBrain
5c10c586cd [Sketcher] Visibility automation : add ability to open sketch in Section View mode 2021-04-24 16:22:46 +02:00
Abdullah Tahiri
841c328eb3 Sketcher: Changes to split edge functionality
=============================================

This commit is directed to external functionality of the split() function.

1. getAppliedConstraints renamed to getConstraintIndices

This is just for clarity being a general function

2. SwapInvolvedGeometry functionality moved to Constraint class

Why?
i. Because it is a specific operation on a constraint, it must not be
a public function, as it does not define interface of the Sketch.
ii. It could be a lambda or a private utility function, but them it would not be reusable.
iii. It could be part of a helper class, but then, it is would be less reusable.

3. renaming of the flag passed to transferConstraints function
2021-04-24 14:38:44 +02:00
Tomas Pavlicek
a7d83b5e15 Sketcher - Add new Split Edge action 2021-04-24 14:30:35 +02:00
wmayer
9209d35390 TD: fix memory leaks in BaseGeom::baseFactory() and make code more readable 2021-04-23 17:05:13 +02:00