Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/path-invalid-base-geometry-robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Feb 16, 2021
2 parents cc62aff + 35c1a00 commit 04fb966
Show file tree
Hide file tree
Showing 39 changed files with 348 additions and 161 deletions.
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Behave-dark.qss
Expand Up @@ -1909,6 +1909,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #232932, stop:1 #646464);
border: 1px solid #232932;
border-bottom-color: #434D5B; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Dark-blue.qss
Expand Up @@ -1876,6 +1876,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #6e6e6e, stop:1 #646464);
border: 1px solid #5a5a5a;
border-bottom-color: #505050; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Dark-contrast.qss
Expand Up @@ -1897,6 +1897,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #444444, stop:1 #3c3c3c);
border: 1px solid #424242;
border-bottom-color: #333333; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Dark-green.qss
Expand Up @@ -1876,6 +1876,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #6e6e6e, stop:1 #646464);
border: 1px solid #5a5a5a;
border-bottom-color: #505050; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Dark-orange.qss
Expand Up @@ -1876,6 +1876,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #6e6e6e, stop:1 #646464);
border: 1px solid #5a5a5a;
border-bottom-color: #505050; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Darker-blue.qss
Expand Up @@ -1897,6 +1897,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #444444, stop:1 #3c3c3c);
border: 1px solid #424242;
border-bottom-color: #333333; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Darker-green.qss
Expand Up @@ -1897,6 +1897,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #444444, stop:1 #3c3c3c);
border: 1px solid #424242;
border-bottom-color: #333333; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Darker-orange.qss
Expand Up @@ -1897,6 +1897,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #444444, stop:1 #3c3c3c);
border: 1px solid #424242;
border-bottom-color: #333333; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Light-blue.qss
Expand Up @@ -1877,6 +1877,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #f5f5f5, stop:1 #e6e6e6);
border: 1px solid #d2d2d2;
border-bottom-color: #c3c3c3; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Light-green.qss
Expand Up @@ -1877,6 +1877,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #f5f5f5, stop:1 #e6e6e6);
border: 1px solid #d2d2d2;
border-bottom-color: #c3c3c3; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Gui/Stylesheets/Light-orange.qss
Expand Up @@ -1877,6 +1877,7 @@ QToolBar > QPushButton:!checked {
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #f5f5f5, stop:1 #e6e6e6);
border: 1px solid #d2d2d2;
border-bottom-color: #c3c3c3; /* simulates shadow under the button */
text-align: left; /* bug fix #4559 */
}

