Merge branch 'master' into posttodxf
This commit is contained in:
26
.travis.yml
26
.travis.yml
@@ -102,19 +102,19 @@ jobs:
|
||||
- CMAKE_ARGS="-DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc"
|
||||
- CACHE_NAME=JOB3
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode11.6
|
||||
language: cpp
|
||||
cache:
|
||||
- ccache: true
|
||||
- directories:
|
||||
- $HOME/.ccache
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- /usr/local/Homebrew
|
||||
env:
|
||||
- CMAKE_OPTS="-DBUILD_QT5=ON -DBUILD_ENABLE_CXX_STD='C++17' -DUSE_PYTHON3=1 -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' -DBUILD_FEM_NETGEN=1 -DBUILD_FEM=1 -DBUILD_TECHDRAW=0 -DCMAKE_PREFIX_PATH='/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources' -DBUILD_FEM_NETGEN:BOOL=ON -DFREECAD_USE_EXTERNAL_KDL=ON -DCMAKE_BUILD_TYPE=Release"
|
||||
- PATH=/usr/local/bin:$PATH
|
||||
- CACHE_NAME=OSX1
|
||||
# - os: osx
|
||||
# osx_image: xcode11.6
|
||||
# language: cpp
|
||||
# cache:
|
||||
# - ccache: true
|
||||
# - directories:
|
||||
# - $HOME/.ccache
|
||||
# - $HOME/Library/Caches/Homebrew
|
||||
# - /usr/local/Homebrew
|
||||
# env:
|
||||
# - CMAKE_OPTS="-DBUILD_QT5=ON -DBUILD_ENABLE_CXX_STD='C++17' -DUSE_PYTHON3=1 -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' -DBUILD_FEM_NETGEN=1 -DBUILD_FEM=1 -DBUILD_TECHDRAW=0 -DCMAKE_PREFIX_PATH='/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources' -DBUILD_FEM_NETGEN:BOOL=ON -DFREECAD_USE_EXTERNAL_KDL=ON -DCMAKE_BUILD_TYPE=Release"
|
||||
# - PATH=/usr/local/bin:$PATH
|
||||
# - CACHE_NAME=OSX1
|
||||
|
||||
- os: windows
|
||||
language: cpp
|
||||
|
||||
@@ -1923,6 +1923,15 @@ void Application::runApplication(void)
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
|
||||
// Use software rendering for OpenGL
|
||||
#if QT_VERSION >= 0x050400
|
||||
ParameterGrp::handle hOpenGL = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OpenGL");
|
||||
bool useSoftwareOpenGL = hOpenGL->GetBool("UseSoftwareOpenGL", false);
|
||||
if (useSoftwareOpenGL) {
|
||||
QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||
}
|
||||
#endif // QT_VERSION >= 0x050400
|
||||
|
||||
// A new QApplication
|
||||
Base::Console().Log("Init: Creating Gui::Application and QApplication\n");
|
||||
|
||||
|
||||
@@ -108,6 +108,24 @@ will be shown at the lower left corner in opened files</string>
|
||||
<string>Rendering</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="CheckBox_use_SW_OpenGL">
|
||||
<property name="toolTip">
|
||||
<string>This option is useful for troubleshooting graphics card and driver problems.
|
||||
|
||||
Changing this option requires a restart of the application.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use software OpenGL</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>UseSoftwareOpenGL</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>OpenGL</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="CheckBox_useVBO">
|
||||
<property name="toolTip">
|
||||
|
||||
@@ -93,6 +93,7 @@ void DlgSettings3DViewImp::saveSettings()
|
||||
ui->CheckBox_WbByTab->onSave();
|
||||
ui->CheckBox_ShowFPS->onSave();
|
||||
ui->spinPickRadius->onSave();
|
||||
ui->CheckBox_use_SW_OpenGL->onSave();
|
||||
ui->CheckBox_useVBO->onSave();
|
||||
ui->FloatSpinBox_EyeDistance->onSave();
|
||||
ui->checkBoxBacklight->onSave();
|
||||
@@ -109,6 +110,7 @@ void DlgSettings3DViewImp::loadSettings()
|
||||
ui->CheckBox_WbByTab->onRestore();
|
||||
ui->CheckBox_ShowFPS->onRestore();
|
||||
ui->spinPickRadius->onRestore();
|
||||
ui->CheckBox_use_SW_OpenGL->onRestore();
|
||||
ui->CheckBox_useVBO->onRestore();
|
||||
ui->FloatSpinBox_EyeDistance->onRestore();
|
||||
ui->checkBoxBacklight->onRestore();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -267,7 +267,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<item row="18" column="1" colspan="5">
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
@@ -277,7 +277,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -509,7 +509,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<item row="13" column="1" colspan="5">
|
||||
<widget class="QComboBox" name="HoleCutType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
@@ -519,7 +519,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
||||
@@ -105,7 +105,7 @@ Py::Dict TooltablePy::getTools(void) const
|
||||
{
|
||||
Py::Dict dict;
|
||||
for(std::map<int,Path::Tool*>::iterator i = getTooltablePtr()->Tools.begin(); i != getTooltablePtr()->Tools.end(); ++i) {
|
||||
PyObject *tool = new Path::ToolPy(i->second);
|
||||
PyObject *tool = new Path::ToolPy(new Tool(*i->second));
|
||||
dict.setItem(Py::Long(i->first), Py::asObject(tool));
|
||||
}
|
||||
return dict;
|
||||
|
||||
@@ -5987,7 +5987,7 @@ void CmdSketcherConstrainAngle::activated(int iMsg)
|
||||
std::swap(PosId1,PosId2);
|
||||
}
|
||||
|
||||
if(isBsplinePole(Obj, GeoId1) || isBsplinePole(Obj, GeoId2)) {
|
||||
if(isBsplinePole(Obj, GeoId1) || (GeoId2 != Constraint::GeoUndef && isBsplinePole(Obj, GeoId2))) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Select an edge that is not a B-spline weight"));
|
||||
return;
|
||||
@@ -6538,14 +6538,14 @@ void CmdSketcherConstrainEqual::applyConstraint(std::vector<SelIdPair> &selSeq,
|
||||
const Part::Geometry *geo1 = Obj->getGeometry(GeoId1);
|
||||
const Part::Geometry *geo2 = Obj->getGeometry(GeoId2);
|
||||
|
||||
if ( (geo1->getTypeId() == Part::GeomLineSegment::getClassTypeId() && geo2->getTypeId() != Part::GeomLineSegment::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomHyperbola::getClassTypeId() && geo2->getTypeId() != Part::GeomHyperbola::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomParabola::getClassTypeId() && geo2->getTypeId() != Part::GeomParabola::getClassTypeId()) ||
|
||||
(isBsplinePole(geo1) && !isBsplinePole(geo1)) ||
|
||||
if ( (geo1->getTypeId() == Part::GeomLineSegment::getClassTypeId() && geo2->getTypeId() != Part::GeomLineSegment::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId() && geo2->getTypeId() != Part::GeomArcOfHyperbola::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomArcOfParabola::getClassTypeId() && geo2->getTypeId() != Part::GeomArcOfParabola::getClassTypeId()) ||
|
||||
(isBsplinePole(geo1) && !isBsplinePole(geo2)) ||
|
||||
( (geo1->getTypeId() == Part::GeomCircle::getClassTypeId() || geo1->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) &&
|
||||
(geo2->getTypeId() != Part::GeomCircle::getClassTypeId() || geo2->getTypeId() != Part::GeomArcOfCircle::getClassTypeId())) ||
|
||||
!(geo2->getTypeId() == Part::GeomCircle::getClassTypeId() || geo2->getTypeId() == Part::GeomArcOfCircle::getClassTypeId())) ||
|
||||
( (geo1->getTypeId() == Part::GeomEllipse::getClassTypeId() || geo1->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId()) &&
|
||||
(geo2->getTypeId() != Part::GeomEllipse::getClassTypeId() || geo2->getTypeId() != Part::GeomArcOfEllipse::getClassTypeId())) ){
|
||||
!(geo2->getTypeId() == Part::GeomEllipse::getClassTypeId() || geo2->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId())) ){
|
||||
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Select two or more edges of similar type"));
|
||||
|
||||
@@ -6106,9 +6106,9 @@ bool ViewProviderSketch::setEdit(int ModNum)
|
||||
// is loaded into the solver, which ensures that any prospective draw using temporal
|
||||
// geometry (draw with first parameter true) has the right ViewProvider geometry extensions
|
||||
// set - This fixes Weight constraint dragging on a just opened sketch.
|
||||
draw(false,true);
|
||||
getSketchObject()->solve(false);
|
||||
UpdateSolverInformation();
|
||||
draw(false,true);
|
||||
|
||||
connectUndoDocument = getDocument()
|
||||
->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, bp::_1));
|
||||
|
||||
@@ -106,8 +106,8 @@ DrawViewDimension::DrawViewDimension(void)
|
||||
References3D.setScope(App::LinkScope::Global);
|
||||
|
||||
ADD_PROPERTY_TYPE(FormatSpec,(getDefaultFormatSpec()) , "Format", App::Prop_Output,"Dimension Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecOverTolerance,("%+g") , "Format", App::Prop_Output,"Dimension Overtolerance Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecUnderTolerance,("%+g") , "Format", App::Prop_Output,"Dimension Undertolerance Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecOverTolerance,(getDefaultFormatSpec(true)) , "Format", App::Prop_Output,"Dimension Overtolerance Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecUnderTolerance,(getDefaultFormatSpec(true)) , "Format", App::Prop_Output,"Dimension Undertolerance Format");
|
||||
ADD_PROPERTY_TYPE(Arbitrary,(false) ,"Format", App::Prop_Output,"Value overridden by user");
|
||||
ADD_PROPERTY_TYPE(ArbitraryTolerances,(false) ,"Format", App::Prop_Output,"Tolerance values overridden by user");
|
||||
|
||||
@@ -1300,7 +1300,7 @@ std::string DrawViewDimension::getPrefix() const
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string DrawViewDimension::getDefaultFormatSpec() const
|
||||
std::string DrawViewDimension::getDefaultFormatSpec(bool isToleranceFormat) const
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
|
||||
@@ -1333,6 +1333,10 @@ std::string DrawViewDimension::getDefaultFormatSpec() const
|
||||
|
||||
}
|
||||
|
||||
if (isToleranceFormat) {
|
||||
formatSpec.replace(QString::fromUtf8("%"), QString::fromUtf8("%+"));
|
||||
}
|
||||
|
||||
return Base::Tools::toStdString(formatSpec);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ protected:
|
||||
virtual void onChanged(const App::Property* prop) override;
|
||||
virtual void onDocumentRestored() override;
|
||||
std::string getPrefix() const;
|
||||
std::string getDefaultFormatSpec() const;
|
||||
std::string getDefaultFormatSpec(bool isToleranceFormat = false) const;
|
||||
virtual pointPair getPointsOneEdge();
|
||||
virtual pointPair getPointsTwoEdges();
|
||||
virtual pointPair getPointsTwoVerts();
|
||||
|
||||
@@ -174,7 +174,7 @@ class FreeCADFileHandler(xml.sax.ContentHandler):
|
||||
|
||||
# Print all the contents of the document properties
|
||||
items = self.contents.items()
|
||||
items.sort()
|
||||
items = sorted(items)
|
||||
for key,value in items:
|
||||
key = self.clean(key)
|
||||
value = self.clean(value)
|
||||
@@ -186,7 +186,7 @@ class FreeCADFileHandler(xml.sax.ContentHandler):
|
||||
|
||||
if (tag == "Document") and (self.short != 2):
|
||||
items = self.contents.items()
|
||||
items.sort()
|
||||
items = sorted(items)
|
||||
for key,value in items:
|
||||
key = self.clean(key)
|
||||
if "00000000::" in key:
|
||||
|
||||
Reference in New Issue
Block a user