diff --git a/src/Gui/DlgSettings3DView.ui b/src/Gui/DlgSettings3DView.ui
index 07024daf4e..25c45f3814 100644
--- a/src/Gui/DlgSettings3DView.ui
+++ b/src/Gui/DlgSettings3DView.ui
@@ -214,6 +214,45 @@ but slower response to any scene changes.
-
+
+
+
+
+
+ Transparent objects:
+
+
+
+ -
+
+
+
+ 120
+ 0
+
+
+
+ Render types of transparent objects
+
+
+ TransparentObjectRenderType
+
+
+ View
+
+
-
+
+ One pass
+
+
+ -
+
+ Backface pass
+
+
+
+
+ -
@@ -223,7 +262,7 @@ but slower response to any scene changes.
- -
+
-
@@ -236,14 +275,14 @@ but slower response to any scene changes.
- -
+
-
Eye to eye distance for stereo modes
- -
+
-
@@ -279,7 +318,7 @@ bounding box size of the 3D object that is currently displayed.
- -
+
-
Backlight is enabled with the defined color
@@ -295,7 +334,7 @@ bounding box size of the 3D object that is currently displayed.
- -
+
-
false
@@ -318,7 +357,7 @@ bounding box size of the 3D object that is currently displayed.
- -
+
-
Qt::Horizontal
@@ -331,7 +370,7 @@ bounding box size of the 3D object that is currently displayed.
- -
+
-
false
@@ -347,7 +386,7 @@ bounding box size of the 3D object that is currently displayed.
- -
+
-
false
diff --git a/src/Gui/DlgSettings3DViewImp.cpp b/src/Gui/DlgSettings3DViewImp.cpp
index 6365e0e547..90db0ba8ce 100644
--- a/src/Gui/DlgSettings3DViewImp.cpp
+++ b/src/Gui/DlgSettings3DViewImp.cpp
@@ -83,6 +83,8 @@ void DlgSettings3DViewImp::saveSettings()
index = ui->renderCache->currentIndex();
hGrp->SetInt("RenderCache", index);
+ ui->comboTransparentRender->onSave();
+
QVariant const &vBoxMarkerSize = ui->boxMarkerSize->itemData(ui->boxMarkerSize->currentIndex());
hGrp->SetInt("MarkerSize", vBoxMarkerSize.toInt());
@@ -124,6 +126,8 @@ void DlgSettings3DViewImp::loadSettings()
index = hGrp->GetInt("RenderCache", 0);
ui->renderCache->setCurrentIndex(index);
+ ui->comboTransparentRender->onRestore();
+
int const current = hGrp->GetInt("MarkerSize", 9L);
ui->boxMarkerSize->addItem(tr("5px"), QVariant(5));
ui->boxMarkerSize->addItem(tr("7px"), QVariant(7));
diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp
index b0228fe3c1..71c3608b4a 100644
--- a/src/Gui/View3DInventor.cpp
+++ b/src/Gui/View3DInventor.cpp
@@ -189,6 +189,7 @@ View3DInventor::View3DInventor(Gui::Document* pcDocument, QWidget* parent,
OnChange(*hGrp,"Dimensions3dVisible");
OnChange(*hGrp,"DimensionsDeltaVisible");
OnChange(*hGrp,"PickRadius");
+ OnChange(*hGrp,"TransparentObjectRenderType");
stopSpinTimer = new QTimer(this);
connect(stopSpinTimer, SIGNAL(timeout()), this, SLOT(stopAnimating()));
@@ -414,6 +415,17 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
else if (strcmp(Reason, "PickRadius") == 0) {
_viewer->setPickRadius(rGrp.GetFloat("PickRadius", 5.0f));
}
+ else if (strcmp(Reason, "TransparentObjectRenderType") == 0) {
+ long renderType = rGrp.GetInt("TransparentObjectRenderType", 0);
+ if (renderType == 0) {
+ _viewer->getSoRenderManager()->getGLRenderAction()
+ ->setTransparentDelayedObjectRenderType(SoGLRenderAction::ONE_PASS);
+ }
+ else if (renderType == 1) {
+ _viewer->getSoRenderManager()->getGLRenderAction()
+ ->setTransparentDelayedObjectRenderType(SoGLRenderAction::NONSOLID_SEPARATE_BACKFACE_PASS);
+ }
+ }
else {
unsigned long col1 = rGrp.GetUnsigned("BackgroundColor",3940932863UL);
unsigned long col2 = rGrp.GetUnsigned("BackgroundColor2",859006463UL); // default color (dark blue)
diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp
index 519a904e8d..0458794dea 100644
--- a/src/Gui/View3DInventorViewer.cpp
+++ b/src/Gui/View3DInventorViewer.cpp
@@ -1332,22 +1332,27 @@ bool View3DInventorViewer::isEnabledVBO() const
void View3DInventorViewer::setRenderCache(int mode)
{
- if(mode<0) {
+ if (mode<0) {
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/View");
- int setting = hGrp->GetInt("RenderCache",0);
- if(mode==-2) {
- if(pcViewProviderRoot && setting!=1)
+
+ int setting = hGrp->GetInt("RenderCache", 0);
+ if (mode == -2) {
+ if (pcViewProviderRoot && setting != 1)
pcViewProviderRoot->renderCaching = SoSeparator::ON;
mode = 2;
- }else{
- if(pcViewProviderRoot)
+ }
+ else {
+ if (pcViewProviderRoot)
pcViewProviderRoot->renderCaching = SoSeparator::AUTO;
mode = setting;
}
}
+
SoFCSeparator::setCacheMode(
- mode==0?SoSeparator::AUTO:(mode==1?SoSeparator::ON:SoSeparator::OFF));
+ mode == 0 ? SoSeparator::AUTO :
+ (mode == 1 ? SoSeparator::ON : SoSeparator::OFF)
+ );
}
void View3DInventorViewer::setEnabledNaviCube(bool on)
diff --git a/src/Mod/Cloud/App/CMakeLists.txt b/src/Mod/Cloud/App/CMakeLists.txt
index 3c5a43edba..d51883b4f5 100644
--- a/src/Mod/Cloud/App/CMakeLists.txt
+++ b/src/Mod/Cloud/App/CMakeLists.txt
@@ -11,7 +11,7 @@ include_directories(
set(Cloud_LIBS
FreeCADApp
- ${OPENSSL_LINK_LIBRARIES}
+ ${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
${XercesC_LIBRARIES}
${Boost_LIBRARIES}
diff --git a/src/Mod/Cloud/CMakeLists.txt b/src/Mod/Cloud/CMakeLists.txt
index d359859b64..c2519f4f84 100644
--- a/src/Mod/Cloud/CMakeLists.txt
+++ b/src/Mod/Cloud/CMakeLists.txt
@@ -29,8 +29,8 @@ elseif(WIN32 AND LIBPACK_FOUND)
set(OPENSSL_VERSION ${openssl_version_str})
endif ()
else()
- find_package(OPENSSL REQUIRED)
-endif(UNIX AND NOT APPLE)
+ find_package(OpenSSL REQUIRED)
+endif(UNIX AND APPLE)
if(OPENSSL_FOUND)
message(STATUS "openssl-${OPENSSL_VERSION} has been found\n")
else()
diff --git a/src/Mod/Part/Gui/DlgSettingsObjectColor.ui b/src/Mod/Part/Gui/DlgSettingsObjectColor.ui
index 97da9983d8..9de8a266bd 100644
--- a/src/Mod/Part/Gui/DlgSettingsObjectColor.ui
+++ b/src/Mod/Part/Gui/DlgSettingsObjectColor.ui
@@ -251,6 +251,9 @@
Two-side rendering
+
+ true
+
TwoSideRendering
diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp
index 70230e0af6..709873bc3d 100644
--- a/src/Mod/Part/Gui/ViewProviderExt.cpp
+++ b/src/Mod/Part/Gui/ViewProviderExt.cpp
@@ -246,7 +246,7 @@ ViewProviderPartExt::ViewProviderPartExt()
("User parameter:BaseApp/Preferences/Mod/Part");
NormalsFromUV = hPart->GetBool("NormalsFromUVNodes", NormalsFromUV);
- long twoside = hPart->GetBool("TwoSideRendering", false) ? 1 : 0;
+ long twoside = hPart->GetBool("TwoSideRendering", true) ? 1 : 0;
// Let the user define a custom lower limit but a value less than
// OCCT's epsilon is not allowed
diff --git a/src/Mod/Path/PathScripts/PathDeburr.py b/src/Mod/Path/PathScripts/PathDeburr.py
index e44ab90c71..aa1b1e6d21 100644
--- a/src/Mod/Path/PathScripts/PathDeburr.py
+++ b/src/Mod/Path/PathScripts/PathDeburr.py
@@ -59,8 +59,7 @@ def toolDepthAndOffset(width, extraDepth, tool):
toolOffset = float(tool.FlatRadius)
extraOffset = float(tool.Diameter) / 2 - width if 180 == angle else extraDepth / tan
offset = toolOffset + extraOffset
- if offset < 0.0001:
- offset = 0.01
+
return (depth, offset)