Merge branch 'master' into 3d_surface_perf
This commit is contained in:
@@ -214,6 +214,45 @@ but slower response to any scene changes.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="transparentRenderLabel">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Transparent objects:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="Gui::PrefComboBox" name="comboTransparentRender">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Render types of transparent objects</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>TransparentObjectRenderType</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>One pass</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Backface pass</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="markerSizeLabel">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
@@ -223,7 +262,7 @@ but slower response to any scene changes.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<item row="3" column="4">
|
||||
<widget class="QComboBox" name="boxMarkerSize">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -236,14 +275,14 @@ but slower response to any scene changes.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="textLabel1">
|
||||
<property name="text">
|
||||
<string>Eye to eye distance for stereo modes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<item row="4" column="4">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="FloatSpinBox_EyeDistance">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -279,7 +318,7 @@ bounding box size of the 3D object that is currently displayed. </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxBacklight">
|
||||
<property name="toolTip">
|
||||
<string>Backlight is enabled with the defined color</string>
|
||||
@@ -295,7 +334,7 @@ bounding box size of the 3D object that is currently displayed. </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="backlightColor">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -318,7 +357,7 @@ bounding box size of the 3D object that is currently displayed. </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<item row="5" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@@ -331,7 +370,7 @@ bounding box size of the 3D object that is currently displayed. </string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<item row="5" column="3">
|
||||
<widget class="QLabel" name="backlightLabel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -347,7 +386,7 @@ bounding box size of the 3D object that is currently displayed. </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<item row="5" column="4">
|
||||
<widget class="Gui::PrefSlider" name="sliderIntensity">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -11,7 +11,7 @@ include_directories(
|
||||
|
||||
set(Cloud_LIBS
|
||||
FreeCADApp
|
||||
${OPENSSL_LINK_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${XercesC_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -251,6 +251,9 @@
|
||||
<property name="text">
|
||||
<string>Two-side rendering</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>TwoSideRendering</cstring>
|
||||
</property>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user