QToolBar > QPushButton:checked:hover {
Expand Down
2 changes: 1 addition & 1 deletion src/Main/MainCmd.cpp
Expand Up @@ -53,7 +53,7 @@
using Base::Console;
using App::Application;

const char sBanner[] = "(c) Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2020\n"\
const char sBanner[] = "(c) Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021\n"\
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n"\
"FreeCAD wouldn't be possible without FreeCAD community.\n"\
" ##### #### ### #### \n" \
Expand Down
2 changes: 1 addition & 1 deletion src/Main/MainGui.cpp
Expand Up @@ -59,7 +59,7 @@

void PrintInitHelp(void);

const char sBanner[] = "\xc2\xa9 Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2020\n"\
const char sBanner[] = "\xc2\xa9 Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021\n"\
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n"\
"FreeCAD wouldn't be possible without FreeCAD community.\n"\
" ##### #### ### #### \n" \
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/Arch/ArchComponent.py
Expand Up @@ -1726,6 +1726,8 @@ def __init__(self):
self.classButton.hide()
else:
import os
# the BIM_Classification command needs to be added before it can be used
FreeCADGui.activateWorkbench("BIMWorkbench")
self.classButton.setIcon(QtGui.QIcon(os.path.join(os.path.dirname(BimClassification.__file__),"icons","BIM_Classification.svg")))

QtCore.QObject.connect(self.addButton, QtCore.SIGNAL("clicked()"), self.addElement)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchPipe.py
Expand Up @@ -311,7 +311,7 @@ def getProfile(self,obj):
if not obj.Profile.Shape.Wires[0].isClosed():
FreeCAD.Console.PrintError(translate("Arch","The profile is not closed")+"\n")
return
p = obj.Profile.Shape
p = obj.Profile.Shape.Wires[0]
else:
if obj.Diameter.Value == 0:
return
Expand Down
13 changes: 7 additions & 6 deletions src/Mod/Arch/ArchSectionPlane.py
Expand Up @@ -379,7 +379,7 @@ def getSVG(source,
drafts.append(o)
elif not o.isDerivedFrom("App::DocumentObjectGroup"):
nonspaces.append(o)
if Draft.getType(o) == "Window":
if Draft.getType(o.getLinkedObject()) == "Window": # To support Link of Windows(Doors)
windows.append(o)
objs = nonspaces

Expand Down Expand Up @@ -580,11 +580,12 @@ def getSVG(source,
if windows:
sh = []
for w in windows:
if not hasattr(w.Proxy,"sshapes"):
w.Proxy.execute(w)
if hasattr(w.Proxy,"sshapes"):
if w.Proxy.sshapes and (w.Name in cutwindows):
c = Part.makeCompound(w.Proxy.sshapes)
wlo = w.getLinkedObject() # To support Link of Windows(Doors)
if not hasattr(wlo.Proxy,"sshapes"):
wlo.Proxy.execute(wlo)
if hasattr(wlo.Proxy,"sshapes"):
if wlo.Proxy.sshapes and (w.Name in cutwindows):
c = Part.makeCompound(wlo.Proxy.sshapes)
c.Placement = w.Placement
sh.append(c)
# buggy for now...
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/Draft/draftguitools/gui_beziers.py
Expand Up @@ -235,8 +235,6 @@ def __init__(self):

def GetResources(self):
"""Set icon, menu and tooltip."""
_menu = ""
_tip = ()

return {'Pixmap': 'Draft_CubicBezCurve',
# 'Accel': "B, Z",
Expand Down
6 changes: 2 additions & 4 deletions src/Mod/Draft/draftguitools/gui_groups.py
Expand Up @@ -163,10 +163,8 @@ def GetResources(self):

d = {'Pixmap': 'Draft_SelectGroup',
'MenuText': QT_TRANSLATE_NOOP("Draft_SelectGroup","Select group"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_SelectGroup","If the selection is a group, it selects all objects that are inside this group, "
"including those in nested sub-groups.\n\nIf the selection is a simple object "
"inside a group, it will select the \"brother\" objects, that is,\nthose that are "
"at the same level as this object, including the upper group that contains them all.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_SelectGroup","If the selection is a group, it selects all objects that are inside this group, including those in nested sub-groups.\n\nIf the selection is a simple object inside a group, it will select the \"brother\" objects, that is,\nthose that are at the same level as this object, including the upper group that contains them all.")}

return d

def Activated(self):
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/Draft/draftguitools/gui_shape2dview.py
Expand Up @@ -54,8 +54,6 @@ class Shape2DView(gui_base_original.Modifier):

def GetResources(self):
"""Set icon, menu and tooltip."""
_menu = ""
_tip = ()

return {'Pixmap': 'Draft_2DShapeView',
'MenuText': QT_TRANSLATE_NOOP("Draft_Shape2DView", "Shape 2D view"),
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/Draft/draftguitools/gui_shapestrings.py
Expand Up @@ -62,8 +62,6 @@ class ShapeString(gui_base_original.Creator):

def GetResources(self):
"""Set icon, menu and tooltip."""
_menu = ""
_tip = ()

d = {'Pixmap': 'Draft_ShapeString',
'Accel': "S, S",
Expand Down
1 change: 0 additions & 1 deletion src/Mod/Draft/draftguitools/gui_snaps.py
Expand Up @@ -567,7 +567,6 @@ def __init__(self):

def GetResources(self):
"""Set icon, menu and tooltip."""
_tip = ""

return {'Pixmap': 'Draft_Snap',
'MenuText': QT_TRANSLATE_NOOP("Draft_ShowSnapBar","Show snap toolbar"),
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/Draft/draftguitools/gui_subelements.py
Expand Up @@ -54,8 +54,6 @@ def __init__(self):

def GetResources(self):
"""Set icon, menu and tooltip."""
_menu = ""
_tip = ()

return {'Pixmap': 'Draft_SubelementHighlight',
'Accel': "H, S",
Expand Down
14 changes: 11 additions & 3 deletions src/Mod/Fem/femtaskpanels/task_material_common.py
Expand Up @@ -518,13 +518,21 @@ def check_material_keys(self):

def update_material_property(self, input_field, matProperty, qUnit, variation=0.001):
# this update property works for all Gui::InputField widgets
value = Units.Quantity(input_field.text()).getValueAs(qUnit)
old_value = Units.Quantity(self.material[matProperty]).getValueAs(qUnit)
if qUnit != "":
value = Units.Quantity(input_field.text()).getValueAs(qUnit)
old_value = Units.Quantity(self.material[matProperty]).getValueAs(qUnit)
else:
# for example PoissonRatio
value = float(input_field.text())
old_value = float(self.material[matProperty])
if value:
if not (1 - variation < float(old_value) / value < 1 + variation):
material = self.material
# unicode() is an alias to str for py3
material[matProperty] = unicode(value) + " " + qUnit
if qUnit != "":
material[matProperty] = unicode(value) + " " + qUnit
else:
material[matProperty] = unicode(value)
self.material = material
if self.has_transient_mat is False:
self.add_transient_material()
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/femtaskpanels/task_mesh_gmsh.py
Expand Up @@ -207,7 +207,7 @@ def run_gmsh(self):
"Unexpected error when creating mesh: {}\n"
.format(sys.exc_info()[0])
)
error = sys.exc_info()[0].strip();
error = sys.exc_info()[0].strip()
if error:
FreeCAD.Console.PrintMessage("Gmsh had warnings ...\n")
FreeCAD.Console.PrintMessage("{}\n".format(error))
Expand Down
7 changes: 6 additions & 1 deletion src/Mod/PartDesign/App/FeatureHelix.cpp
Expand Up @@ -504,7 +504,12 @@ double Helix::safePitch()
void Helix::proposeParameters(bool force)
{
if (force || !HasBeenEdited.getValue()) {
double pitch = 1.1*safePitch();
TopoDS_Shape sketchshape = getVerifiedFace();
Bnd_Box bb;
BRepBndLib::Add(sketchshape, bb);
bb.SetGap(0.0);
double pitch = 1.1 * sqrt(bb.SquareExtent());

Pitch.setValue(pitch);
Height.setValue(pitch*3.0);
HasBeenEdited.setValue(1);
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/PartDesign/App/FeatureLoft.cpp
Expand Up @@ -179,6 +179,9 @@ App::DocumentObjectExecReturn *Loft::execute(void)
AddSubShape.setValue(result);

if(base.IsNull()) {
if (getAddSubType() == FeatureAddSub::Subtractive)
return new App::DocumentObjectExecReturn("Loft: There is nothing to subtract from\n");

Shape.setValue(getSolid(result));
return App::DocumentObject::StdReturn;
}
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Path/CMakeLists.txt
Expand Up @@ -84,6 +84,7 @@ SET(PathScripts_SRCS
PathScripts/PathPost.py
PathScripts/PathPostProcessor.py
PathScripts/PathPreferences.py
PathScripts/PathPreferencesAdvanced.py
PathScripts/PathPreferencesPathDressup.py
PathScripts/PathPreferencesPathJob.py
PathScripts/PathProbe.py
Expand Down
6 changes: 0 additions & 6 deletions src/Mod/Path/Gui/DlgSettingsPathColor.cpp
Expand Up @@ -67,9 +67,6 @@ void DlgSettingsPathColor::saveSettings()
ui->DefaultBBoxNormalColor->onSave();
ui->DefaultSelectionStyle->onSave();
ui->DefaultTaskPanelLayout->onSave();
ui->WarningSuppressAllSpeeds->onSave();
ui->WarningSuppressRapidSpeeds->onSave();
ui->WarningSuppressSelectionMode->onSave();
}

void DlgSettingsPathColor::loadSettings()
Expand All @@ -86,9 +83,6 @@ void DlgSettingsPathColor::loadSettings()
ui->DefaultBBoxNormalColor->onRestore();
ui->DefaultSelectionStyle->onRestore();
ui->DefaultTaskPanelLayout->onRestore();
ui->WarningSuppressAllSpeeds->onRestore();
ui->WarningSuppressRapidSpeeds->onRestore();
ui->WarningSuppressSelectionMode->onRestore();
}

/**
Expand Down
75 changes: 2 additions & 73 deletions src/Mod/Path/Gui/DlgSettingsPathColor.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>512</width>
<height>691</height>
<height>573</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -436,7 +436,7 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item row="2" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -449,72 +449,6 @@
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Warnings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="Gui::PrefCheckBox" name="WarningSuppressAllSpeeds">
<property name="toolTip">
<string>Suppress all warnings about setting speed rates for accurate cycle time calculation</string>
</property>
<property name="text">
<string>Suppress all missing speeds warning</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>WarningSuppressAllSpeeds</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Path</cstring>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefCheckBox" name="WarningSuppressRapidSpeeds">
<property name="toolTip">
<string>Suppress warning about setting the rapid speed rates for accurate cycle time calculation. Ignored if all speed warnings are already suppressed.</string>
</property>
<property name="text">
<string>Suppress missing rapid speeds warning</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>WarningSuppressRapidSpeeds</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Path</cstring>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefCheckBox" name="WarningSuppressSelectionMode">
<property name="toolTip">
<string>Suppress warning whenever a Path selection mode is activated</string>
</property>
<property name="text">
<string>Suppress selection mode warning</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>WarningSuppressSelectionMode</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Path</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
Expand All @@ -538,11 +472,6 @@
<extends>QComboBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefCheckBox</class>
<extends>QCheckBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>DefaultNormalPathColor</tabstop>
Expand Down

0 comments on commit 04fb966

Please sign in to comment.