Binary files /tmp/tmpyOndRg/CuQF9okWIR/freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/data/examples/FemCalculixCantilever2D.FCStd and /tmp/tmpyOndRg/oJjTGrcKLN/freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/data/examples/FemCalculixCantilever2D.FCStd differ Binary files /tmp/tmpyOndRg/CuQF9okWIR/freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/data/examples/FemCalculixCantilever3D.FCStd and /tmp/tmpyOndRg/oJjTGrcKLN/freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/data/examples/FemCalculixCantilever3D.FCStd differ diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/debian/changelog freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/debian/changelog --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/debian/changelog 2017-02-20 14:10:29.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/debian/changelog 2017-02-21 21:18:17.000000000 +0000 @@ -1,8 +1,8 @@ -freecad-daily (0.17~alpha1+git201702201410~ubuntu16.10.1) yakkety; urgency=low +freecad-daily (0.17~alpha1+git201702212118~ubuntu16.10.1) yakkety; urgency=low * Auto build. - -- sgrogan Mon, 20 Feb 2017 14:10:29 +0000 + -- sgrogan Tue, 21 Feb 2017 21:18:17 +0000 freecad-daily (0.17~alpha1-1xenial1) xenial; urgency=low diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/debian/git-build-recipe.manifest freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/debian/git-build-recipe.manifest --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/debian/git-build-recipe.manifest 2017-02-20 14:10:29.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/debian/git-build-recipe.manifest 2017-02-21 21:18:17.000000000 +0000 @@ -1,4 +1,4 @@ -# git-build-recipe format 0.4 deb-version {debupstream}+git201702201410 -lp:~freecad-maintainers/+git/gitmaster git-commit:6630bcf9fa8e849fe846d1c2b780148a7a2c1e4b +# git-build-recipe format 0.4 deb-version {debupstream}+git201702212118 +lp:~freecad-maintainers/+git/gitmaster git-commit:3136b42830f6da733cef1cc649760b97a6cdc836 merge packaging lp:~freecad-maintainers/+git/gitpackaging git-commit:e5a64e50e874aa887ab14c8080badc7e21a6fb86 -merge versioning lp:~freecad-maintainers/+git/gitversioning git-commit:6e5832f4bf600e9bb553676e0d94e9f3dadfb077 +merge versioning lp:~freecad-maintainers/+git/gitversioning git-commit:ddaacb8dc8e0c85767e9016ef620a1ce38599f10 diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Build/Version.h freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Build/Version.h --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Build/Version.h 2017-02-20 14:10:29.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Build/Version.h 2017-02-21 21:18:17.000000000 +0000 @@ -4,16 +4,17 @@ #define FCVersionMinor "17" #define FCVersionName "Vulcan" // test: $Format:Hash (%H), Date: %ci$ -#define FCRevision "10168 (Git)" //Highest committed revision number -#define FCRevisionDate "2017/02/20 09:08:18" //Date of highest committed revision +#define FCRevision "10232 (Git)" //Highest committed revision number +#define FCRevisionDate "2017/02/21 18:59:16" //Date of highest committed revision #define FCRepositoryURL "git://github.com/FreeCAD/FreeCAD.git master" //Repository URL of the working copy // Git relevant stuff -#define FCRepositoryHash "6630bcf9fa8e849fe846d1c2b780148a7a2c1e4b" +#define FCRepositoryHash "3136b42830f6da733cef1cc649760b97a6cdc836" #define FCRepositoryBranch "master" + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.cpp 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.cpp 2017-02-21 21:18:07.000000000 +0000 @@ -411,7 +411,8 @@ return std::vector(); } -bool ViewProviderPythonFeatureImp::setEdit(int ModNum) +ViewProviderPythonFeatureImp::ValueT +ViewProviderPythonFeatureImp::setEdit(int ModNum) { // Run the onChanged method of the proxy object. Base::PyGILStateLocker lock; @@ -425,7 +426,8 @@ Py::Tuple args(1); args.setItem(0, Py::Int(ModNum)); Py::Boolean ok(method.apply(args)); - return (bool)ok; + bool value = (bool)ok; + return value ? Accepted : Rejected; } else { Py::Callable method(vp.getAttr(std::string("setEdit"))); @@ -433,7 +435,8 @@ args.setItem(0, Py::Object(object->getPyObject(), true)); args.setItem(1, Py::Int(ModNum)); Py::Boolean ok(method.apply(args)); - return (bool)ok; + bool value = (bool)ok; + return value ? Accepted : Rejected; } } } @@ -443,10 +446,11 @@ e.ReportException(); } - return false; + return NotImplemented; } -bool ViewProviderPythonFeatureImp::unsetEdit(int ModNum) +ViewProviderPythonFeatureImp::ValueT +ViewProviderPythonFeatureImp::unsetEdit(int ModNum) { // Run the onChanged method of the proxy object. Base::PyGILStateLocker lock; @@ -460,7 +464,8 @@ Py::Tuple args(1); args.setItem(0, Py::Int(ModNum)); Py::Boolean ok(method.apply(args)); - return (bool)ok; + bool value = (bool)ok; + return value ? Accepted : Rejected; } else { Py::Callable method(vp.getAttr(std::string("unsetEdit"))); @@ -468,7 +473,8 @@ args.setItem(0, Py::Object(object->getPyObject(), true)); args.setItem(1, Py::Int(ModNum)); Py::Boolean ok(method.apply(args)); - return (bool)ok; + bool value = (bool)ok; + return value ? Accepted : Rejected; } } } @@ -478,10 +484,11 @@ e.ReportException(); } - return false; + return NotImplemented; } -bool ViewProviderPythonFeatureImp::doubleClicked(void) +ViewProviderPythonFeatureImp::ValueT +ViewProviderPythonFeatureImp::doubleClicked(void) { // Run the onChanged method of the proxy object. Base::PyGILStateLocker lock; @@ -495,14 +502,16 @@ Py::Tuple args; //args.setItem(0, Py::Int(ModNum)); Py::Boolean ok(method.apply(args)); - return (bool)ok; + bool value = (bool)ok; + return value ? Accepted : Rejected; } else { Py::Callable method(vp.getAttr(std::string("doubleClicked"))); Py::Tuple args(1); args.setItem(0, Py::Object(object->getPyObject(), true)); Py::Boolean ok(method.apply(args)); - return (bool)ok; + bool value = (bool)ok; + return value ? Accepted : Rejected; } } } @@ -512,7 +521,7 @@ e.ReportException(); } - return false; + return NotImplemented; } void ViewProviderPythonFeatureImp::setupContextMenu(QMenu* menu) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.h freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.h --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.h 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Gui/ViewProviderPythonFeature.h 2017-02-21 21:18:07.000000000 +0000 @@ -55,9 +55,9 @@ std::string getElement(const SoDetail *det) const; SoDetail* getDetail(const char*) const; std::vector getSelectionShape(const char* Element) const; - bool setEdit(int ModNum); - bool unsetEdit(int ModNum); - bool doubleClicked(void); + ValueT setEdit(int ModNum); + ValueT unsetEdit(int ModNum); + ValueT doubleClicked(void); void setupContextMenu(QMenu* menu); /** @name Update data methods*/ @@ -383,15 +383,25 @@ /// is called by the document when the provider goes in edit mode virtual bool setEdit(int ModNum) { - bool ok = imp->setEdit(ModNum); - if (!ok) ok = ViewProviderT::setEdit(ModNum); - return ok; + switch (imp->setEdit(ModNum)) { + case ViewProviderPythonFeatureImp::Accepted: + return true; + case ViewProviderPythonFeatureImp::Rejected: + return false; + default: + return ViewProviderT::setEdit(ModNum); + } } /// is called when you lose the edit mode virtual void unsetEdit(int ModNum) { - bool ok = imp->unsetEdit(ModNum); - if (!ok) ViewProviderT::unsetEdit(ModNum); + switch (imp->unsetEdit(ModNum)) { + case ViewProviderPythonFeatureImp::Accepted: + return; + case ViewProviderPythonFeatureImp::Rejected: + default: + return ViewProviderT::unsetEdit(ModNum); + } } public: @@ -404,11 +414,14 @@ protected: virtual bool doubleClicked(void) { - bool ok = imp->doubleClicked(); - if (!ok) - return ViewProviderT::doubleClicked(); - else + switch (imp->doubleClicked()) { + case ViewProviderPythonFeatureImp::Accepted: return true; + case ViewProviderPythonFeatureImp::Rejected: + return false; + default: + return ViewProviderT::doubleClicked(); + } } virtual void setOverrideMode(const std::string &mode) { diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Assembly/Gui/TaskAssemblyConstraints.ui 2017-02-21 21:18:07.000000000 +0000 @@ -192,7 +192,7 @@ - <html><head/><body><p>Fixes the first geometry in its rotation and translation. Note that fix only works its the direct parrent assembly. If you stack assemblys, the parent assembly will not be fixed inside the other ones.</p></body></html> + <html><head/><body><p>Fixes the first geometry in its rotation and translation. Note that fix only works its the direct parent assembly. If you stack assemblys, the parent assembly will not be fixed inside the other ones.</p></body></html> Fix @@ -642,7 +642,7 @@ - <html><head/><body><p>Makes the geometries normals point in the opposite direction. Note that for cylinders the base cirles normal is used.</p></body></html> + <html><head/><body><p>Makes the geometries normals point in the opposite direction. Note that for cylinders the base circles normal is used.</p></body></html> Opposite @@ -680,7 +680,7 @@ - <html><head/><body><p>Makes the geometries normals perpendicular. Note that for cylinders the base cirles normal is used.</p></body></html> + <html><head/><body><p>Makes the geometries normals perpendicular. Note that for cylinders the base circles normal is used.</p></body></html> false diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/App/CMakeLists.txt freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/App/CMakeLists.txt --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/App/CMakeLists.txt 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/App/CMakeLists.txt 2017-02-21 21:18:07.000000000 +0000 @@ -84,10 +84,10 @@ _FemBeamSection.py _FemConstraintSelfWeight.py _FemMaterialMechanicalNonlinear.py - _FemMechanicalResult.py _FemMeshGmsh.py _FemMeshGroup.py _FemMeshRegion.py + _FemResultMechanical.py _FemShellThickness.py _FemSolverCalculix.py _FemSolverZ88.py @@ -103,10 +103,10 @@ _ViewProviderFemBeamSection.py _ViewProviderFemConstraintSelfWeight.py _ViewProviderFemMaterialMechanicalNonlinear.py - _ViewProviderFemMechanicalResult.py _ViewProviderFemMeshGmsh.py _ViewProviderFemMeshGroup.py _ViewProviderFemMeshRegion.py + _ViewProviderFemResultMechanical.py _ViewProviderFemShellThickness.py _ViewProviderFemSolverCalculix.py _ViewProviderFemSolverZ88.py @@ -120,29 +120,18 @@ importZ88O2Results.py Init.py InitGui.py - FemAnalysis.py - FemBeamSection.py FemCommands.py - FemConstraintSelfWeight.py FemGmshTools.py FemInputWriter.py FemInputWriterCcx.py FemInputWriterZ88.py - FemMaterialMechanicalNonlinear.py - FemMechanicalResult.py FemMesh2Mesh.py - FemMeshGmsh.py - FemMeshGroup.py - FemMeshRegion.py FemMeshTools.py - FemShellThickness.py - FemSolverCalculix.py - FemSolverZ88.py + FemSelectionObserver.py FemTools.py FemToolsCcx.py FemToolsZ88.py - FemMaterial.py - FemSelectionObserver.py + ObjectsFem.py TestFem.py TaskPanelFemBeamSection.ui TaskPanelFemMeshGmsh.ui diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/CMakeLists.txt freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/CMakeLists.txt --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/CMakeLists.txt 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/CMakeLists.txt 2017-02-21 21:18:07.000000000 +0000 @@ -19,6 +19,7 @@ # changes on the file list here needs to be made in App/CMakeLists.txt as well Init.py InitGui.py + ObjectsFem.py convert2TetGen.py @@ -36,17 +37,14 @@ _CommandRunSolver.py _CommandControlSolver.py - FemMechanicalResult.py - _FemMechanicalResult.py - _ViewProviderFemMechanicalResult.py + _FemResultMechanical.py + _ViewProviderFemResultMechanical.py _CommandShowResult.py _TaskPanelShowResult.py TaskPanelShowResult.ui - FemAnalysis.py _CommandAnalysis.py - FemMeshGmsh.py _FemMeshGmsh.py _ViewProviderFemMeshGmsh.py _CommandMeshGmshFromShape.py @@ -58,40 +56,34 @@ FemMesh2Mesh.py _CommandFEMMesh2Mesh.py - FemMeshGroup.py _FemMeshGroup.py _ViewProviderFemMeshGroup.py _CommandMeshGroup.py _TaskPanelFemMeshGroup.py TaskPanelFemMeshGroup.ui - FemMeshRegion.py _FemMeshRegion.py _ViewProviderFemMeshRegion.py _CommandMeshRegion.py _TaskPanelFemMeshRegion.py TaskPanelFemMeshRegion.ui - FemBeamSection.py _FemBeamSection.py _ViewProviderFemBeamSection.py _CommandBeamSection.py _TaskPanelFemBeamSection.py TaskPanelFemBeamSection.ui - FemShellThickness.py _FemShellThickness.py _ViewProviderFemShellThickness.py _CommandShellThickness.py _TaskPanelFemShellThickness.py TaskPanelFemShellThickness.ui - FemConstraintSelfWeight.py _FemConstraintSelfWeight.py _ViewProviderFemConstraintSelfWeight.py _CommandConstraintSelfWeight.py - FemMaterial.py _FemMaterial.py _ViewProviderFemMaterial.py _CommandMaterialSolid.py @@ -99,7 +91,6 @@ _TaskPanelFemMaterial.py TaskPanelFemMaterial.ui - FemMaterialMechanicalNonlinear.py _FemMaterialMechanicalNonlinear.py _ViewProviderFemMaterialMechanicalNonlinear.py _CommandMaterialMechanicalNonlinear.py @@ -110,7 +101,6 @@ importCcxFrdResults.py FemInputWriterCcx.py FemToolsCcx.py - FemSolverCalculix.py _FemSolverCalculix.py _ViewProviderFemSolverCalculix.py _CommandSolverCalculix.py @@ -122,7 +112,6 @@ importZ88O2Results.py FemInputWriterZ88.py FemToolsZ88.py - FemSolverZ88.py _FemSolverZ88.py _ViewProviderFemSolverZ88.py _CommandSolverZ88.py diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandAnalysis.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandAnalysis.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandAnalysis.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandAnalysis.py 2017-02-21 21:18:07.000000000 +0000 @@ -46,11 +46,10 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create Analysis") FreeCADGui.addModule("FemGui") - FreeCADGui.addModule("FemAnalysis") - FreeCADGui.addModule("FemSolverCalculix") - FreeCADGui.doCommand("FemAnalysis.makeFemAnalysis('Analysis')") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("ObjectsFem.makeAnalysis('Analysis')") FreeCADGui.doCommand("FemGui.setActiveAnalysis(App.activeDocument().ActiveObject)") - FreeCADGui.doCommand("FemSolverCalculix.makeFemSolverCalculix('CalculiX')") + FreeCADGui.doCommand("ObjectsFem.makeSolverCalculix('CalculiX')") FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [App.activeDocument().ActiveObject]") sel = FreeCADGui.Selection.getSelection() if (len(sel) == 1): diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandBeamSection.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandBeamSection.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandBeamSection.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandBeamSection.py 2017-02-21 21:18:07.000000000 +0000 @@ -45,8 +45,8 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create FemBeamSection") - FreeCADGui.addModule("FemBeamSection") - FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemBeamSection.makeFemBeamSection()]") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeBeamSection()]") FreeCADGui.addCommand('Fem_BeamSection', _CommandBeamSection()) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandConstraintSelfWeight.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandConstraintSelfWeight.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandConstraintSelfWeight.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandConstraintSelfWeight.py 2017-02-21 21:18:07.000000000 +0000 @@ -45,8 +45,8 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create FemConstraintSelfWeight") - FreeCADGui.addModule("FemConstraintSelfWeight") - FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemConstraintSelfWeight.makeFemConstraintSelfWeight()]") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeConstraintSelfWeight()]") FreeCADGui.addCommand('Fem_ConstraintSelfWeight', _CommandConstraintSelfWeight()) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialMechanicalNonlinear.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialMechanicalNonlinear.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialMechanicalNonlinear.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialMechanicalNonlinear.py 2017-02-21 21:18:07.000000000 +0000 @@ -57,9 +57,9 @@ break if allow_nonlinear_material: string_lin_mat_obj = "App.ActiveDocument.getObject('" + lin_mat_obj.Name + "')" - command_to_run = "FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemMaterialMechanicalNonlinear.makeFemMaterialMechanicalNonlinear(" + string_lin_mat_obj + ")]" + command_to_run = "FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeMaterialMechanicalNonlinear(" + string_lin_mat_obj + ")]" FreeCAD.ActiveDocument.openTransaction("Create FemMaterialMechanicalNonlinear") - FreeCADGui.addModule("FemMaterialMechanicalNonlinear") + FreeCADGui.addModule("ObjectsFem") FreeCADGui.doCommand(command_to_run) # set the material nonlinear property of the solver to nonlinear if only one solver is available and if this solver is a CalculiX solver solver_object = None diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialSolid.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialSolid.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialSolid.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMaterialSolid.py 2017-02-21 21:18:07.000000000 +0000 @@ -49,8 +49,8 @@ if FreeCAD.ActiveDocument is not femDoc: FreeCADGui.setActiveDocument(femDoc) FreeCAD.ActiveDocument.openTransaction("Create Solid Material") - FreeCADGui.addModule("FemMaterial") - FreeCADGui.doCommand("FemMaterial.makeSolidMaterial('SolidMaterial')") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("ObjectsFem.makeMaterialSolid('SolidMaterial')") FreeCADGui.doCommand("App.activeDocument()." + FemGui.getActiveAnalysis().Name + ".Member = App.activeDocument()." + FemGui.getActiveAnalysis().Name + ".Member + [App.ActiveDocument.ActiveObject]") FreeCADGui.doCommand("Gui.activeDocument().setEdit(App.ActiveDocument.ActiveObject.Name)") diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGmshFromShape.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGmshFromShape.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGmshFromShape.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGmshFromShape.py 2017-02-21 21:18:07.000000000 +0000 @@ -50,8 +50,8 @@ if (len(sel) == 1): if(sel[0].isDerivedFrom("Part::Feature")): mesh_obj_name = sel[0].Name + "_Mesh" - FreeCADGui.addModule("FemMeshGmsh") - FreeCADGui.doCommand("FemMeshGmsh.makeFemMeshGmsh('" + mesh_obj_name + "')") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("ObjectsFem.makeMeshGmsh('" + mesh_obj_name + "')") FreeCADGui.doCommand("App.ActiveDocument.ActiveObject.Part = App.ActiveDocument." + sel[0].Name) if FemGui.getActiveAnalysis(): FreeCADGui.addModule("FemGui") diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGroup.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGroup.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGroup.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMeshGroup.py 2017-02-21 21:18:07.000000000 +0000 @@ -45,12 +45,12 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create FemMeshGroup") - FreeCADGui.addModule("FemMeshGroup") + FreeCADGui.addModule("ObjectsFem") sel = FreeCADGui.Selection.getSelection() if (len(sel) == 1): sobj = sel[0] if len(sel) == 1 and hasattr(sobj, "Proxy") and sobj.Proxy.Type == "FemMeshGmsh": - FreeCADGui.doCommand("FemMeshGroup.makeFemMeshGroup(App.ActiveDocument." + sobj.Name + ")") + FreeCADGui.doCommand("ObjectsFem.makeMeshGroup(App.ActiveDocument." + sobj.Name + ")") FreeCADGui.Selection.clearSelection() diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMeshRegion.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMeshRegion.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandMeshRegion.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandMeshRegion.py 2017-02-21 21:18:07.000000000 +0000 @@ -45,12 +45,12 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create FemMeshRegion") - FreeCADGui.addModule("FemMeshRegion") + FreeCADGui.addModule("ObjectsFem") sel = FreeCADGui.Selection.getSelection() if (len(sel) == 1): sobj = sel[0] if len(sel) == 1 and hasattr(sobj, "Proxy") and sobj.Proxy.Type == "FemMeshGmsh": - FreeCADGui.doCommand("FemMeshRegion.makeFemMeshRegion(App.ActiveDocument." + sobj.Name + ")") + FreeCADGui.doCommand("ObjectsFem.makeMeshRegion(App.ActiveDocument." + sobj.Name + ")") FreeCADGui.Selection.clearSelection() diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandShellThickness.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandShellThickness.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandShellThickness.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandShellThickness.py 2017-02-21 21:18:07.000000000 +0000 @@ -45,8 +45,8 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create FemShellThickness") - FreeCADGui.addModule("FemShellThickness") - FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemShellThickness.makeFemShellThickness()]") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeShellThickness()]") FreeCADGui.addCommand('Fem_ShellThickness', _CommandShellThickness()) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandShowResult.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandShowResult.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandShowResult.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandShowResult.py 2017-02-21 21:18:07.000000000 +0000 @@ -49,8 +49,8 @@ if sel[0].isDerivedFrom("Fem::FemResultObject"): self.result_object = sel[0] - import _ViewProviderFemMechanicalResult - if _ViewProviderFemMechanicalResult.is_result_obj_valid(self.result_object): + import _ViewProviderFemResultMechanical + if _ViewProviderFemResultMechanical.is_result_obj_valid(self.result_object): self.result_object.ViewObject.startEditing() diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandSolverCalculix.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandSolverCalculix.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandSolverCalculix.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandSolverCalculix.py 2017-02-21 21:18:07.000000000 +0000 @@ -50,13 +50,13 @@ if hasattr(m, "Proxy") and m.Proxy.Type == "FemMaterialMechanicalNonlinear": has_nonlinear_material_obj = True FreeCAD.ActiveDocument.openTransaction("Create SolverCalculix") - FreeCADGui.addModule("FemSolverCalculix") + FreeCADGui.addModule("ObjectsFem") if has_nonlinear_material_obj: - FreeCADGui.doCommand("solver = FemSolverCalculix.makeFemSolverCalculix()") + FreeCADGui.doCommand("solver = ObjectsFem.makeSolverCalculix()") FreeCADGui.doCommand("solver.MaterialNonlinearity = 'nonlinear'") FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [solver]") else: - FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemSolverCalculix.makeFemSolverCalculix()]") + FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeSolverCalculix()]") FreeCADGui.addCommand('Fem_SolverCalculix', _CommandSolverCalculix()) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandSolverZ88.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandSolverZ88.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_CommandSolverZ88.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_CommandSolverZ88.py 2017-02-21 21:18:07.000000000 +0000 @@ -45,8 +45,8 @@ def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create SolverZ88") - FreeCADGui.addModule("FemSolverZ88") - FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemSolverZ88.makeFemSolverZ88()]") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeSolverZ88()]") FreeCADGui.addCommand('Fem_SolverZ88', _CommandSolverZ88()) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemAnalysis.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemAnalysis.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemAnalysis.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemAnalysis.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2013-2015 - Juergen Riegel * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FEM Analysis managment" -__author__ = "Juergen Riegel" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD - - -def makeFemAnalysis(name): - '''makeFemAnalysis(name): makes a Fem Analysis object''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FemAnalysisPython", name) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemBeamSection.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemBeamSection.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemBeamSection.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemBeamSection.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2015 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemBeamSection" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemBeamSection - - -def makeFemBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="BeamSection"): - '''makeFemBeamSection([width], [height], [name]): creates an beamsection object to define a cross section''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) - _FemBeamSection._FemBeamSection(obj) - sec_types = _FemBeamSection._FemBeamSection.known_beam_types - if sectiontype not in sec_types: - FreeCAD.Console.PrintError("Section type is not known. Set to " + sec_types[0] + " \n") - obj.SectionType = sec_types[0] - else: - obj.SectionType = sectiontype - obj.RectWidth = width - obj.RectHeight = height - obj.CircDiameter = height - obj.PipeDiameter = height - obj.PipeThickness = width - if FreeCAD.GuiUp: - import _ViewProviderFemBeamSection - _ViewProviderFemBeamSection._ViewProviderFemBeamSection(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemConstraintSelfWeight.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemConstraintSelfWeight.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemConstraintSelfWeight.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemConstraintSelfWeight.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemConstraintSelfWeight" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemConstraintSelfWeight - - -def makeFemConstraintSelfWeight(name="FemConstraintSelfWeight"): - '''makeFemFemConstraintSelfWeight([name]): creates an self weight object to define a gravity load''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) - _FemConstraintSelfWeight._FemConstraintSelfWeight(obj) - if FreeCAD.GuiUp: - import _ViewProviderFemConstraintSelfWeight - _ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemInputWriterCcx.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemInputWriterCcx.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemInputWriterCcx.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemInputWriterCcx.py 2017-02-21 21:18:07.000000000 +0000 @@ -844,7 +844,10 @@ else: f.write('U\n') f.write('*EL FILE\n') - f.write('S, E\n') + if self.solver_obj.MaterialNonlinearity == 'nonlinear': + f.write('S, E, PEEQ\n') + else: + f.write('S, E\n') f.write('** outputs --> dat file\n') f.write('*NODE PRINT , NSET=Nall \n') f.write('U \n') diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMaterialMechanicalNonlinear.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMaterialMechanicalNonlinear.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMaterialMechanicalNonlinear.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMaterialMechanicalNonlinear.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemMaterialMechanicalNonlinear" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import FemGui -import _FemMaterialMechanicalNonlinear - - -def makeFemMaterialMechanicalNonlinear(base_material, name="MechanicalMaterialNonlinear"): - '''makeFemMaterialMechanicalNonlinear(base_material, [name]): creates an nonlinear material object''' - obj = FemGui.getActiveAnalysis().Document.addObject("Fem::FeaturePython", name) - _FemMaterialMechanicalNonlinear._FemMaterialMechanicalNonlinear(obj) - obj.LinearBaseMaterial = base_material - if FreeCAD.GuiUp: - import _ViewProviderFemMaterialMechanicalNonlinear - _ViewProviderFemMaterialMechanicalNonlinear._ViewProviderFemMaterialMechanicalNonlinear(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMaterial.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMaterial.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMaterial.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMaterial.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2013 - Juergen Riegel * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemMaterial" -__author__ = "Juergen Riegel, Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemMaterial - - -def makeSolidMaterial(name): - '''makeSolidMaterial(name): makes an FEM Material for solid - ''' - obj = FreeCAD.ActiveDocument.addObject("App::MaterialObjectPython", name) - _FemMaterial._FemMaterial(obj) - obj.Category = 'Solid' - if FreeCAD.GuiUp: - import _ViewProviderFemMaterial - _ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject) - # FreeCAD.ActiveDocument.recompute() - return obj - - -def makeFluidMaterial(name): - '''makeFluidMaterial(name): makes an FEM Material for fluid - ''' - obj = FreeCAD.ActiveDocument.addObject("App::MaterialObjectPython", name) - _FemMaterial._FemMaterial(obj) - obj.Category = 'Fluid' - if FreeCAD.GuiUp: - import _ViewProviderFemMaterial - _ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject) - # FreeCAD.ActiveDocument.recompute() - return obj - -makeFemMaterial = makeSolidMaterial # alias to be compatible for FemTest.py -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_FemMechanicalResult.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_FemMechanicalResult.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_FemMechanicalResult.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_FemMechanicalResult.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -#*************************************************************************** -#* * -#* Copyright (c) 2016 - Qingfeng Xia * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** - -__title__ = "DocumentOject Class to hold mechanical FEM results" -__author__ = "Qingfeng Xia, Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## @package FemMechanicalResult -# \ingroup FEM -# \brief FreeCAD DocumentObject class to hold mechanical results in FEM workbench - - -class _FemMechanicalResult(): - """The Fem::_FemMechanicalResult's Proxy python type, add result specific properties - """ - def __init__(self, obj): - self.Type = "FemMechanicalResult" - self.Object = obj # keep a ref to the DocObj for nonGui usage - obj.Proxy = self # link between App::DocumentObject to this object - - obj.addProperty("App::PropertyString", "ResultType", "Base", "Type of the result", 1) # the 1 set the property to ReadOnly - obj.ResultType = str(self.Type) - - # `Time, Stats` should have been defined in base cpp class - - # does not show up in propertyEditor of combiView - obj.addProperty("App::PropertyVectorList", "DisplacementVectors", "Fem", "List of displacement vectors", True) - - # does not show up in propertyEditor of combiView - obj.addProperty("App::PropertyVectorList", "StressVectors", "Fem", "List of stress vectors", True) - - # does not show up in propertyEditor of combiView - obj.addProperty("App::PropertyVectorList", "StrainVectors", "Fem", "List of strain vectors", True) - - # readonly in propertyEditor of combiView - obj.addProperty("App::PropertyFloatList", "DisplacementLengths", "Fem", "List of displacement lengths", True) - - obj.addProperty("App::PropertyFloatList", "StressValues", "Fem", "", True) - - obj.addProperty("App::PropertyFloatList", "PrincipalMax", "Fem", "", True) - - obj.addProperty("App::PropertyFloatList", "PrincipalMed", "Fem", "", True) - - obj.addProperty("App::PropertyFloatList", "PrincipalMin", "Fem", "", True) - - obj.addProperty("App::PropertyFloatList", "MaxShear", "Fem", "List of Maximum Shear stress values", True) - - obj.addProperty("App::PropertyFloatList", "UserDefined", "Fem", "User Defined Results", True) - - # temperature field is needed in the thermal stress analysis - obj.addProperty("App::PropertyFloatList", "Temperature", "Fem", "Temperature field", True) - - # for frequency analysis - obj.addProperty("App::PropertyInteger", "Eigenmode", "Fem", "", True) - - obj.addProperty("App::PropertyFloat", "EigenmodeFrequency", "Fem", "User Defined Results", True) - - # standard FeutureT methods - def execute(self, obj): - """"this method is executed on object creation and whenever the document is recomputed" - update Part or Mesh should NOT lead to recompution of the analysis automatically, time consuming - """ - return - - def onChanged(self, obj, prop): - return - - def __getstate__(self): - return self.Type - - def __setstate__(self, state): - if state: - self.Type = state diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMechanicalResult.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMechanicalResult.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMechanicalResult.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMechanicalResult.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#*************************************************************************** -#* * -#* Copyright (c) 2016 - Qingfeng Xia * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** - -__title__ = "module to make a mechanical FEM result object" -__author__ = "Qingfeng Xia, Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# \brief FreeCAD module to make mechanical result object in FEM workbench -# @{ - -import FreeCAD -import _FemMechanicalResult - - -def makeFemMechanicalResult(result_obj_name): - obj = FreeCAD.ActiveDocument.addObject('Fem::FemResultObjectPython', result_obj_name) - _FemMechanicalResult._FemMechanicalResult(obj) - if FreeCAD.GuiUp: - from _ViewProviderFemMechanicalResult import _ViewProviderFemMechanicalResult - _ViewProviderFemMechanicalResult(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMeshGmsh.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMeshGmsh.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMeshGmsh.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMeshGmsh.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemMeshGmsh" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemMeshGmsh - - -def makeFemMeshGmsh(name="FEMMeshGMSH"): - '''makeFemMeshGmsh(name): makes a GMSH FEM mesh object''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FemMeshObjectPython", name) - _FemMeshGmsh._FemMeshGmsh(obj) - if FreeCAD.GuiUp: - import _ViewProviderFemMeshGmsh - _ViewProviderFemMeshGmsh._ViewProviderFemMeshGmsh(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMeshGroup.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMeshGroup.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMeshGroup.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMeshGroup.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemMeshGroup" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemMeshGroup - - -def makeFemMeshGroup(base_mesh, use_label=False, name="FEMMeshGroup"): - '''makeFemMeshGroup([length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) - _FemMeshGroup._FemMeshGroup(obj) - obj.UseLabel = use_label - # obj.BaseMesh = base_mesh - # App::PropertyLinkList does not support append, we will use a temporary list to append the mesh group obj. to the list - tmplist = base_mesh.MeshGroupList - tmplist.append(obj) - base_mesh.MeshGroupList = tmplist - if FreeCAD.GuiUp: - import _ViewProviderFemMeshGroup - _ViewProviderFemMeshGroup._ViewProviderFemMeshGroup(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMeshRegion.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMeshRegion.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemMeshRegion.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemMeshRegion.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemMeshRegion" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemMeshRegion - - -def makeFemMeshRegion(base_mesh, element_length=0.0, name="FEMMeshRegion"): - '''makeFemMeshRegion([length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) - _FemMeshRegion._FemMeshRegion(obj) - obj.CharacteristicLength = element_length - # obj.BaseMesh = base_mesh - # App::PropertyLinkList does not support append, we will use a temporary list to append the mesh region obj. to the list - tmplist = base_mesh.MeshRegionList - tmplist.append(obj) - base_mesh.MeshRegionList = tmplist - if FreeCAD.GuiUp: - import _ViewProviderFemMeshRegion - _ViewProviderFemMeshRegion._ViewProviderFemMeshRegion(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_FemResultMechanical.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_FemResultMechanical.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_FemResultMechanical.py 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_FemResultMechanical.py 2017-02-21 21:18:07.000000000 +0000 @@ -0,0 +1,95 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2016 - Qingfeng Xia * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +__title__ = "DocumentOject Class to hold mechanical FEM results" +__author__ = "Qingfeng Xia, Bernd Hahnebach" +__url__ = "http://www.freecadweb.org" + +## @package FemResultMechanical +# \ingroup FEM +# \brief FreeCAD DocumentObject class to hold mechanical results in FEM workbench + + +class _FemResultMechanical(): + """The Fem::_FemResultMechanical's Proxy python type, add result specific properties + """ + def __init__(self, obj): + self.Type = "FemResultMechanical" + self.Object = obj # keep a ref to the DocObj for nonGui usage + obj.Proxy = self # link between App::DocumentObject to this object + + obj.addProperty("App::PropertyString", "ResultType", "Base", "Type of the result", 1) # the 1 set the property to ReadOnly + obj.ResultType = str(self.Type) + + # `Time, Stats` should have been defined in base cpp class + + # does not show up in propertyEditor of combiView + obj.addProperty("App::PropertyVectorList", "DisplacementVectors", "Fem", "List of displacement vectors", True) + + # does not show up in propertyEditor of combiView + obj.addProperty("App::PropertyVectorList", "StressVectors", "Fem", "List of stress vectors", True) + + # does not show up in propertyEditor of combiView + obj.addProperty("App::PropertyVectorList", "StrainVectors", "Fem", "List of strain vectors", True) + + # does not show up in propertyEditor of combiView + obj.addProperty("App::PropertyFloatList", "Peeq", "Fem", "List of equivalent plastic strain values", True) + + # readonly in propertyEditor of combiView + obj.addProperty("App::PropertyFloatList", "DisplacementLengths", "Fem", "List of displacement lengths", True) + + obj.addProperty("App::PropertyFloatList", "StressValues", "Fem", "", True) + + obj.addProperty("App::PropertyFloatList", "PrincipalMax", "Fem", "", True) + + obj.addProperty("App::PropertyFloatList", "PrincipalMed", "Fem", "", True) + + obj.addProperty("App::PropertyFloatList", "PrincipalMin", "Fem", "", True) + + obj.addProperty("App::PropertyFloatList", "MaxShear", "Fem", "List of Maximum Shear stress values", True) + + obj.addProperty("App::PropertyFloatList", "UserDefined", "Fem", "User Defined Results", True) + + # temperature field is needed in the thermal stress analysis + obj.addProperty("App::PropertyFloatList", "Temperature", "Fem", "Temperature field", True) + + # for frequency analysis + obj.addProperty("App::PropertyInteger", "Eigenmode", "Fem", "", True) + + obj.addProperty("App::PropertyFloat", "EigenmodeFrequency", "Fem", "User Defined Results", True) + + # standard FeutureT methods + def execute(self, obj): + """"this method is executed on object creation and whenever the document is recomputed" + update Part or Mesh should NOT lead to recompution of the analysis automatically, time consuming + """ + return + + def onChanged(self, obj, prop): + return + + def __getstate__(self): + return self.Type + + def __setstate__(self, state): + if state: + self.Type = state diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemShellThickness.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemShellThickness.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemShellThickness.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemShellThickness.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2015 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemShellThickness" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemShellThickness - - -def makeFemShellThickness(thickness=20.0, name="ShellThickness"): - '''makeFemShellThickness([thickness], [name]): creates an shellthickness object to define a plate thickness''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) - _FemShellThickness._FemShellThickness(obj) - obj.Thickness = thickness - if FreeCAD.GuiUp: - import _ViewProviderFemShellThickness - _ViewProviderFemShellThickness._ViewProviderFemShellThickness(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemSolverCalculix.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemSolverCalculix.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemSolverCalculix.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemSolverCalculix.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2015 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemSolverCalculix" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemSolverCalculix - - -def makeFemSolverCalculix(name="CalculiX"): - '''makeSolverCalculix(name): makes a Calculix solver object''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name) - _FemSolverCalculix._FemSolverCalculix(obj) - if FreeCAD.GuiUp: - import _ViewProviderFemSolverCalculix - _ViewProviderFemSolverCalculix._ViewProviderFemSolverCalculix(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemSolverZ88.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemSolverZ88.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/FemSolverZ88.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/FemSolverZ88.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemSolverZ88" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemSolverZ88 - - -def makeFemSolverZ88(name="Z88"): - '''makeSolverZ88(name): makes a Z88 solver object''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name) - _FemSolverZ88._FemSolverZ88(obj) - if FreeCAD.GuiUp: - import _ViewProviderFemSolverZ88 - _ViewProviderFemSolverZ88._ViewProviderFemSolverZ88(obj.ViewObject) - return obj - -# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/importCcxFrdResults.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/importCcxFrdResults.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/importCcxFrdResults.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/importCcxFrdResults.py 2017-02-21 21:18:07.000000000 +0000 @@ -63,6 +63,7 @@ ########## module specific methods ########## def importFrd(filename, analysis=None, result_name_prefix=None): + import ObjectsFem if result_name_prefix is None: result_name_prefix = '' m = readResult(filename) @@ -70,8 +71,7 @@ if(len(m['Nodes']) > 0): if analysis is None: analysis_name = os.path.splitext(os.path.basename(filename))[0] - import FemAnalysis - analysis_object = FemAnalysis.makeFemAnalysis('Analysis') + analysis_object = ObjectsFem.makeAnalysis('Analysis') analysis_object.Label = analysis_name else: analysis_object = analysis # see if statement few lines later, if not analysis -> no FemMesh object is created ! @@ -108,8 +108,7 @@ results_name = result_name_prefix + 'time_' + str(step_time) + '_results' else: results_name = result_name_prefix + 'results' - import FemMechanicalResult - results = FemMechanicalResult.makeFemMechanicalResult(results_name) + results = ObjectsFem.makeResultMechanical(results_name) for m in analysis_object.Member: if m.isDerivedFrom("Fem::FemMeshObject"): results.Mesh = m @@ -192,6 +191,25 @@ .format(results.NodeNumbers, len(results.StressValues))) results.NodeNumbers = list(stress.keys()) + # Read Equivalent Plastic strain if they exist + try: + Peeq = result_set['peeq'] + if len(Peeq) > 0: + if len(Peeq.values()) != len(disp.values()): + + Pe = [] + Pe_extra_nodes = Peeq.values() + nodes = len(disp.values()) + for i in range(nodes): + Pe_value = Pe_extra_nodes[i] + Pe.append(Pe_value) + results.Peeq = Pe + else: + results.Peeq = Peeq.values() + results.Time = step_time + except: + pass + x_min, y_min, z_min = map(min, zip(*displacement)) sum_list = map(sum, zip(*displacement)) x_avg, y_avg, z_avg = [i / no_of_values for i in sum_list] @@ -259,12 +277,14 @@ mode_stress = {} mode_stressv = {} mode_strain = {} + mode_peeq = {} mode_temp = {} mode_disp_found = False nodes_found = False mode_stress_found = False mode_strain_found = False + mode_peeq_found = False mode_temp_found = False mode_time_found = False elements_found = False @@ -499,6 +519,14 @@ # strain_5 = float(line[61:73]) # strain_6 = float(line[73:85]) mode_strain[elem] = FreeCAD.Vector(strain_1, strain_2, strain_3) + + if line[5:7] == "PE": + mode_peeq_found = True + # we found an equivalent plastic strain line in the frd file + if mode_peeq_found and (line[1:3] == "-1"): + elem = int(line[4:13]) + peeq = float(line[13:25]) + mode_peeq[elem] = (peeq) # Check if we found a time step if line[4:10] == "1PSTEP": mode_time_found = True @@ -524,6 +552,9 @@ if mode_strain_found: mode_strain_found = False + if mode_peeq_found: + mode_peeq_found = False + if mode_temp_found: mode_temp_found = False @@ -537,6 +568,7 @@ mode_results['stress'] = mode_stress mode_results['stressv'] = mode_stressv mode_results['strainv'] = mode_strain + mode_results['peeq'] = mode_peeq mode_results['temp'] = mode_temp mode_results['time'] = timestep results.append(mode_results) @@ -552,6 +584,7 @@ mode_results['stress'] = mode_stress mode_results['stressv'] = mode_stressv mode_results['strainv'] = mode_strain + mode_results['peeq'] = mode_peeq mode_results['time'] = 0 # Dont return time if static results.append(mode_results) mode_disp = {} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/importVTKResults.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/importVTKResults.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/importVTKResults.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/importVTKResults.py 2017-02-21 21:18:07.000000000 +0000 @@ -74,20 +74,19 @@ ########## module specific methods ########## def importVTK(filename, analysis=None, result_name_prefix=None): + import ObjectsFem if result_name_prefix is None: result_name_prefix = '' if analysis is None: analysis_name = os.path.splitext(os.path.basename(filename))[0] - import FemAnalysis - analysis_object = FemAnalysis.makeFemAnalysis('Analysis') + analysis_object = ObjectsFem.makeAnalysis('Analysis') analysis_object.Label = analysis_name else: analysis_object = analysis # if properties can be added in FemVTKTools importCfdResult(), this file can be used for CFD workbench results_name = result_name_prefix + 'results' - from FemMechanicalResult import makeFemMechanicalResult - result_obj = makeFemMechanicalResult(results_name) + result_obj = ObjectsFem.makeResultMechanical(results_name) # result_obj = FreeCAD.ActiveDocument.addObject('Fem::FemResultObject', results_name) Fem.readResult(filename, result_obj.Name) # readResult always creates a new femmesh named ResultMesh diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/importZ88O2Results.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/importZ88O2Results.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/importZ88O2Results.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/importZ88O2Results.py 2017-02-21 21:18:07.000000000 +0000 @@ -65,22 +65,21 @@ def import_z88_disp(filename, analysis=None, result_name_prefix=None): '''insert a FreeCAD FEM Result object in the ActiveDocument ''' + import ObjectsFem if result_name_prefix is None: result_name_prefix = '' m = read_z88_disp(filename) if(len(m['Nodes']) > 0): if analysis is None: analysis_name = os.path.splitext(os.path.basename(filename))[0] - import FemAnalysis - analysis_object = FemAnalysis.makeFemAnalysis('Analysis') + analysis_object = ObjectsFem.makeAnalysis('Analysis') analysis_object.Label = analysis_name else: analysis_object = analysis # see if statement few lines later, if not analysis -> no FemMesh object is created ! for result_set in m['Results']: results_name = result_name_prefix + 'results' - import FemMechanicalResult - results = FemMechanicalResult.makeFemMechanicalResult(results_name) + results = ObjectsFem.makeResultMechanical(results_name) #results = FreeCAD.ActiveDocument.addObject('Fem::FemResultObject', results_name) for m in analysis_object.Member: if m.isDerivedFrom("Fem::FemMeshObject"): diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/ObjectsFem.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/ObjectsFem.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/ObjectsFem.py 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/ObjectsFem.py 2017-02-21 21:18:07.000000000 +0000 @@ -0,0 +1,307 @@ +# *************************************************************************** +# * * +# * Copyright (c) 2016 - Bernd Hahnebach * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** + +__title__ = "Objects FEM" +__author__ = "Bernd Hahnebach" +__url__ = "http://www.freecadweb.org" + +## \addtogroup FEM +# @{ + +import FreeCAD + + +########## analysis ########## +def makeAnalysis(name="Analysis"): + '''makeAnalysis(name): makes a Fem Analysis object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FemAnalysisPython", name) + return obj + + +########## solvers ########## +def makeSolverCalculix(name="CalculiX"): + '''makeSolverCalculix(name): makes a Calculix solver object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name) + import _FemSolverCalculix + _FemSolverCalculix._FemSolverCalculix(obj) + if FreeCAD.GuiUp: + import _ViewProviderFemSolverCalculix + _ViewProviderFemSolverCalculix._ViewProviderFemSolverCalculix(obj.ViewObject) + return obj + + +def makeSolverZ88(name="Z88"): + '''makeSolverZ88(name): makes a Z88 solver object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name) + import _FemSolverZ88 + _FemSolverZ88._FemSolverZ88(obj) + if FreeCAD.GuiUp: + import _ViewProviderFemSolverZ88 + _ViewProviderFemSolverZ88._ViewProviderFemSolverZ88(obj.ViewObject) + return obj + + +########## element geometry definitions ########## +def makeBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="BeamSection"): + '''makeBeamSection([width], [height], [name]): creates an beamsection object to define a cross section''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) + import _FemBeamSection + _FemBeamSection._FemBeamSection(obj) + sec_types = _FemBeamSection._FemBeamSection.known_beam_types + if sectiontype not in sec_types: + FreeCAD.Console.PrintError("Section type is not known. Set to " + sec_types[0] + " \n") + obj.SectionType = sec_types[0] + else: + obj.SectionType = sectiontype + obj.RectWidth = width + obj.RectHeight = height + obj.CircDiameter = height + obj.PipeDiameter = height + obj.PipeThickness = width + if FreeCAD.GuiUp: + import _ViewProviderFemBeamSection + _ViewProviderFemBeamSection._ViewProviderFemBeamSection(obj.ViewObject) + return obj + + +def makeShellThickness(thickness=20.0, name="ShellThickness"): + '''makeShellThickness([thickness], [name]): creates an shellthickness object to define a plate thickness''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) + import _FemShellThickness + _FemShellThickness._FemShellThickness(obj) + obj.Thickness = thickness + if FreeCAD.GuiUp: + import _ViewProviderFemShellThickness + _ViewProviderFemShellThickness._ViewProviderFemShellThickness(obj.ViewObject) + return obj + + +########## materials ########## +def makeMaterialSolid(name="MechanicalSolidMaterial"): + '''makeMaterialSolid(name): makes an FEM Material for solid''' + obj = FreeCAD.ActiveDocument.addObject("App::MaterialObjectPython", name) + import _FemMaterial + _FemMaterial._FemMaterial(obj) + obj.Category = 'Solid' + if FreeCAD.GuiUp: + import _ViewProviderFemMaterial + _ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject) + # FreeCAD.ActiveDocument.recompute() + return obj + + +def makeMaterialFluid(name="FluidMaterial"): + '''makeMaterialFluid(name): makes an FEM Material for fluid''' + obj = FreeCAD.ActiveDocument.addObject("App::MaterialObjectPython", name) + import _FemMaterial + _FemMaterial._FemMaterial(obj) + obj.Category = 'Fluid' + if FreeCAD.GuiUp: + import _ViewProviderFemMaterial + _ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject) + # FreeCAD.ActiveDocument.recompute() + return obj + + +def makeMaterialMechanicalNonlinear(base_material, name="MechanicalMaterialNonlinear"): + '''makeMaterialMechanicalNonlinear(base_material, [name]): creates an nonlinear material object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) + import _FemMaterialMechanicalNonlinear + _FemMaterialMechanicalNonlinear._FemMaterialMechanicalNonlinear(obj) + obj.LinearBaseMaterial = base_material + if FreeCAD.GuiUp: + import _ViewProviderFemMaterialMechanicalNonlinear + _ViewProviderFemMaterialMechanicalNonlinear._ViewProviderFemMaterialMechanicalNonlinear(obj.ViewObject) + return obj + + +########## results ########## +def makeResultMechanical(name="MechanicalResult"): + '''makeResultMechanical(name): creates an mechanical result object to hold FEM results''' + obj = FreeCAD.ActiveDocument.addObject('Fem::FemResultObjectPython', name) + import _FemResultMechanical + _FemResultMechanical._FemResultMechanical(obj) + if FreeCAD.GuiUp: + from _ViewProviderFemResultMechanical import _ViewProviderFemResultMechanical + _ViewProviderFemResultMechanical(obj.ViewObject) + return obj + + +########## constraints ########## +def makeConstraintBearing(name="ConstraintBearing"): + '''makeConstraintBearing(name): makes a Fem ConstraintBearing object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintBearing", name) + return obj + + +def makeConstraintContact(name="ConstraintContact"): + '''makeConstraintContact(name): makes a Fem ConstraintContact object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintContact", name) + return obj + + +def makeConstraintDisplacement(name="ConstraintDisplacement"): + '''makeConstraintDisplacement(name): makes a Fem ConstraintDisplacement object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintDisplacement", name) + return obj + + +def makeConstraintFixed(name="ConstraintFixed"): + '''makeConstraintFixed(name): makes a Fem ConstraintFixed object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintFixed", name) + return obj + + +def makeConstraintFluidBoundary(name="ConstraintFluidBoundary"): + '''makeConstraintFluidBoundary(name): makes a Fem ConstraintForce object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintForce", name) + return obj + + +def makeConstraintForce(name="ConstraintForce"): + '''makeConstraintForce(name): makes a Fem ConstraintForce object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintForce", name) + return obj + + +def makeConstraintGear(name="ConstraintGear"): + '''makeConstraintGear(name): makes a Fem ConstraintGear object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintGear", name) + return obj + + +def makeConstraintHeatflux(name="ConstraintHeatflux"): + '''makeConstraintHeatflux(name): makes a Fem ConstraintHeatflux object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintHeatflux", name) + return obj + + +def makeConstraintInitialTemperature(name="ConstraintInitialTemperature"): + '''makeConstraintInitialTemperature(name): makes a Fem ConstraintInitialTemperature object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintInitialTemperature", name) + return obj + + +def makeConstraintPlaneRotation(name="ConstraintPlaneRotation"): + '''makeConstraintPlaneRotation(name): makes a Fem ConstraintPlaneRotation object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintPlaneRotation", name) + return obj + + +def makeConstraintPressure(name="ConstraintPressure"): + '''makeConstraintPressure(name): makes a Fem ConstraintPressure object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintPressure", name) + return obj + + +def makeConstraintPulley(name="ConstraintPulley"): + '''makeConstraintPulley(name): makes a Fem ConstraintPulley object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintPulley", name) + return obj + + +def makeConstraintSelfWeight(name="ConstraintSelfWeight"): + '''makeConstraintSelfWeight([name]): creates an self weight object to define a gravity load''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) + import _FemConstraintSelfWeight + _FemConstraintSelfWeight._FemConstraintSelfWeight(obj) + if FreeCAD.GuiUp: + import _ViewProviderFemConstraintSelfWeight + _ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject) + return obj + + +def makeConstraintTemperature(name="ConstraintTemperature"): + '''makeConstraintTemperature(name): makes a Fem ConstraintTemperature object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintTemperature", name) + return obj + + +def makeConstraintTransform(name="ConstraintTransform"): + '''makeConstraintTransform(name): makes a Fem ConstraintTransform object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintTransform", name) + return obj + + +########## meshes ########## +def makeMeshShapeNetgenObject(name="MeshShapeNetgenObject"): + '''makeMeshShapeNetgenObject(name): makes a Fem MeshShapeNetgenObject object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FemMeshShapeNetgenObject", name) + return obj + + +def makeMeshGmsh(name="FEMMeshGMSH"): + '''makeMeshGmsh(name): makes a GMSH FEM mesh object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FemMeshObjectPython", name) + import _FemMeshGmsh + _FemMeshGmsh._FemMeshGmsh(obj) + if FreeCAD.GuiUp: + import _ViewProviderFemMeshGmsh + _ViewProviderFemMeshGmsh._ViewProviderFemMeshGmsh(obj.ViewObject) + return obj + + +def makeMeshGroup(base_mesh, use_label=False, name="FEMMeshGroup"): + '''makeMeshGroup([length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) + import _FemMeshGroup + _FemMeshGroup._FemMeshGroup(obj) + obj.UseLabel = use_label + # obj.BaseMesh = base_mesh + # App::PropertyLinkList does not support append, we will use a temporary list to append the mesh group obj. to the list + tmplist = base_mesh.MeshGroupList + tmplist.append(obj) + base_mesh.MeshGroupList = tmplist + if FreeCAD.GuiUp: + import _ViewProviderFemMeshGroup + _ViewProviderFemMeshGroup._ViewProviderFemMeshGroup(obj.ViewObject) + return obj + + +def makeMeshRegion(base_mesh, element_length=0.0, name="FEMMeshRegion"): + '''makeMeshRegion([length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name) + import _FemMeshRegion + _FemMeshRegion._FemMeshRegion(obj) + obj.CharacteristicLength = element_length + # obj.BaseMesh = base_mesh + # App::PropertyLinkList does not support append, we will use a temporary list to append the mesh region obj. to the list + tmplist = base_mesh.MeshRegionList + tmplist.append(obj) + base_mesh.MeshRegionList = tmplist + if FreeCAD.GuiUp: + import _ViewProviderFemMeshRegion + _ViewProviderFemMeshRegion._ViewProviderFemMeshRegion(obj.ViewObject) + return obj + + +''' +# print supportedTypes +App.newDocument() +module = 'Fem' +FreeCADGui.doCommand('import ' + module) +for s in sorted(App.ActiveDocument.supportedTypes()): + if s.startswith(module): + print s +''' + +# @} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/TestFem.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/TestFem.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/TestFem.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/TestFem.py 2017-02-21 21:18:07.000000000 +0000 @@ -27,9 +27,7 @@ import Fem import FemToolsCcx import FreeCAD -import FemAnalysis -import FemSolverCalculix -import FemMaterial +import ObjectsFem import csv import tempfile import unittest @@ -82,11 +80,11 @@ self.active_doc.recompute() def create_new_analysis(self): - self.analysis = FemAnalysis.makeFemAnalysis('Analysis') + self.analysis = ObjectsFem.makeAnalysis('Analysis') self.active_doc.recompute() def create_new_solver(self): - self.solver_object = FemSolverCalculix.makeFemSolverCalculix('CalculiX') + self.solver_object = ObjectsFem.makeSolverCalculix('CalculiX') self.solver_object.GeometricalNonlinearity = 'linear' self.solver_object.ThermoMechSteadyState = False self.solver_object.MatrixSolverType = 'default' @@ -115,7 +113,7 @@ self.active_doc.recompute() def create_new_material(self): - self.new_material_object = FemMaterial.makeFemMaterial('MechanicalMaterial') + self.new_material_object = ObjectsFem.makeMaterialSolid('MechanicalMaterial') mat = self.new_material_object.Material mat['Name'] = "Steel-Generic" mat['YoungsModulus'] = "200000 MPa" @@ -304,11 +302,11 @@ self.active_doc.recompute() def create_new_analysis(self): - self.analysis = FemAnalysis.makeFemAnalysis('Analysis') + self.analysis = ObjectsFem.makeAnalysis('Analysis') self.active_doc.recompute() def create_new_solver(self): - self.solver_object = FemSolverCalculix.makeFemSolverCalculix('CalculiX') + self.solver_object = ObjectsFem.makeSolverCalculix('CalculiX') self.solver_object.AnalysisType = 'thermomech' self.solver_object.GeometricalNonlinearity = 'linear' self.solver_object.ThermoMechSteadyState = True @@ -336,7 +334,7 @@ self.active_doc.recompute() def create_new_material(self): - self.new_material_object = FemMaterial.makeFemMaterial('MechanicalMaterial') + self.new_material_object = ObjectsFem.makeMaterialSolid('MechanicalMaterial') mat = self.new_material_object.Material mat['Name'] = "Steel-Generic" mat['YoungsModulus'] = "200000 MPa" diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemMechanicalResult.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemMechanicalResult.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemMechanicalResult.py 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemMechanicalResult.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -#*************************************************************************** -#* * -#* Copyright (c) 2015 - Qingfeng Xia * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** - -__title__ = "ViewProvider for FEM mechanical ResultObjectPython" -__author__ = "Qingfeng Xia, Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## @package _ViewProviderFemMechanicalResult -# \ingroup FEM -# \brief FreeCAD ViewProvider for mechanical ResultObjectPython in FEM workbench - -import FreeCAD -import FreeCADGui -import FemGui - - -class _ViewProviderFemMechanicalResult: - """A View Provider for the FemResultObject Python dervied FemResult class - """ - - def __init__(self, vobj): - vobj.Proxy = self - - def getIcon(self): - """after load from FCStd file, self.icon does not exist, return constant path instead""" - return ":/icons/fem-result.svg" - - def attach(self, vobj): - self.ViewObject = vobj - self.Object = vobj.Object - - def updateData(self, obj, prop): - return - - def onChanged(self, vobj, prop): - return - - def doubleClicked(self, vobj): - if FreeCADGui.activeWorkbench().name() != 'FemWorkbench': - FreeCADGui.activateWorkbench("FemWorkbench") - doc = FreeCADGui.getDocument(vobj.Object.Document) - if not doc.getInEdit(): - if is_result_obj_valid(self.Object): - doc.setEdit(vobj.Object.Name) - else: - FreeCAD.Console.PrintError('Active Task Dialog found! Please close this one first!\n') - return True - - def setEdit(self, vobj, mode=0): - import _TaskPanelShowResult - taskd = _TaskPanelShowResult._TaskPanelShowResult(self.Object) - taskd.obj = vobj.Object - FreeCADGui.Control.showDialog(taskd) - return True - - def unsetEdit(self, vobj, mode=0): - FreeCADGui.Control.closeDialog() - return - - def __getstate__(self): - return None - - def __setstate__(self, state): - return None - - -# helper -# I tried to do this inside the setEdit def but I was not able to unset the edit mode from within the setEdit def -def is_result_obj_valid(result_obj): - from PySide import QtGui - if FemGui.getActiveAnalysis() is not None: - if hasattr(result_obj, "Mesh") and result_obj.Mesh: - mem = FemGui.getActiveAnalysis().Member - if result_obj in mem: - if result_obj.Mesh in mem: - return True - else: - error_message = 'FEM: Result mesh object is not in active analysis.\n' - FreeCAD.Console.PrintError(error_message) - QtGui.QMessageBox.critical(None, 'Not in activate analysis', error_message) - return False - else: - error_message = 'FEM: Result object is not in active analysis.\n' - FreeCAD.Console.PrintError(error_message) - QtGui.QMessageBox.critical(None, 'Not in activate analysis', error_message) - return False - else: - error_message = 'FEM: Result object has no appropriate FEM mesh.\n' - FreeCAD.Console.PrintError(error_message) - QtGui.QMessageBox.critical(None, 'No result object', error_message) - return False - else: - error_message = 'FEM: No active analysis found! Please activate the analysis you would like to view results for.\n' - FreeCAD.Console.PrintError(error_message) - QtGui.QMessageBox.critical(None, 'No activate analysis', error_message) - return False diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemResultMechanical.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemResultMechanical.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemResultMechanical.py 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Fem/_ViewProviderFemResultMechanical.py 2017-02-21 21:18:07.000000000 +0000 @@ -0,0 +1,115 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2015 - Qingfeng Xia * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +__title__ = "ViewProvider for FEM mechanical ResultObjectPython" +__author__ = "Qingfeng Xia, Bernd Hahnebach" +__url__ = "http://www.freecadweb.org" + +## @package _ViewProviderFemResultMechanical +# \ingroup FEM +# \brief FreeCAD ViewProvider for mechanical ResultObjectPython in FEM workbench + +import FreeCAD +import FreeCADGui +import FemGui + + +class _ViewProviderFemResultMechanical: + """A View Provider for the FemResultObject Python dervied FemResult class + """ + + def __init__(self, vobj): + vobj.Proxy = self + + def getIcon(self): + """after load from FCStd file, self.icon does not exist, return constant path instead""" + return ":/icons/fem-result.svg" + + def attach(self, vobj): + self.ViewObject = vobj + self.Object = vobj.Object + + def updateData(self, obj, prop): + return + + def onChanged(self, vobj, prop): + return + + def doubleClicked(self, vobj): + if FreeCADGui.activeWorkbench().name() != 'FemWorkbench': + FreeCADGui.activateWorkbench("FemWorkbench") + doc = FreeCADGui.getDocument(vobj.Object.Document) + if not doc.getInEdit(): + if is_result_obj_valid(self.Object): + doc.setEdit(vobj.Object.Name) + else: + FreeCAD.Console.PrintError('Active Task Dialog found! Please close this one first!\n') + return True + + def setEdit(self, vobj, mode=0): + import _TaskPanelShowResult + taskd = _TaskPanelShowResult._TaskPanelShowResult(self.Object) + taskd.obj = vobj.Object + FreeCADGui.Control.showDialog(taskd) + return True + + def unsetEdit(self, vobj, mode=0): + FreeCADGui.Control.closeDialog() + return + + def __getstate__(self): + return None + + def __setstate__(self, state): + return None + + +# helper +# I tried to do this inside the setEdit def but I was not able to unset the edit mode from within the setEdit def +def is_result_obj_valid(result_obj): + from PySide import QtGui + if FemGui.getActiveAnalysis() is not None: + if hasattr(result_obj, "Mesh") and result_obj.Mesh: + mem = FemGui.getActiveAnalysis().Member + if result_obj in mem: + if result_obj.Mesh in mem: + return True + else: + error_message = 'FEM: Result mesh object is not in active analysis.\n' + FreeCAD.Console.PrintError(error_message) + QtGui.QMessageBox.critical(None, 'Not in activate analysis', error_message) + return False + else: + error_message = 'FEM: Result object is not in active analysis.\n' + FreeCAD.Console.PrintError(error_message) + QtGui.QMessageBox.critical(None, 'Not in activate analysis', error_message) + return False + else: + error_message = 'FEM: Result object has no appropriate FEM mesh.\n' + FreeCAD.Console.PrintError(error_message) + QtGui.QMessageBox.critical(None, 'No result object', error_message) + return False + else: + error_message = 'FEM: No active analysis found! Please activate the analysis you would like to view results for.\n' + FreeCAD.Console.PrintError(error_message) + QtGui.QMessageBox.critical(None, 'No activate analysis', error_message) + return False diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Measure/App/AppMeasure.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Measure/App/AppMeasure.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Measure/App/AppMeasure.cpp 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Measure/App/AppMeasure.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -26,24 +26,36 @@ #endif #include +#include #include #include "Measurement.h" #include "MeasurementPy.h" -struct PyMethodDef Measure_methods[] = { -// {"read" , read, 1}, - {NULL, NULL, 0, NULL} /* end of table marker */ +namespace Measure { +class Module : public Py::ExtensionModule +{ +public: + Module() : Py::ExtensionModule("Measure") + { + initialize("This module is the Measure module."); // register with Python + } + + virtual ~Module() {} + +private: }; +PyObject* initModule() +{ + return (new Module)->module().ptr(); +} -PyDoc_STRVAR(module_Measure_doc, -"This module is the Measure module."); +} // namespace Measure /* Python entry */ -extern "C" { -void MeasureExport initMeasure() +PyMOD_INIT_FUNC(Measure) { // load dependent module try { @@ -51,24 +63,18 @@ } catch(const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); - return; + PyMOD_Return(0); } - PyObject* measureModule = Py_InitModule3("Measure", Measure_methods, module_Measure_doc); /* mod name, table ptr */ - + PyObject* mod = Measure::initModule(); // Add Types to module - Base::Interpreter().addType(&Measure::MeasurementPy ::Type,measureModule,"Measurement"); - - Base::Console().Log("Loading Measure module... done\n"); - + Base::Interpreter().addType(&Measure::MeasurementPy ::Type,mod,"Measurement"); + Base::Console().Log("Loading Inspection module... done\n"); Measure::Measurement ::init(); + PyMOD_Return(mod); } - - -} // extern "C" - // debug print for sketchsolv -void debugprint(std::string s) +void debugprint(const std::string& s) { - Base::Console().Log(s.c_str()); -} \ No newline at end of file + Base::Console().Log("%s", s.c_str()); +} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Part/App/Geometry.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Part/App/Geometry.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Part/App/Geometry.cpp 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Part/App/Geometry.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -93,6 +93,7 @@ # include # include # include +# include # include # include # include @@ -186,24 +187,24 @@ { } -// Persistence implementer -unsigned int Geometry::getMemSize (void) const +// Persistence implementer +unsigned int Geometry::getMemSize (void) const { return 1; } -void Geometry::Save(Base::Writer &writer) const +void Geometry::Save(Base::Writer &writer) const { const char c = Construction?'1':'0'; writer.Stream() << writer.ind() << "" << endl; } -void Geometry::Restore(Base::XMLReader &reader) +void Geometry::Restore(Base::XMLReader &reader) { // read my Element reader.readElement("Construction"); // get the value of my Attribute - Construction = (int)reader.getAttributeAsInteger("value")==0?false:true; + Construction = (int)reader.getAttributeAsInteger("value")==0?false:true; } // ------------------------------------------------- @@ -256,28 +257,28 @@ this->myPoint->SetCoord(p.x,p.y,p.z); } -// Persistence implementer +// Persistence implementer unsigned int GeomPoint::getMemSize (void) const { return sizeof(Geom_CartesianPoint); } -void GeomPoint::Save(Base::Writer &writer) const +void GeomPoint::Save(Base::Writer &writer) const { // save the attributes of the father class Geometry::Save(writer); Base::Vector3d Point = getPoint(); - writer.Stream() - << writer.ind() - << "" << endl; } -void GeomPoint::Restore(Base::XMLReader &reader) +void GeomPoint::Restore(Base::XMLReader &reader) { // read the attributes of the father class Geometry::Restore(reader); @@ -289,7 +290,7 @@ X = reader.getAttributeAsFloat("X"); Y = reader.getAttributeAsFloat("Y"); Z = reader.getAttributeAsFloat("Z"); - + // set the read geometry setPoint(Base::Vector3d(X,Y,Z) ); } @@ -349,9 +350,9 @@ { Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); GeomLProp_CLProps prop(c,u,0,Precision::Confusion()); - + const gp_Pnt &point=prop.Value(); - + return Base::Vector3d(point.X(),point.Y(),point.Z()); } @@ -359,9 +360,9 @@ { Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); GeomLProp_CLProps prop(c,u,1,Precision::Confusion()); - + const gp_Vec &vec=prop.D1(); - + return Base::Vector3d(vec.X(),vec.Y(),vec.Z()); } @@ -369,19 +370,29 @@ { Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); GeomLProp_CLProps prop(c,u,2,Precision::Confusion()); - + const gp_Vec &vec=prop.D2(); - + return Base::Vector3d(vec.X(),vec.Y(),vec.Z()); } -bool GeomCurve::normal(double u, gp_Dir& dir) const +bool GeomCurve::normalAt(double u, Base::Vector3d& dir) const { Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); - GeomLProp_CLProps prop(c,u,1,Precision::Confusion()); - if (prop.IsTangentDefined()) { - prop.Normal(dir); - return true; + + try { + if (!c.IsNull()) { + GeomLProp_CLProps prop(c,u,2,Precision::Confusion()); + gp_Dir gdir; + prop.Normal(gdir); + dir = Base::Vector3d(gdir.X(), gdir.Y(), gdir.Z()); + + return true; + } + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); } return false; @@ -409,7 +420,7 @@ bool GeomCurve::closestParameterToBasicCurve(const Base::Vector3d& point, double &u) const { Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); - + if (c->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))){ Handle_Geom_TrimmedCurve tc = Handle_Geom_TrimmedCurve::DownCast(handle()); Handle_Geom_Curve bc = tc->BasisCurve(); @@ -426,13 +437,85 @@ throw Base::RuntimeError(e->GetMessageString()); } - return false; - } + return false; + } else { return this->closestParameter(point, u); } } +double GeomCurve::getFirstParameter() const +{ + Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); + + try { + // pending check for RealFirst RealLast in case of infinite curve + return c->FirstParameter(); + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); + } + +} + +double GeomCurve::getLastParameter() const +{ + Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); + + try { + // pending check for RealFirst RealLast in case of infinite curve + return c->LastParameter(); + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); + } +} + +double GeomCurve::curvatureAt(double u) const +{ + Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); + + try { + GeomLProp_CLProps prop(c,u,2,Precision::Confusion()); + return prop.Curvature(); + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); + } +} + +double GeomCurve::length(double u, double v) const +{ + + Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); + + try { + GeomAdaptor_Curve adaptor(c); + return GCPnts_AbscissaPoint::Length(adaptor,u,v,Precision::Confusion()); + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); + } +} + +void GeomCurve::reverse(void) +{ + Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle()); + + try { + c->Reverse(); + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); + } +} + + // ------------------------------------------------- TYPESYSTEM_SOURCE_ABSTRACT(Part::GeomBoundedCurve, Part::GeomCurve) @@ -501,7 +584,7 @@ return newCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomBezierCurve::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomBezierCurve::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomBezierCurve::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -813,7 +896,20 @@ GeomConvert::C0BSplineToC1BSplineCurve(this->myCurve, tol, ang_tol); } -// Persistence implementer +void GeomBSplineCurve::increaseDegree(double degree) +{ + try { + Handle_Geom_BSplineCurve curve = Handle_Geom_BSplineCurve::DownCast(this->handle()); + curve->IncreaseDegree(degree); + return; + } + catch (Standard_Failure) { + Handle_Standard_Failure e = Standard_Failure::Caught(); + throw Base::RuntimeError(e->GetMessageString()); + } +} + +// Persistence implementer unsigned int GeomBSplineCurve::getMemSize (void) const { return sizeof(Geom_BSplineCurve); @@ -841,10 +937,10 @@ "\">" << endl; writer.incInd(); - + std::vector::const_iterator itp; std::vector::const_iterator itw; - + for (itp = poles.begin(), itw = weights.begin(); itp != poles.end() && itw != weights.end(); ++itp, ++itw) { writer.Stream() << writer.ind() @@ -884,10 +980,10 @@ int degree = reader.getAttributeAsInteger("Degree"); bool isperiodic = (bool) reader.getAttributeAsInteger("IsPeriodic"); - // Handle_Geom_BSplineCurve spline = new + // Handle_Geom_BSplineCurve spline = new // Geom_BSplineCurve(occpoles,occweights,occknots,occmults,degree, // PyObject_IsTrue(periodic) ? Standard_True : Standard_False, - // PyObject_IsTrue(CheckRational) ? Standard_True : Standard_False); + // PyObject_IsTrue(CheckRational) ? Standard_True : Standard_False); TColgp_Array1OfPnt p(1,polescount); TColStd_Array1OfReal w(1,polescount); @@ -1354,7 +1450,7 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomCircle::getMemSize (void) const { return sizeof(Geom_Circle); @@ -1560,13 +1656,13 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomArcOfCircle::getMemSize (void) const { return sizeof(Geom_Circle) + 2 *sizeof(double); } -void GeomArcOfCircle::Save(Base::Writer &writer) const +void GeomArcOfCircle::Save(Base::Writer &writer) const { // save the attributes of the father class Geometry::Save(writer); @@ -1591,7 +1687,7 @@ "\"/>" << endl; } -void GeomArcOfCircle::Restore(Base::XMLReader &reader) +void GeomArcOfCircle::Restore(Base::XMLReader &reader) { // read the attributes of the father class Geometry::Restore(reader); @@ -1624,7 +1720,7 @@ Handle_Geom_TrimmedCurve tmpcurve = ma.Value(); Handle_Geom_Circle tmpcircle = Handle_Geom_Circle::DownCast(tmpcurve->BasisCurve()); Handle_Geom_Circle circle = Handle_Geom_Circle::DownCast(this->myCurve->BasisCurve()); - + circle->SetCirc(tmpcircle->Circ()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -1794,7 +1890,7 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomEllipse::getMemSize (void) const { return sizeof(Geom_Ellipse); @@ -1808,12 +1904,12 @@ gp_Pnt center = this->myCurve->Axis().Location(); gp_Dir normal = this->myCurve->Axis().Direction(); gp_Dir xdir = this->myCurve->XAxis().Direction(); - + gp_Ax2 xdirref(center, normal); // this is a reference XY for the ellipse - + double AngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - - + + writer.Stream() << writer.ind() << "myCurve->BasisCurve()); gp_Pnt center = ellipse->Axis().Location(); gp_Dir normal = ellipse->Axis().Direction(); gp_Dir xdir = ellipse->XAxis().Direction(); - + gp_Ax2 xdirref(center, normal); // this is a reference XY for the ellipse - + double AngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - - + + writer.Stream() << writer.ind() << "MinorRadius() << "\" " << "AngleXU=\"" << AngleXU << "\" " << "StartAngle=\"" << this->myCurve->FirstParameter() << "\" " - << "EndAngle=\"" << this->myCurve->LastParameter() << "\" " + << "EndAngle=\"" << this->myCurve->LastParameter() << "\" " << "/>" << endl; } -void GeomArcOfEllipse::Restore(Base::XMLReader &reader) +void GeomArcOfEllipse::Restore(Base::XMLReader &reader) { // read the attributes of the father class GeomCurve::Restore(reader); @@ -2119,31 +2215,31 @@ AngleXU = reader.getAttributeAsFloat("AngleXU"); StartAngle = reader.getAttributeAsFloat("StartAngle"); EndAngle = reader.getAttributeAsFloat("EndAngle"); - - + + // set the read geometry gp_Pnt p1(CenterX,CenterY,CenterZ); gp_Dir norm(NormalX,NormalY,NormalZ); - + gp_Ax1 normaxis(p1,norm); - + gp_Ax2 xdir(p1, norm); - - xdir.Rotate(normaxis,AngleXU); - + + xdir.Rotate(normaxis,AngleXU); + try { GC_MakeEllipse mc(xdir, MajorRadius, MinorRadius); if (!mc.IsDone()) throw Base::Exception(gce_ErrorStatusText(mc.Status())); - + GC_MakeArcOfEllipse ma(mc.Value()->Elips(), StartAngle, EndAngle, 1); if (!ma.IsDone()) throw Base::Exception(gce_ErrorStatusText(ma.Status())); - + Handle_Geom_TrimmedCurve tmpcurve = ma.Value(); Handle_Geom_Ellipse tmpellipse = Handle_Geom_Ellipse::DownCast(tmpcurve->BasisCurve()); Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast(this->myCurve->BasisCurve()); - + ellipse->SetElips(tmpellipse->Elips()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -2232,7 +2328,7 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomHyperbola::getMemSize (void) const { return sizeof(Geom_Hyperbola); @@ -2246,11 +2342,11 @@ gp_Pnt center = this->myCurve->Axis().Location(); gp_Dir normal = this->myCurve->Axis().Direction(); gp_Dir xdir = this->myCurve->XAxis().Direction(); - + gp_Ax2 xdirref(center, normal); // this is a reference XY for the ellipse - + double AngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + writer.Stream() << writer.ind() << "Position(); pos.SetXDirection(gp_Dir(newdir.x, newdir.y, newdir.z));//OCC should keep the old main Direction (Z), and change YDirection to accomodate the new XDirection. @@ -2480,27 +2576,27 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomArcOfHyperbola::getMemSize (void) const { return sizeof(Geom_Hyperbola) + 2 *sizeof(double); } -void GeomArcOfHyperbola::Save(Base::Writer &writer) const +void GeomArcOfHyperbola::Save(Base::Writer &writer) const { // save the attributes of the father class GeomCurve::Save(writer); - + Handle_Geom_Hyperbola h = Handle_Geom_Hyperbola::DownCast(this->myCurve->BasisCurve()); gp_Pnt center = h->Axis().Location(); gp_Dir normal = h->Axis().Direction(); gp_Dir xdir = h->XAxis().Direction(); - + gp_Ax2 xdirref(center, normal); // this is a reference XY for the ellipse - + double AngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + writer.Stream() << writer.ind() << "MinorRadius() << "\" " << "AngleXU=\"" << AngleXU << "\" " << "StartAngle=\"" << this->myCurve->FirstParameter() << "\" " - << "EndAngle=\"" << this->myCurve->LastParameter() << "\" " + << "EndAngle=\"" << this->myCurve->LastParameter() << "\" " << "/>" << endl; } -void GeomArcOfHyperbola::Restore(Base::XMLReader &reader) +void GeomArcOfHyperbola::Restore(Base::XMLReader &reader) { // read the attributes of the father class GeomCurve::Restore(reader); @@ -2538,31 +2634,31 @@ AngleXU = reader.getAttributeAsFloat("AngleXU"); StartAngle = reader.getAttributeAsFloat("StartAngle"); EndAngle = reader.getAttributeAsFloat("EndAngle"); - - + + // set the read geometry gp_Pnt p1(CenterX,CenterY,CenterZ); gp_Dir norm(NormalX,NormalY,NormalZ); - + gp_Ax1 normaxis(p1,norm); - + gp_Ax2 xdir(p1, norm); - - xdir.Rotate(normaxis,AngleXU); - + + xdir.Rotate(normaxis,AngleXU); + try { GC_MakeHyperbola mc(xdir, MajorRadius, MinorRadius); if (!mc.IsDone()) throw Base::Exception(gce_ErrorStatusText(mc.Status())); - + GC_MakeArcOfHyperbola ma(mc.Value()->Hypr(), StartAngle, EndAngle, 1); if (!ma.IsDone()) throw Base::Exception(gce_ErrorStatusText(ma.Status())); - + Handle_Geom_TrimmedCurve tmpcurve = ma.Value(); Handle_Geom_Hyperbola tmphyperbola = Handle_Geom_Hyperbola::DownCast(tmpcurve->BasisCurve()); Handle_Geom_Hyperbola hyperbola = Handle_Geom_Hyperbola::DownCast(this->myCurve->BasisCurve()); - + hyperbola->SetHypr(tmphyperbola->Hypr()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -2633,7 +2729,7 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomParabola::getMemSize (void) const { return sizeof(Geom_Parabola); @@ -2647,11 +2743,11 @@ gp_Pnt center = this->myCurve->Axis().Location(); gp_Dir normal = this->myCurve->Axis().Direction(); gp_Dir xdir = this->myCurve->XAxis().Direction(); - + gp_Ax2 xdirref(center, normal); // this is a reference XY for the ellipse - + double AngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + writer.Stream() << writer.ind() << "BasisCurve()); gp_Pnt gp = p->Focus(); - + return Base::Vector3d(gp.X(),gp.Y(),gp.Z()); } @@ -2824,27 +2920,27 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomArcOfParabola::getMemSize (void) const { return sizeof(Geom_Parabola) + 2 *sizeof(double); } -void GeomArcOfParabola::Save(Base::Writer &writer) const +void GeomArcOfParabola::Save(Base::Writer &writer) const { // save the attributes of the father class GeomCurve::Save(writer); - + Handle_Geom_Parabola p = Handle_Geom_Parabola::DownCast(this->myCurve->BasisCurve()); gp_Pnt center = p->Axis().Location(); gp_Dir normal = p->Axis().Direction(); gp_Dir xdir = p->XAxis().Direction(); - + gp_Ax2 xdirref(center, normal); // this is a reference XY for the ellipse - + double AngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + writer.Stream() << writer.ind() << "Focal() << "\" " << "AngleXU=\"" << AngleXU << "\" " << "StartAngle=\"" << this->myCurve->FirstParameter() << "\" " - << "EndAngle=\"" << this->myCurve->LastParameter() << "\" " + << "EndAngle=\"" << this->myCurve->LastParameter() << "\" " << "/>" << endl; } -void GeomArcOfParabola::Restore(Base::XMLReader &reader) +void GeomArcOfParabola::Restore(Base::XMLReader &reader) { // read the attributes of the father class GeomCurve::Restore(reader); @@ -2880,31 +2976,31 @@ AngleXU = reader.getAttributeAsFloat("AngleXU"); StartAngle = reader.getAttributeAsFloat("StartAngle"); EndAngle = reader.getAttributeAsFloat("EndAngle"); - - + + // set the read geometry gp_Pnt p1(CenterX,CenterY,CenterZ); gp_Dir norm(NormalX,NormalY,NormalZ); - + gp_Ax1 normaxis(p1,norm); - + gp_Ax2 xdir(p1, norm); - - xdir.Rotate(normaxis,AngleXU); - + + xdir.Rotate(normaxis,AngleXU); + try { gce_MakeParab mc(xdir, Focal); if (!mc.IsDone()) throw Base::Exception(gce_ErrorStatusText(mc.Status())); - + GC_MakeArcOfParabola ma(mc.Value(), StartAngle, EndAngle, 1); if (!ma.IsDone()) throw Base::Exception(gce_ErrorStatusText(ma.Status())); - + Handle_Geom_TrimmedCurve tmpcurve = ma.Value(); Handle_Geom_Parabola tmpparabola = Handle_Geom_Parabola::DownCast(tmpcurve->BasisCurve()); Handle_Geom_Parabola parabola = Handle_Geom_Parabola::DownCast(this->myCurve->BasisCurve()); - + parabola->SetParab(tmpparabola->Parab()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -2974,13 +3070,13 @@ return newLine; } -// Persistence implementer -unsigned int GeomLine::getMemSize (void) const +// Persistence implementer +unsigned int GeomLine::getMemSize (void) const { return sizeof(Geom_Line); } -void GeomLine::Save(Base::Writer &writer) const +void GeomLine::Save(Base::Writer &writer) const { // save the attributes of the father class Geometry::Save(writer); @@ -2988,14 +3084,14 @@ Base::Vector3d Pos = getPos(); Base::Vector3d Dir = getDir(); - writer.Stream() - << writer.ind() - << "" << endl; } @@ -3014,7 +3110,7 @@ DirX = reader.getAttributeAsFloat("DirX"); DirY = reader.getAttributeAsFloat("DirY"); DirZ = reader.getAttributeAsFloat("DirZ"); - + // set the read geometry setLine(Base::Vector3d(PosX,PosY,PosZ),Base::Vector3d(DirX,DirY,DirZ) ); } @@ -3104,13 +3200,13 @@ } } -// Persistence implementer +// Persistence implementer unsigned int GeomLineSegment::getMemSize (void) const { return sizeof(Geom_TrimmedCurve) + sizeof(Geom_Line); } -void GeomLineSegment::Save (Base::Writer &writer) const +void GeomLineSegment::Save (Base::Writer &writer) const { // save the attributes of the father class Geometry::Save(writer); @@ -3118,19 +3214,19 @@ Base::Vector3d End = getEndPoint(); Base::Vector3d Start = getStartPoint(); - writer.Stream() - << writer.ind() - << "" << endl; } -void GeomLineSegment::Restore (Base::XMLReader &reader) +void GeomLineSegment::Restore (Base::XMLReader &reader) { // read the attributes of the father class Geometry::Restore(reader); @@ -3145,7 +3241,7 @@ EndX = reader.getAttributeAsFloat("EndX"); EndY = reader.getAttributeAsFloat("EndY"); EndZ = reader.getAttributeAsFloat("EndZ"); - + // set the read geometry setPoints(Base::Vector3d(StartX,StartY,StartZ),Base::Vector3d(EndX,EndY,EndZ) ); } @@ -3194,7 +3290,7 @@ return this->myCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomOffsetCurve::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomOffsetCurve::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomOffsetCurve::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3238,7 +3334,7 @@ return newCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomTrimmedCurve::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomTrimmedCurve::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomTrimmedCurve::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3332,7 +3428,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomBezierSurface::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomBezierSurface::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomBezierSurface::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3391,7 +3487,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomBSplineSurface::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomBSplineSurface::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomBSplineSurface::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3438,7 +3534,7 @@ return tempCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomCylinder::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomCylinder::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomCylinder::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3485,7 +3581,7 @@ return tempCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomCone::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomCone::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomCone::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3532,7 +3628,7 @@ return tempCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomToroid::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomToroid::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomToroid::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3579,7 +3675,7 @@ return tempCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomSphere::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomSphere::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomSphere::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3626,7 +3722,7 @@ return tempCurve; } -// Persistence implementer +// Persistence implementer unsigned int GeomPlane::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomPlane::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomPlane::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3675,7 +3771,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomOffsetSurface::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomOffsetSurface::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomOffsetSurface::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3730,7 +3826,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomPlateSurface::getMemSize (void) const { throw Base::NotImplementedError("GeomPlateSurface::getMemSize"); @@ -3785,7 +3881,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomTrimmedSurface::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomTrimmedSurface::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomTrimmedSurface::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3834,7 +3930,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomSurfaceOfRevolution::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomSurfaceOfRevolution::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomSurfaceOfRevolution::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} @@ -3883,7 +3979,7 @@ return newSurf; } -// Persistence implementer +// Persistence implementer unsigned int GeomSurfaceOfExtrusion::getMemSize (void) const {assert(0); return 0;/* not implemented yet */} void GeomSurfaceOfExtrusion::Save (Base::Writer &/*writer*/) const {assert(0); /* not implemented yet */} void GeomSurfaceOfExtrusion::Restore (Base::XMLReader &/*reader*/) {assert(0); /* not implemented yet */} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Part/App/Geometry.h freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Part/App/Geometry.h --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Part/App/Geometry.h 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Part/App/Geometry.h 2017-02-21 21:18:08.000000000 +0000 @@ -139,9 +139,15 @@ Base::Vector3d pointAtParameter(double u) const; Base::Vector3d firstDerivativeAtParameter(double u) const; Base::Vector3d secondDerivativeAtParameter(double u) const; - bool normal(double u, gp_Dir& dir) const; bool closestParameter(const Base::Vector3d& point, double &u) const; bool closestParameterToBasicCurve(const Base::Vector3d& point, double &u) const; + double getFirstParameter() const; + double getLastParameter() const; + double curvatureAt(double u) const; + double length(double u, double v) const; + bool normalAt(double u, Base::Vector3d& dir) const; + + void reverse(void); }; class PartExport GeomBoundedCurve : public GeomCurve @@ -224,6 +230,8 @@ bool join(const Handle_Geom_BSplineCurve&); void makeC1Continuous(double, double); std::list toBiArcs(double tolerance) const; + + void increaseDegree(double degree); // Persistence implementer --------------------- virtual unsigned int getMemSize(void) const; diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Part/Gui/SoBrepFaceSet.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Part/Gui/SoBrepFaceSet.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Part/Gui/SoBrepFaceSet.cpp 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Part/Gui/SoBrepFaceSet.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -29,6 +29,7 @@ #ifndef _PreComp_ #include #include +#include #include #include #include @@ -44,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +53,7 @@ #include #include #include +#include #endif #include "SoBrepFaceSet.h" @@ -75,70 +78,80 @@ // Should come after glext.h to avoid warnings #include -#if QT_VERSION < 0x50000 -#include -#else -#include -#endif - using namespace PartGui; -#if QT_VERSION < 0x50000 -#define _PROC(addr) QString::fromLatin1(addr) -#else -#define _PROC(addr) QByteArray(addr) -#endif - SO_NODE_SOURCE(SoBrepFaceSet); #define PRIVATE(p) ((p)->pimpl) class SoBrepFaceSet::VBO { public: + struct Buffer { + uint32_t myvbo[2]; + }; + static SbBool vboAvailable; SbBool updateVbo; - uint32_t myvbo[2]; SbBool vboLoaded; uint32_t indice_array; + std::map vbomap; + + VBO() + { + SoContextHandler::addContextDestructionCallback(context_destruction_cb, this); - VBO() { + //SoBase::staticDataLock(); static bool init = false; if (!init) { std::string ext = (const char*)(glGetString(GL_EXTENSIONS)); vboAvailable = (ext.find("GL_ARB_vertex_buffer_object") != std::string::npos); init = true; } - -#ifdef FC_OS_WIN32 -#if QT_VERSION < 0x50000 - const QGLContext* gl = QGLContext::currentContext(); -#else - QOpenGLContext* gl = QOpenGLContext::currentContext(); -#endif - PFNGLGENBUFFERSPROC glGenBuffersARB = (PFNGLGENBUFFERSPROC)gl->getProcAddress(_PROC("glGenBuffersARB")); -#endif + //SoBase::staticDataUnlock(); updateVbo = false; vboLoaded = false; indice_array = 0; - if (vboAvailable) { - glGenBuffersARB(2, &myvbo[0]); + } + ~VBO() + { + SoContextHandler::removeContextDestructionCallback(context_destruction_cb, this); + + // schedule delete for all allocated GL resources + std::map::iterator it; + for (it = vbomap.begin(); it != vbomap.end(); ++it) { + void * ptr0 = (void*) ((uintptr_t) it->second.myvbo[0]); + SoGLCacheContextElement::scheduleDeleteCallback(it->first, VBO::vbo_delete, ptr0); + void * ptr1 = (void*) ((uintptr_t) it->second.myvbo[1]); + SoGLCacheContextElement::scheduleDeleteCallback(it->first, VBO::vbo_delete, ptr1); } } - ~VBO() { + + static void context_destruction_cb(uint32_t context, void * userdata) + { + Buffer buffer; + VBO * self = static_cast(userdata); + + std::map::iterator it = self->vbomap.find(context); + if (it != self->vbomap.end()) { #ifdef FC_OS_WIN32 -#if QT_VERSION < 0x50000 - const QGLContext* gl = QGLContext::currentContext(); -#else - QOpenGLContext* gl = QOpenGLContext::currentContext(); -#endif - if (!gl) - return; - PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)gl->getProcAddress(_PROC("glDeleteBuffersARB")); + const cc_glglue * glue = cc_glglue_instance((int) context); + PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)cc_glglue_getprocaddress(glue, "glDeleteBuffersARB"); #endif - glDeleteBuffersARB(2, &myvbo[0]); + //cc_glglue_glDeleteBuffers(glue, buffer.size(), buffer.data()); + buffer = it->second; + glDeleteBuffersARB(2, buffer.myvbo); + self->vbomap.erase(it); + } + } + + static void vbo_delete(void * closure, uint32_t contextid) + { + const cc_glglue * glue = cc_glglue_instance((int) contextid); + GLuint id = (GLuint) ((uintptr_t) closure); + cc_glglue_glDeleteBuffers(glue, 1, &id); } }; @@ -196,10 +209,12 @@ for (int i=0; iselectionIndex.finishEditing(); + PRIVATE(this)->updateVbo = true; return; } else if (selaction->getType() == Gui::SoSelectionElementAction::None) { this->selectionIndex.setNum(0); + PRIVATE(this)->updateVbo = true; return; } @@ -469,6 +484,10 @@ if (hasVBO) { // get the VBO status of the viewer Gui::SoGLVBOActivatedElement::get(state, hasVBO); + // + //if (SoGLVBOElement::shouldCreateVBO(state, numindices)) { + // this->startVertexArray(action, coords, normals, false, false); + //} } renderShape(action, hasVBO, static_cast(coords), cindices, numindices, pindices, numparts, normals, nindices, &mb, mindices, &tb, tindices, nbind, mbind, doTextures?1:0); @@ -972,6 +991,21 @@ uint32_t RGBA,R,G,B,A; float Rf,Gf,Bf,Af; + VBO::Buffer buf; + uint32_t contextId = action->getCacheContext(); + std::map::iterator it = PRIVATE(this)->vbomap.find(contextId); + if (it == PRIVATE(this)->vbomap.end()) { +#ifdef FC_OS_WIN32 + const cc_glglue * glue = cc_glglue_instance(action->getCacheContext()); + PFNGLGENBUFFERSPROC glGenBuffersARB = (PFNGLGENBUFFERSPROC)cc_glglue_getprocaddress(glue, "glGenBuffersARB"); +#endif + glGenBuffersARB(2, buf.myvbo); + PRIVATE(this)->vbomap[contextId] = buf; + } + else { + buf = it->second; + } + // vbo loaded is defining if we must pre-load data into the VBO. When the variable is set to 0 // it means that the VBO has not been initialized // updateVbo is tracking the need to update the content of the VBO which act as a buffer within @@ -988,8 +1022,8 @@ PFNGLBINDBUFFERARBPROC glBindBufferARB = (PFNGLBINDBUFFERARBPROC) cc_glglue_getprocaddress(glue, "glBindBufferARB"); PFNGLMAPBUFFERARBPROC glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cc_glglue_getprocaddress(glue, "glMapBufferARB"); #endif - glBindBufferARB(GL_ARRAY_BUFFER_ARB, PRIVATE(this)->myvbo[0]); - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, PRIVATE(this)->myvbo[1]); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf.myvbo[0]); + glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, buf.myvbo[1]); vertex_array=(float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); index_array=(GLuint *)glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); @@ -1198,10 +1232,10 @@ PFNGLBUFFERDATAARBPROC glBufferDataARB = (PFNGLBUFFERDATAARBPROC)cc_glglue_getprocaddress(glue, "glBufferDataARB"); #endif - glBindBufferARB(GL_ARRAY_BUFFER_ARB, PRIVATE(this)->myvbo[0]); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf.myvbo[0]); glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(float) * indice , vertex_array, GL_DYNAMIC_DRAW_ARB); - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, PRIVATE(this)->myvbo[1]); + glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, buf.myvbo[1]); glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(GLuint) * PRIVATE(this)->indice_array , &index_array[0], GL_DYNAMIC_DRAW_ARB); glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); @@ -1228,8 +1262,8 @@ PFNGLBINDBUFFERARBPROC glBindBufferARB = (PFNGLBINDBUFFERARBPROC)cc_glglue_getprocaddress(glue, "glBindBufferARB"); #endif - glBindBufferARB(GL_ARRAY_BUFFER_ARB, PRIVATE(this)->myvbo[0]); - glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, PRIVATE(this)->myvbo[1]); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf.myvbo[0]); + glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, buf.myvbo[1]); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_COLOR_ARRAY); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Box.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Box.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Box.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Box.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,240 +1,136 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Box + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Box.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cone.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cone.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cone.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cone.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,166 +1,110 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Cone + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cone.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cylinder.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cylinder.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cylinder.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cylinder.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,200 +1,116 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Cylinder + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Ellipsoid.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Ellipsoid.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Ellipsoid.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Ellipsoid.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,242 +1,118 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Ellipsoid + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Ellipsoid.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Loft.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Loft.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Loft.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Loft.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,303 +1,104 @@ - - - - - - + + + + + - - - + + + - - - - - + + + - - - - - - - - - - - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Loft + 2015-06-03 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Loft.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Pipe.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Pipe.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Pipe.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Pipe.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,276 +1,103 @@ - - - - - - + + + + + + + + + + + + + - - - + + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Pipe + 2015-05-27 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Pipe.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Prism.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Prism.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Prism.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Prism.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,320 +1,141 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Prism + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Prism.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Sphere.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Sphere.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Sphere.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Sphere.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,171 +1,101 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Sphere + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Sphere.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + + + + + + + + + + + + + + + - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Torus.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Torus.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Torus.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Torus.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,265 +1,152 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Torus + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Torus.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Wedge.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Wedge.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Wedge.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Wedge.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,236 +1,136 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Additive_Wedge + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Additive_Wedge.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Create_New.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Create_New.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Create_New.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Create_New.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,661 +1,166 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jmaustpc] + + + PartDesign_Body_Create_New + 2013-12-24 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Create_New.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,556 +1,155 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jrheinlaender] + + + PartDesign_Body + 2013-05-22 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Tree.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Tree.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Tree.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Tree.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,624 +1,166 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jmaustpc] + + + PartDesign_Body_Tree + 2013-12-24 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Body_Tree.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Boolean.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Boolean.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Boolean.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Boolean.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,151 +1,71 @@ - - - - - + + + + + - - - - + + + + + + + + + + + + + + + + - - - - + + + + - + image/svg+xml - + + + + [jrheinlaender] + + + PartDesign_Boolean + 2013-05-22 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Boolean.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - + + + + + + - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Chamfer.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Chamfer.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Chamfer.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Chamfer.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,197 +1,97 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [wmayer] + + + PartDesign_Chamfer + 2012-09-10 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Chamfer.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_CoordinateSystem.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_CoordinateSystem.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_CoordinateSystem.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_CoordinateSystem.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,193 +1,129 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_CoordinateSystem + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_CoordinateSystem.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Draft.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Draft.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Draft.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Draft.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,241 +1,103 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jrheinlaender] + + + PartDesign_Draft + 2012-11-25 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Draft.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Fillet.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Fillet.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Fillet.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Fillet.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,195 +1,95 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [wmayer] + + + PartDesign_Fillet + 2012-09-10 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_ + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Groove.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Groove.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Groove.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Groove.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,419 +1,137 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [wmayer] + + + PartDesign_Groove + 2012-06-09 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Groove.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Hole.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Hole.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Hole.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Hole.svg 2017-02-21 21:18:08.000000000 +0000 @@ -14,8 +14,8 @@ height="64px" id="svg2816" version="1.1" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="PartDesign_Hole3.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="PartDesign_Hole.svg" sodipodi:version="0.32" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-filename="/home/yorik/PartDesign_Pocket.png" @@ -24,6 +24,66 @@ + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + inkscape:window-width="1600" + inkscape:window-height="834" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-bbox="true" + inkscape:snap-nodes="true" + inkscape:snap-global="true" + inkscape:snap-grids="true"> + + @@ -597,7 +729,32 @@ image/svg+xml - + + + + [jmaustpc] + + + PartDesign_Hole + 2013-03-17 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Hole.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + @@ -609,38 +766,130 @@ transform="scale(0.73872768,1.3536788)" style="font-size:54.21519089000000236px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ff2600;fill-opacity:1;stroke:#731200;font-family:Arial;-inkscape-font-specification:Arial;color:#000000;fill-rule:nonzero;stroke-width:2.19132471;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" id="text3796"> + + + + + + + transform="scale(1.3536788,0.73872768)" + sodipodi:nodetypes="cccczc" /> + + + + + + + transform="scale(1.3536788,0.73872768)" /> + transform="scale(1.3536788,0.73872768)" /> + sodipodi:type="arc" + style="font-size:54.21519089px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;color:#000000;fill:none;stroke:#280000;stroke-width:2.24780583;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:2.04;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Arial;-inkscape-font-specification:Arial" + id="path3913-1" + sodipodi:cx="26" + sodipodi:cy="26" + sodipodi:rx="18" + sodipodi:ry="18" + d="M 44,26 A 18,18 0 1 1 8,26 18,18 0 1 1 44,26 z" + transform="matrix(1.0716624,0.15356384,0,0.73872768,1.9177116,1.1703277)" /> diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InternalExternalGear.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InternalExternalGear.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InternalExternalGear.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InternalExternalGear.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,71 +1,95 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + - + image/svg+xml - - + + + + + [Aglef Kaiser] + + + PartDesign_InternalExternalGear + 2014-08-08 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InternalExternalGear.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InvoluteGear.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InvoluteGear.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InvoluteGear.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InvoluteGear.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,71 +1,49 @@ - - - - - + + + + + + - + image/svg+xml - - + + + + + [jriegel] + + + PartDesign_InvoluteGear + 2014-02-16 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_InvoluteGear.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - Layer 1 - - + + + Layer 1 + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_LinearPattern.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_LinearPattern.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_LinearPattern.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_LinearPattern.svg 2017-02-21 21:18:08.000000000 +0000 @@ -14,8 +14,8 @@ height="64px" id="svg5821" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="PartDesign_ArrayLinear_alt.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="PartDesign_LinearPattern.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.1" inkscape:export-filename="/media/data/Yorik/FreeCAD/icons/Sketcher.png" @@ -24,6 +24,30 @@ + + + + + + + + - - - - - + + + + + + + + + + + + + inkscape:object-nodes="true"> + + @@ -1726,6 +1774,31 @@ + + + [jrheinlaender] + + + PartDesign_LinearPattern + 2012-09-07 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_LinearPattern.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + @@ -1733,85 +1806,102 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Line.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Line.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Line.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Line.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,180 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jrheinlaender] + + + PartDesign_Line + 2013-05-22 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Line.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Mirrored.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Mirrored.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Mirrored.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Mirrored.svg 2017-02-21 21:18:08.000000000 +0000 @@ -14,8 +14,8 @@ height="64px" id="svg5821" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="PartDesign_Mirrored_normandc.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="PartDesign_Mirrored.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.1" inkscape:export-filename="/media/data/Yorik/FreeCAD/icons/Sketcher.png" @@ -24,6 +24,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + inkscape:object-nodes="true" + inkscape:snap-bbox="false" + inkscape:snap-smooth-nodes="true" + inkscape:snap-grids="false" + inkscape:object-paths="true"> + + @@ -1829,7 +1950,32 @@ image/svg+xml - + + + + [jrheinlaender] + + + PartDesign_Mirrored + 2012-09-07 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Mirrored.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + @@ -1837,76 +1983,115 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> - - - + transform="matrix(2.2328615,0,0,2.2328615,-68.95038,-21.690395)" + style="stroke-width:0.8957116;stroke-miterlimit:4;stroke-dasharray:none" + id="g4065"> + - - - - - + id="path3221-1" + d="m 57.303322,15.17801 -5.37427,-1.298782 -18.809945,11.95775 0,5.284699 15.047956,5.015985 9.136259,0 z" + style="color:#000000;fill:none;stroke:#729fcf;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + + - - - - + id="g4206" + transform="translate(64,0)"> + + + id="path4184" + d="m -45,43 0,-20 14.857429,-9.328366 0,20 z" + style="fill:url(#linearGradient4194);fill-opacity:1;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" /> + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MoveTip.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MoveTip.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MoveTip.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MoveTip.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,200 +1,111 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - + - + image/svg+xml - - + + + + + [blobfish] + + + PartDesign_MoveTip + 2015-05-03 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MoveTip.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MultiTransform.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MultiTransform.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MultiTransform.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MultiTransform.svg 2017-02-21 21:18:08.000000000 +0000 @@ -14,8 +14,8 @@ height="64px" id="svg5821" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="PartDesign_ArrayMulti.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="PartDesign_MultiTransform.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.1" inkscape:export-filename="/media/data/Yorik/FreeCAD/icons/Sketcher.png" @@ -24,6 +24,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-bbox="true" + inkscape:snap-nodes="true"> + + @@ -1644,6 +1784,31 @@ + + + [jrheinlaender] + + + PartDesign_MultiTransform + 2012-09-07 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_MultiTransform.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + @@ -1651,129 +1816,150 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> - - + transform="matrix(2.2328615,0,0,2.2328615,-68.95038,-21.690395)" + style="stroke-width:0.8957116;stroke-miterlimit:4;stroke-dasharray:none" + id="g4065"> + + id="path3221-1" + d="m 57.303322,15.17801 -5.37427,-1.298782 -18.809945,11.95775 0,5.284699 15.047956,5.015985 9.136259,0 z" + style="color:#000000;fill:none;stroke:#729fcf;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="path4270-6" + d="m 32.223395,37.033374 15.674955,0 -15.674955,-5.37427 z" + style="color:#000000;fill:url(#linearGradient4061);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="path4270-3" + d="m 33.119107,36.137662 9.31539,1e-6 -9.31539,-3.224562 z" + style="color:#000000;fill:none;stroke:#729fcf;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:7.9000001;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> - + id="g4063-6" + transform="matrix(2.2190358,0,0,2.32877,-64.95716,-48.178139)" + style="stroke:#302b00;stroke-width:0.39402407;stroke-miterlimit:4;stroke-dasharray:none"> + + sodipodi:nodetypes="ccccc" /> + sodipodi:nodetypes="ccccc" /> + sodipodi:nodetypes="ccccc" /> + - - - - - - + style="stroke-width:0.8957116;stroke-miterlimit:4;stroke-dasharray:none" + id="g4063" + transform="translate(7.998828,13.000004)"> + + + + id="g4063-6-3" + transform="translate(0,-13)" + style="stroke:#302b00"> + sodipodi:nodetypes="ccccc" /> + sodipodi:nodetypes="ccccc" /> + sodipodi:nodetypes="ccccc" /> + + + + + sodipodi:nodetypes="ccccc" /> + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pad.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pad.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pad.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pad.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,546 +1,151 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [wmayer] + + + PartDesign_Pad + 2011-10-10 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pad.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Plane.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Plane.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Plane.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Plane.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,218 +1,130 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jrheinlaender] + + + PartDesign_Plane + 2013-05-22 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Plane.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pocket.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pocket.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pocket.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pocket.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,566 +1,172 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [wmayer] + + + PartDesign_Pocket + 2011-10-10 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Pocket.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Point.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Point.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Point.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Point.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,172 +1,80 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + image/svg+xml - - + + + + + [jrheinlaender] + + + PartDesign_Point + 2013-05-22 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Point.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_PolarPattern.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_PolarPattern.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_PolarPattern.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_PolarPattern.svg 2017-02-21 21:18:08.000000000 +0000 @@ -14,8 +14,8 @@ height="64px" id="svg5821" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="PartDesign_ArrayPolar_alt.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="PartDesign_PolarPattern.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.1" inkscape:export-filename="/media/data/Yorik/FreeCAD/icons/Sketcher.png" @@ -1361,6 +1361,103 @@ id="linearGradient4125-30" xlink:href="#linearGradient3864-0-9-8" inkscape:collect="always" /> + + + + + + + + + + + + + + + + + + + + + + inkscape:object-nodes="true"> + + @@ -1391,6 +1496,31 @@ + + + [jrheinlaender] + + + PartDesign_PolarPattern + 2012-09-07 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_PolarPattern.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + @@ -1398,183 +1528,175 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> - - - - - - - - - - - - - - - - + transform="matrix(2.3585018,-0.02414387,0.02414387,2.3585018,-78.816137,-24.547478)" + style="stroke-width:0.8957116;stroke-miterlimit:4;stroke-dasharray:none" + id="g4065"> + id="path3221-3" + d="m 58.199034,14.640583 -6.269982,-1.791423 -19.705657,12.539962 0,6.269982 15.674955,5.37427 10.300684,0 z" + style="color:#000000;fill:url(#linearGradient4219);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="path3221-1" + d="m 57.303322,15.17801 -5.37427,-1.298782 -18.809945,11.95775 0,5.284699 15.047956,5.015985 9.136259,0 z" + style="color:#000000;fill:none;stroke:#729fcf;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="path4270-6" + d="m 32.223395,37.033374 15.674955,0 -15.674955,-5.37427 z" + style="color:#000000;fill:url(#linearGradient4061-5);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="path4270-3" + d="m 33.119107,36.137662 9.31539,1e-6 -9.31539,-3.224562 z" + style="color:#000000;fill:none;stroke:#729fcf;stroke-width:0.8957116;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:7.9000001;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Revolution.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Revolution.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Revolution.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Revolution.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,381 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [wmayer] + + + PartDesign_Revolution + 2011-10-10 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Revolution.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Scaled.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Scaled.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Scaled.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Scaled.svg 2017-02-21 21:18:08.000000000 +0000 @@ -14,8 +14,8 @@ height="64px" id="svg5821" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="PartDesign_ArrayScaled.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="PartDesign_Scaled.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.1" inkscape:export-filename="/media/data/Yorik/FreeCAD/icons/Sketcher.png" @@ -24,6 +24,30 @@ + + + + + + + + - - - + + + + + + + + + + + + + + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-nodes="true" + inkscape:snap-bbox="true"> + + @@ -1302,6 +1379,31 @@ + + + [jrheinlaender] + + + PartDesign_Scaled + 2012-09-07 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Scaled.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + @@ -1309,72 +1411,94 @@ id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer"> - - - + + + + + + + + + + + + - - - - - - - - + sodipodi:nodetypes="ccccc" /> + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_ShapeBinder.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_ShapeBinder.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_ShapeBinder.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_ShapeBinder.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,202 +1,111 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_ShapeBinder + 2015-07-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_ShapeBinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Box.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Box.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Box.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Box.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,271 +1,436 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Box + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Box.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cone.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cone.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cone.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cone.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,179 +1,270 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Cone + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cone.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cylinder.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cylinder.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cylinder.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cylinder.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,214 +1,316 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Cylinder + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Ellipsoid.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Ellipsoid.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Ellipsoid.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Ellipsoid.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,232 +1,283 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Ellipsoid + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Ellipsoid.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Loft.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Loft.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Loft.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Loft.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,314 +1,184 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Loft + 2015-06-03 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Loft.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Pipe.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Pipe.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Pipe.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Pipe.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,276 +1,103 @@ - - - - - - + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Pipe + 2015-05-30 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Pipe.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Prism.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Prism.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Prism.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Prism.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,332 +1,316 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Prism + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Prism.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Sphere.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Sphere.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Sphere.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Sphere.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,161 +1,206 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Sphere + 2015-05-18 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Sphere.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + + + + + + + + + + + + + + + - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Torus.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Torus.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Torus.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Torus.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,272 +1,332 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Torus + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Torus.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Wedge.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Wedge.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Wedge.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Wedge.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,236 +1,346 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Subtractive_Wedge + 2015-05-20 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Subtractive_Wedge.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Thickness.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Thickness.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Thickness.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Thickness.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,243 +1,121 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [Stefan Tröger] + + + PartDesign_Thickness + 2015-05-21 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesign_Thickness.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - - - - - + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesignWorkbench.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesignWorkbench.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesignWorkbench.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/PartDesignWorkbench.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,12 +1,11 @@ - + - @@ -36,30 +35,80 @@ - - - + + + + + + + + + + + + + + + + - + + + image/svg+xml + + + [triplus] + + + PartDesignWorkbench + 2016-02-26 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/PartDesignWorkbench.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + + + + + + + + + + + + + - - - - - - \ No newline at end of file + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Pad.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Pad.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Pad.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Pad.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,546 +1,143 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jmaustpc] + + + Tree_PartDesign_Pad + 2013-03-17 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Pad.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - - - + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Revolution.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Revolution.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Revolution.svg 2017-02-20 14:10:06.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Revolution.svg 2017-02-21 21:18:08.000000000 +0000 @@ -1,381 +1,125 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + image/svg+xml - - + + + + + [jmaustpc] + + + Tree_PartDesign_Revolution + 2013-03-17 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/PartDesign/Gui/Resources/icons/Tree_PartDesign_Revolution.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + - - - - + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -659,7 +659,7 @@ geo->getTypeId() == Part::GeomBSplineCurve::getClassTypeId())) { if(deleteinternalgeo) { - this->DeleteUnusedInternalGeometry(GeoId, true); + this->deleteUnusedInternalGeometry(GeoId, true); return 0; } } @@ -2950,7 +2950,7 @@ } -int SketchObject::ExposeInternalGeometry(int GeoId) +int SketchObject::exposeInternalGeometry(int GeoId) { if (GeoId < 0 || GeoId > getHighestCurveIndex()) return -1; @@ -3438,14 +3438,14 @@ if(it != controlpointgeoids.begin()) { // if pole-weight newly created make it equal to first weight by default - Sketcher::Constraint *newConstr2 = new Sketcher::Constraint(); + /*Sketcher::Constraint *newConstr2 = new Sketcher::Constraint(); newConstr2->Type = Sketcher::Equal; newConstr2->First = currentgeoid+incrgeo+1; newConstr2->FirstPos = Sketcher::none; newConstr2->Second = controlpointgeoids[0]; newConstr2->SecondPos = Sketcher::none; - icon.push_back(newConstr2); + icon.push_back(newConstr2);*/ } else { controlpointgeoids[0] = currentgeoid+incrgeo+1; @@ -3456,7 +3456,7 @@ } // constraint the first weight to allow for seamless weight modification and proper visualization - if(!isfirstweightconstrained) { + /*if(!isfirstweightconstrained) { Sketcher::Constraint *newConstr = new Sketcher::Constraint(); newConstr->Type = Sketcher::Radius; @@ -3466,7 +3466,7 @@ icon.push_back(newConstr); - } + }*/ this->addGeometry(igeo,true); this->addConstraints(icon); @@ -3488,7 +3488,7 @@ return -1; // not supported type } -int SketchObject::DeleteUnusedInternalGeometry(int GeoId, bool delgeoid) +int SketchObject::deleteUnusedInternalGeometry(int GeoId, bool delgeoid) { if (GeoId < 0 || GeoId > getHighestCurveIndex()) return -1; @@ -3766,6 +3766,116 @@ } } +bool SketchObject::convertToNURBS(int GeoId) +{ + if (GeoId > getHighestCurveIndex() || + (GeoId < 0 && -GeoId > static_cast(ExternalGeo.size())) || + GeoId == -1 || GeoId == -2) + return false; + + const Part::Geometry *geo = getGeometry(GeoId); + + if(geo->getTypeId() == Part::GeomPoint::getClassTypeId()) + return false; + + const Part::GeomCurve *geo1 = static_cast(geo); + + Part::GeomBSplineCurve* bspline; + + try { + bspline = geo1->toNurbs(geo1->getFirstParameter(), geo1->getLastParameter()); + + if(geo1->isDerivedFrom(Part::GeomArcOfConic::getClassTypeId())){ + const Part::GeomArcOfConic * geoaoc = static_cast(geo1); + + if(geoaoc->isReversed()) + bspline->reverse(); + } + } + catch (const Base::Exception& e) { + Base::Console().Error("%s\n", e.what()); + // revert to original values + return false; + } + + const std::vector< Part::Geometry * > &vals = getInternalGeometry(); + + std::vector< Part::Geometry * > newVals(vals); + + if (GeoId < 0) { // external geometry + newVals.push_back(bspline); + } + else { // normal geometry + + newVals[GeoId] = bspline; + + const std::vector< Sketcher::Constraint * > &cvals = Constraints.getValues(); + + std::vector< Constraint * > newcVals(cvals); + + int index = cvals.size()-1; + // delete constraints on this elements other than coincident constraints (bspline does not support them currently) + for (; index >= 0; index--) { + if (cvals[index]->Type != Sketcher::Coincident && ( cvals[index]->First == GeoId || cvals[index]->Second == GeoId || cvals[index]->Third == GeoId)) { + + newcVals.erase(newcVals.begin()+index); + + } + } + this->Constraints.setValues(newcVals); + } + + Geometry.setValues(newVals); + Constraints.acceptGeometry(getCompleteGeometry()); + rebuildVertexIndex(); + + delete bspline; + + return true; + +} + +bool SketchObject::increaseBSplineDegree(int GeoId, int degreeincrement /*= 1*/) +{ + if (GeoId < 0 || GeoId > getHighestCurveIndex()) + return -1; + + const Part::Geometry *geo = getGeometry(GeoId); + + if(geo->getTypeId() != Part::GeomBSplineCurve::getClassTypeId()) + return -1; + + const Part::GeomBSplineCurve *bsp = static_cast(geo); + + const Handle_Geom_BSplineCurve curve = Handle_Geom_BSplineCurve::DownCast(bsp->handle()); + + Part::GeomBSplineCurve *bspline = new Part::GeomBSplineCurve(curve); + + + try { + int cdegree = bspline->getDegree(); + + bspline->increaseDegree(cdegree+degreeincrement); + } + catch (const Base::Exception& e) { + Base::Console().Error("%s\n", e.what()); + return false; + } + + const std::vector< Part::Geometry * > &vals = getInternalGeometry(); + + std::vector< Part::Geometry * > newVals(vals); + + newVals[GeoId] = bspline; + + Geometry.setValues(newVals); + Constraints.acceptGeometry(getCompleteGeometry()); + rebuildVertexIndex(); + + return true; + +} + int SketchObject::addExternal(App::DocumentObject *Obj, const char* SubName) { // so far only externals to the support of the sketch and datum features @@ -4314,7 +4424,9 @@ circle->Construction = true; ExternalGeo.push_back(circle); } else { - throw Base::Exception("BSpline: Not yet supported geometry for external geometry"); + Part::GeomBSplineCurve* bspline = new Part::GeomBSplineCurve(projCurve.BSpline()); + bspline->Construction = true; + ExternalGeo.push_back(bspline); } } else if (projCurve.GetType() == GeomAbs_Hyperbola) { gp_Hypr e = projCurve.Hyperbola(); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.h freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.h --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.h 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObject.h 2017-02-21 21:18:08.000000000 +0000 @@ -188,14 +188,29 @@ /*! * \return -1 on error */ - int ExposeInternalGeometry(int GeoId); + int exposeInternalGeometry(int GeoId); /*! \brief Deletes all unused (not further constrained) internal geometry \param GeoId - the geometry having the internal geometry to delete \param delgeoid - if true in addition to the unused internal geometry also deletes the GeoId geometry \retval int - returns -1 on error, otherwise the number of deleted elements */ - int DeleteUnusedInternalGeometry(int GeoId, bool delgeoid=false); + int deleteUnusedInternalGeometry(int GeoId, bool delgeoid=false); + /*! + \brief Approximates the given geometry with a B-Spline + \param GeoId - the geometry to approximate + \param delgeoid - if true in addition to the unused internal geometry also deletes the GeoId geometry + \retval bool - returns true if the approximation succeeded, or false if it did not succeed. + */ + bool convertToNURBS(int GeoId); + + /*! + \brief Increases the degree of a BSpline by degreeincrement, which defaults to 1 + \param GeoId - the geometry of type bspline to increase the degree + \param degreeincrement - the increment in number of degrees to effect + \retval bool - returns true if the increase in degree succeeded, or false if it did not succeed. + */ + bool increaseBSplineDegree(int GeoId, int degreeincrement = 1); /// retrieves for a Vertex number the corresponding GeoId and PosId void getGeoVertexIndex(int VertexId, int &GeoId, PointPos &PosId) const; diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -964,6 +964,7 @@ return Py::new_reference_to(Py::Int(naff)); } +//Deprecated PyObject* SketchObjectPy::ExposeInternalGeometry(PyObject *args) { int GeoId; @@ -971,7 +972,7 @@ if (!PyArg_ParseTuple(args, "i", &GeoId)) return 0; - if (this->getSketchObjectPtr()->ExposeInternalGeometry(GeoId)==-1) { + if (this->getSketchObjectPtr()->exposeInternalGeometry(GeoId)==-1) { std::stringstream str; str << "Object does not support internal geometry: " << GeoId; PyErr_SetString(PyExc_ValueError, str.str().c_str()); @@ -981,6 +982,7 @@ Py_Return; } +//Deprecated PyObject* SketchObjectPy::DeleteUnusedInternalGeometry(PyObject *args) { int GeoId; @@ -988,12 +990,81 @@ if (!PyArg_ParseTuple(args, "i", &GeoId)) return 0; - if (this->getSketchObjectPtr()->DeleteUnusedInternalGeometry(GeoId)==-1) { + if (this->getSketchObjectPtr()->deleteUnusedInternalGeometry(GeoId)==-1) { std::stringstream str; str << "Object does not support internal geometry: " << GeoId; PyErr_SetString(PyExc_ValueError, str.str().c_str()); return 0; } + + Py_Return; +} + +PyObject* SketchObjectPy::exposeInternalGeometry(PyObject *args) +{ + int GeoId; + + if (!PyArg_ParseTuple(args, "i", &GeoId)) + return 0; + + if (this->getSketchObjectPtr()->exposeInternalGeometry(GeoId)==-1) { + std::stringstream str; + str << "Object does not support internal geometry: " << GeoId; + PyErr_SetString(PyExc_ValueError, str.str().c_str()); + return 0; + } + + Py_Return; +} + +PyObject* SketchObjectPy::deleteUnusedInternalGeometry(PyObject *args) +{ + int GeoId; + + if (!PyArg_ParseTuple(args, "i", &GeoId)) + return 0; + + if (this->getSketchObjectPtr()->deleteUnusedInternalGeometry(GeoId)==-1) { + std::stringstream str; + str << "Object does not support internal geometry: " << GeoId; + PyErr_SetString(PyExc_ValueError, str.str().c_str()); + return 0; + } + + Py_Return; +} + +PyObject* SketchObjectPy::convertToNURBS(PyObject *args) +{ + int GeoId; + + if (!PyArg_ParseTuple(args, "i", &GeoId)) + return 0; + + if (this->getSketchObjectPtr()->convertToNURBS(GeoId)==false) { + std::stringstream str; + str << "Object does not support NURBS conversion: " << GeoId; + PyErr_SetString(PyExc_ValueError, str.str().c_str()); + return 0; + } + + Py_Return; +} + +PyObject* SketchObjectPy::increaseBSplineDegree(PyObject *args) +{ + int GeoId; + int incr = 1; + + if (!PyArg_ParseTuple(args, "i|i", &GeoId, &incr)) + return 0; + + if (this->getSketchObjectPtr()->increaseBSplineDegree(GeoId, incr)==false) { + std::stringstream str; + str << "Degree increase failed for: " << GeoId; + PyErr_SetString(PyExc_ValueError, str.str().c_str()); + return 0; + } Py_Return; } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPy.xml freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPy.xml --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPy.xml 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/App/SketchObjectPy.xml 2017-02-21 21:18:08.000000000 +0000 @@ -149,14 +149,34 @@ - Exposes all internal geometry of an object supporting internal geometry + Deprecated -- use exposeInternalGeometry - Deletes all unused (not further constrained) internal geometry + Deprecated -- use deleteUnusedInternalGeometry - + + + + Exposes all internal geometry of an object supporting internal geometry + + + + + Deletes all unused (not further constrained) internal geometry + + + + + Approximates the given geometry with a B-Spline + + + + + Increases the given BSpline Degree by a number of degrees + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/AppSketcherGui.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/AppSketcherGui.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/AppSketcherGui.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/AppSketcherGui.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -49,6 +49,7 @@ void CreateSketcherCommandsConstraints(void); void CreateSketcherCommandsConstraintAccel(void); void CreateSketcherCommandsAlterGeo(void); +void CreateSketcherCommandsBSpline(void); void loadSketcherResource() { @@ -98,6 +99,7 @@ CreateSketcherCommandsConstraints(); CreateSketcherCommandsAlterGeo(); CreateSketcherCommandsConstraintAccel(); + CreateSketcherCommandsBSpline(); SketcherGui::Workbench::init(); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CMakeLists.txt freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CMakeLists.txt --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CMakeLists.txt 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CMakeLists.txt 2017-02-21 21:18:08.000000000 +0000 @@ -79,6 +79,7 @@ CommandConstraints.h CommandConstraints.cpp CommandSketcherTools.cpp + CommandSketcherBSpline.cpp CommandAlterGeometry.cpp Resources/Sketcher.qrc PreCompiled.cpp diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandConstraints.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandConstraints.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandConstraints.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandConstraints.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -218,7 +218,7 @@ sf = vp->getScaleFactor(); constr->LabelDistance = 2. * sf; - vp->draw(); // Redraw + vp->draw(false,false); // Redraw } ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); @@ -4565,7 +4565,7 @@ Sketcher::Constraint *constr = ConStr[indexConstr + i]; constr->LabelDistance = 2. * sf; } - vp->draw(); // Redraw + vp->draw(false,false); // Redraw } commitNeeded=true; @@ -4643,7 +4643,7 @@ Sketcher::Constraint *constr = ConStr[indexConstr + i]; constr->LabelDistance = 2. * sf; } - vp->draw(); // Redraw + vp->draw(false,false); // Redraw } ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -2897,7 +2897,7 @@ currentgeoid++; Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.ExposeInternalGeometry(%d)", + "App.ActiveDocument.%s.exposeInternalGeometry(%d)", sketchgui->getObject()->getNameInDocument(), currentgeoid); } @@ -3325,7 +3325,7 @@ currentgeoid++; Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.ExposeInternalGeometry(%d)", + "App.ActiveDocument.%s.exposeInternalGeometry(%d)", sketchgui->getObject()->getNameInDocument(), currentgeoid); } @@ -3718,7 +3718,7 @@ currentgeoid++; Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.ExposeInternalGeometry(%d)", + "App.ActiveDocument.%s.exposeInternalGeometry(%d)", sketchgui->getObject()->getNameInDocument(), currentgeoid); @@ -4071,7 +4071,7 @@ currentgeoid++; Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.ExposeInternalGeometry(%d)", + "App.ActiveDocument.%s.exposeInternalGeometry(%d)", sketchgui->getObject()->getNameInDocument(), currentgeoid); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,461 @@ +/*************************************************************************** + * Copyright (c) 2017 Abdullah Tahiri * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#include "PreCompiled.h" +#ifndef _PreComp_ +# include +# include +# include +# include +#endif + +# include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "ViewProviderSketch.h" +#include "DrawSketchHandler.h" + +#include +#include + +#include "ViewProviderSketch.h" + +using namespace std; +using namespace SketcherGui; +using namespace Sketcher; + +bool isSketcherBSplineActive(Gui::Document *doc, bool actsOnSelection ) +{ + if (doc) { + // checks if a Sketch Viewprovider is in Edit and is in no special mode + if (doc->getInEdit() && doc->getInEdit()->isDerivedFrom(SketcherGui::ViewProviderSketch::getClassTypeId())) { + if (static_cast(doc->getInEdit()) + ->getSketchMode() == ViewProviderSketch::STATUS_NONE) { + if (!actsOnSelection) + return true; + else if (Gui::Selection().countObjectsOfType(Sketcher::SketchObject::getClassTypeId()) > 0) + return true; + } + } + } + + return false; +} + +void ActivateBSplineHandler(Gui::Document *doc,DrawSketchHandler *handler) +{ + if (doc) { + if (doc->getInEdit() && doc->getInEdit()->isDerivedFrom + (SketcherGui::ViewProviderSketch::getClassTypeId())) { + + SketcherGui::ViewProviderSketch* vp = static_cast (doc->getInEdit()); + vp->purgeHandler(); + vp->activateHandler(handler); + } + } +} + +void ShowRestoreInformationLayer(SketcherGui::ViewProviderSketch* vp, char * visibleelementname) +{ + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + + bool status = hGrp->GetBool(visibleelementname, true); + + hGrp->SetBool(visibleelementname, !status); + + vp->showRestoreInformationLayer(); +} + +// Show/Hide BSpline degree +DEF_STD_CMD_A(CmdSketcherBSplineDegree); + +CmdSketcherBSplineDegree::CmdSketcherBSplineDegree() +:Command("Sketcher_BSplineDegree") +{ + sAppModule = "Sketcher"; + sGroup = QT_TR_NOOP("Sketcher"); + sMenuText = QT_TR_NOOP("Show/Hide B-spline degree"); + sToolTipText = QT_TR_NOOP("Switches between showing and hiding the degree for all B-splines"); + sWhatsThis = "Sketcher_BSplineDegree"; + sStatusTip = sToolTipText; + sPixmap = "Sketcher_BSplineDegree"; + sAccel = ""; + eType = ForEdit; +} + +void CmdSketcherBSplineDegree::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + Gui::Document * doc= getActiveGuiDocument(); + + SketcherGui::ViewProviderSketch* vp = static_cast(doc->getInEdit()); + + ShowRestoreInformationLayer(vp, "BSplineDegreeVisible"); + +} + +bool CmdSketcherBSplineDegree::isActive(void) +{ + return isSketcherBSplineActive( getActiveGuiDocument(), false ); +} + +// Show/Hide BSpline polygon +DEF_STD_CMD_A(CmdSketcherBSplinePolygon); + +CmdSketcherBSplinePolygon::CmdSketcherBSplinePolygon() + :Command("Sketcher_BSplinePolygon") +{ + sAppModule = "Sketcher"; + sGroup = QT_TR_NOOP("Sketcher"); + sMenuText = QT_TR_NOOP("Show/Hide B-spline control polygon"); + sToolTipText = QT_TR_NOOP("Switches between showing and hiding the control polygons for all B-splines"); + sWhatsThis = "Sketcher_BSplinePolygon"; + sStatusTip = sToolTipText; + sPixmap = "Sketcher_BSplinePolygon"; + sAccel = ""; + eType = ForEdit; +} + +void CmdSketcherBSplinePolygon::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + Gui::Document * doc= getActiveGuiDocument(); + + SketcherGui::ViewProviderSketch* vp = static_cast(doc->getInEdit()); + + ShowRestoreInformationLayer(vp, "BSplineControlPolygonVisible"); + +} + +bool CmdSketcherBSplinePolygon::isActive(void) +{ + return isSketcherBSplineActive( getActiveGuiDocument(), false ); +} + +// Show/Hide BSpline comb +DEF_STD_CMD_A(CmdSketcherBSplineComb); + +CmdSketcherBSplineComb::CmdSketcherBSplineComb() +:Command("Sketcher_BSplineComb") +{ + sAppModule = "Sketcher"; + sGroup = QT_TR_NOOP("Sketcher"); + sMenuText = QT_TR_NOOP("Show/Hide B-spline curvature comb"); + sToolTipText = QT_TR_NOOP("Switches between showing and hiding the curvature comb for all B-splines"); + sWhatsThis = "Sketcher_BSplineComb"; + sStatusTip = sToolTipText; + sPixmap = "Sketcher_BSplineComb"; + sAccel = ""; + eType = ForEdit; +} + +void CmdSketcherBSplineComb::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + Gui::Document * doc= getActiveGuiDocument(); + + SketcherGui::ViewProviderSketch* vp = static_cast(doc->getInEdit()); + + ShowRestoreInformationLayer(vp, "BSplineCombVisible"); + +} + +bool CmdSketcherBSplineComb::isActive(void) +{ + return isSketcherBSplineActive( getActiveGuiDocument(), false ); +} + +// Composite drop down menu for show/hide geometry information layer +DEF_STD_CMD_ACLU(CmdSketcherCompBSplineShowHideGeometryInformation); + +CmdSketcherCompBSplineShowHideGeometryInformation::CmdSketcherCompBSplineShowHideGeometryInformation() +: Command("Sketcher_CompBSplineShowHideGeometryInformation") +{ + sAppModule = "Sketcher"; + sGroup = QT_TR_NOOP("Sketcher"); + sMenuText = QT_TR_NOOP("Show/hide B-spline information layer"); + sToolTipText = QT_TR_NOOP("Show/hide B-spline information layer"); + sWhatsThis = "Sketcher_CompBSplineShowHideGeometryInformation"; + sStatusTip = sToolTipText; + eType = ForEdit; +} + +void CmdSketcherCompBSplineShowHideGeometryInformation::activated(int iMsg) +{ + Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + + Gui::Command * cmd; + + if (iMsg==0) + cmd = rcCmdMgr.getCommandByName("Sketcher_BSplineDegree"); + else if (iMsg==1) + cmd = rcCmdMgr.getCommandByName("Sketcher_BSplinePolygon"); + else if (iMsg==2) + cmd = rcCmdMgr.getCommandByName("Sketcher_BSplineComb"); + else + return; + + cmd->invoke(0); + + // Since the default icon is reset when enabing/disabling the command we have + // to explicitly set the icon of the used command. + Gui::ActionGroup* pcAction = qobject_cast(_pcAction); + QList a = pcAction->actions(); + + assert(iMsg < a.size()); + pcAction->setIcon(a[iMsg]->icon()); +} + +Gui::Action * CmdSketcherCompBSplineShowHideGeometryInformation::createAction(void) +{ + Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow()); + pcAction->setDropDownMenu(true); + applyCommandData(this->className(), pcAction); + + QAction* c1 = pcAction->addAction(QString()); + c1->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineDegree")); + QAction* c2 = pcAction->addAction(QString()); + c2->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplinePolygon")); + QAction* c3 = pcAction->addAction(QString()); + c3->setIcon(Gui::BitmapFactory().pixmap("Sketcher_BSplineComb")); + + _pcAction = pcAction; + languageChange(); + + pcAction->setIcon(c2->icon()); + int defaultId = 1; + pcAction->setProperty("defaultAction", QVariant(defaultId)); + + return pcAction; +} + +void CmdSketcherCompBSplineShowHideGeometryInformation::languageChange() +{ + Command::languageChange(); + + if (!_pcAction) + return; + Gui::ActionGroup* pcAction = qobject_cast(_pcAction); + QList a = pcAction->actions(); + + QAction* c1 = a[0]; + c1->setText(QApplication::translate("CmdSketcherCompBSplineShowHideGeometryInformation","Show/Hide B-spline degree")); + c1->setToolTip(QApplication::translate("Sketcher_BSplineDegree","Switches between showing and hiding the degree for all B-splines")); + c1->setStatusTip(QApplication::translate("Sketcher_BSplineDegree","Switches between showing and hiding the degree for all B-splines")); + QAction* c2 = a[1]; + c2->setText(QApplication::translate("CmdSketcherCompBSplineShowHideGeometryInformation","Show/Hide B-spline control polygon")); + c2->setToolTip(QApplication::translate("Sketcher_BSplinePolygon","Switches between showing and hiding the control polygons for all B-splines")); + c2->setStatusTip(QApplication::translate("Sketcher_BSplinePolygon","Switches between showing and hiding the control polygons for all B-splines")); + QAction* c3 = a[2]; + c3->setText(QApplication::translate("CmdSketcherCompBSplineShowHideGeometryInformation","Show/Hide B-spline curvature comb")); + c3->setToolTip(QApplication::translate("Sketcher_BSplineComb","Switches between showing and hiding the curvature comb for all B-splines")); + c3->setStatusTip(QApplication::translate("Sketcher_BSplineComb","Switches between showing and hiding the curvature comb for all B-splines")); + +} + +void CmdSketcherCompBSplineShowHideGeometryInformation::updateAction(int /*mode*/) +{ +} + +bool CmdSketcherCompBSplineShowHideGeometryInformation::isActive(void) +{ + return isSketcherBSplineActive( getActiveGuiDocument(), false ); +} + +// Convert to NURB +DEF_STD_CMD_A(CmdSketcherConvertToNURB); + +CmdSketcherConvertToNURB::CmdSketcherConvertToNURB() +:Command("Sketcher_BSplineConvertToNURB") +{ + sAppModule = "Sketcher"; + sGroup = QT_TR_NOOP("Sketcher"); + sMenuText = QT_TR_NOOP("Convert Geometry to B-spline"); + sToolTipText = QT_TR_NOOP("Converts the given Geometry to a B-spline"); + sWhatsThis = "Sketcher_ConvertToNURB"; + sStatusTip = sToolTipText; + sPixmap = "Sketcher_BSplineApproximate"; + sAccel = ""; + eType = ForEdit; +} + +void CmdSketcherConvertToNURB::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + // get the selection + std::vector selection = getSelection().getSelectionEx(); + + // only one sketch with its subelements are allowed to be selected + if (selection.size() != 1) { + return; + } + + // get the needed lists and objects + const std::vector &SubNames = selection[0].getSubNames(); + Sketcher::SketchObject* Obj = static_cast(selection[0].getObject()); + + bool nurbsized = false; + + openCommand("Convert to NURBS"); + + for (unsigned int i=0; i 4 && SubNames[i].substr(0,4) == "Edge") { + + int GeoId = std::atoi(SubNames[i].substr(4,4000).c_str()) - 1; + + Gui::Command::doCommand( + Doc,"App.ActiveDocument.%s.convertToNURBS(%d) ", + selection[0].getFeatName(),GeoId); + + nurbsized = true; + } + else if (SubNames[i].size() > 12 && SubNames[i].substr(0,12) == "ExternalEdge") { + + int GeoId = - (std::atoi(SubNames[i].substr(12,4000).c_str()) + 2); + + Gui::Command::doCommand( + Doc,"App.ActiveDocument.%s.convertToNURBS(%d) ", + selection[0].getFeatName(),GeoId); + + nurbsized = true; + } + + + } + + if(!nurbsized) { + abortCommand(); + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), + QObject::tr("None of the selected elements is an edge.")); + } + else { + commitCommand(); + } + + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); + bool autoRecompute = hGrp->GetBool("AutoRecompute",false); + + if (autoRecompute) + Gui::Command::updateActive(); + else + Obj->solve(); + +} + +bool CmdSketcherConvertToNURB::isActive(void) +{ + return isSketcherBSplineActive( getActiveGuiDocument(), true ); +} + +// Convert to NURB +DEF_STD_CMD_A(CmdSketcherIncreaseDegree); + +CmdSketcherIncreaseDegree::CmdSketcherIncreaseDegree() +:Command("Sketcher_BSplineIncreaseDegree") +{ + sAppModule = "Sketcher"; + sGroup = QT_TR_NOOP("Sketcher"); + sMenuText = QT_TR_NOOP("Increase degree"); + sToolTipText = QT_TR_NOOP("Increases the degree of the B-spline"); + sWhatsThis = "Sketcher_BSplineIncreaseDegree"; + sStatusTip = sToolTipText; + sPixmap = "Sketcher_BSplineIncreaseDegree"; + sAccel = ""; + eType = ForEdit; +} + +void CmdSketcherIncreaseDegree::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + // get the selection + std::vector selection = getSelection().getSelectionEx(); + + // only one sketch with its subelements are allowed to be selected + if (selection.size() != 1) { + return; + } + + // get the needed lists and objects + const std::vector &SubNames = selection[0].getSubNames(); + Sketcher::SketchObject* Obj = static_cast(selection[0].getObject()); + + openCommand("Increase degree"); + + for (unsigned int i=0; i 4 && SubNames[i].substr(0,4) == "Edge") { + + int GeoId = std::atoi(SubNames[i].substr(4,4000).c_str()) - 1; + + Gui::Command::doCommand( + Doc,"App.ActiveDocument.%s.increaseBSplineDegree(%d) ", + selection[0].getFeatName(),GeoId); + } + } + + commitCommand(); + + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); + bool autoRecompute = hGrp->GetBool("AutoRecompute",false); + + if (autoRecompute) + Gui::Command::updateActive(); + else + Obj->solve(); + +} + +bool CmdSketcherIncreaseDegree::isActive(void) +{ + return isSketcherBSplineActive( getActiveGuiDocument(), true ); +} + + +void CreateSketcherCommandsBSpline(void) +{ + Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + + rcCmdMgr.addCommand(new CmdSketcherBSplineDegree()); + rcCmdMgr.addCommand(new CmdSketcherBSplinePolygon()); + rcCmdMgr.addCommand(new CmdSketcherBSplineComb()); + rcCmdMgr.addCommand(new CmdSketcherCompBSplineShowHideGeometryInformation()); + rcCmdMgr.addCommand(new CmdSketcherConvertToNURB()); + rcCmdMgr.addCommand(new CmdSketcherIncreaseDegree()); +} diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -773,7 +773,7 @@ try { Gui::Command::openCommand("Exposing Internal Geometry"); Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.ExposeInternalGeometry(%d)", + "App.ActiveDocument.%s.exposeInternalGeometry(%d)", Obj->getNameInDocument(), GeoId); @@ -781,7 +781,7 @@ if(aftergeoid == currentgeoid) { // if we did not expose anything, deleteunused Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.DeleteUnusedInternalGeometry(%d)", + "App.ActiveDocument.%s.deleteUnusedInternalGeometry(%d)", Obj->getNameInDocument(), GeoId); } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineApproximate.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineApproximate.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineApproximate.svg 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineApproximate.svg 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [agryson] Alexander Gryson + + + Sketcher_Create3PointCircle + 2017-02-16 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_Create3PointCircle.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson, [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineComb.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineComb.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineComb.svg 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineComb.svg 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [agryson] Alexander Gryson + + + Sketcher_CreateBSpline + 2017-02-15 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_CreateBSpline.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson, [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDecreaseDegree.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDecreaseDegree.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDecreaseDegree.svg 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDecreaseDegree.svg 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [agryson] Alexander Gryson + + + Sketcher_Create_Periodic_BSpline + 2017-02-15 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_Toggle_BSpline_Information.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson, [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDegree.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDegree.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDegree.svg 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineDegree.svg 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [agryson] Alexander Gryson + + + Sketcher_Create_Periodic_BSpline + 2017-02-15 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_Toggle_BSpline_Information.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson, [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineIncreaseDegree.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineIncreaseDegree.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineIncreaseDegree.svg 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplineIncreaseDegree.svg 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [agryson] Alexander Gryson + + + Sketcher_Create_Periodic_BSpline + 2017-02-16 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_Toggle_BSpline_Information.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson, [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplinePolygon.svg freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplinePolygon.svg --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplinePolygon.svg 1970-01-01 00:00:00.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_BSplinePolygon.svg 2017-02-21 21:18:08.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [Abdullah Tahiri] + + + Sketcher_Create_Periodic_BSpline + 2017-01-13 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_Toggle_BSpline_Information.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson, [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc 2017-02-21 21:18:08.000000000 +0000 @@ -41,6 +41,12 @@ icons/SketcherWorkbench.svg icons/Sketcher_AlterConstruction.svg icons/Sketcher_AlterFillet.svg + icons/Sketcher_BSplineApproximate.svg + icons/Sketcher_BSplineComb.svg + icons/Sketcher_BSplineDecreaseDegree.svg + icons/Sketcher_BSplineDegree.svg + icons/Sketcher_BSplineIncreaseDegree.svg + icons/Sketcher_BSplinePolygon.svg icons/Sketcher_Clone.svg icons/Sketcher_CloseShape.svg icons/Sketcher_Conics.svg diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -122,6 +122,7 @@ // Sketch editing ui->EditSketcherFontSize->onSave(); + ui->SegmentsPerGeometry->onSave(); ui->dialogOnDistanceConstraint->onSave(); ui->continueMode->onSave(); ui->checkBoxAdvancedSolverTaskBox->onSave(); @@ -164,6 +165,7 @@ // Sketch editing ui->EditSketcherFontSize->onRestore(); + ui->SegmentsPerGeometry->onRestore(); ui->dialogOnDistanceConstraint->onRestore(); ui->continueMode->onRestore(); ui->checkBoxAdvancedSolverTaskBox->onRestore(); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.ui freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.ui --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.ui 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/SketcherSettings.ui 2017-02-21 21:18:08.000000000 +0000 @@ -527,6 +527,19 @@ Sketch editing + + + + + 182 + 0 + + + + Font size + + + @@ -562,19 +575,6 @@ - - - - - 182 - 0 - - - - Font size - - - @@ -582,7 +582,7 @@ - + Ask for value after creating a distance constraint @@ -598,9 +598,6 @@ - - - @@ -608,7 +605,10 @@ - + + + + Geometry Creation "Continue Mode" @@ -624,7 +624,7 @@ - + true @@ -771,6 +771,29 @@ + + + + Segments per geometry + + + + + + + 50 + + + 1000 + + + SegmentsPerGeometry + + + View + + + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -122,6 +122,11 @@ #define CONSTRAINT_SEPARATOR_INDEX_SECOND_ICON 5 #define CONSTRAINT_SEPARATOR_INDEX_SECOND_CONSTRAINTID 6 +// Macros to define information layer node child positions within type +#define GEOINFO_BSPLINE_DEGREE_POS 0 +#define GEOINFO_BSPLINE_DEGREE_TEXT 3 +#define GEOINFO_BSPLINE_POLYGON 1 + using namespace SketcherGui; using namespace Sketcher; @@ -135,6 +140,7 @@ SbColor ViewProviderSketch::ConstrDimColor (1.0f,0.149f,0.0f); // #FF2600 -> (255, 38, 0) SbColor ViewProviderSketch::ConstrIcoColor (1.0f,0.149f,0.0f); // #FF2600 -> (255, 38, 0) SbColor ViewProviderSketch::NonDrivingConstrDimColor (0.0f,0.149f,1.0f); // #0026FF -> ( 0, 38,255) +SbColor ViewProviderSketch::InformationColor (0.0f,1.0f,0.0f); // #00FF00 -> ( 0,255, 0) SbColor ViewProviderSketch::PreselectColor (0.88f,0.88f,0.0f); // #E1E100 -> (225,225, 0) SbColor ViewProviderSketch::SelectColor (0.11f,0.68f,0.11f); // #1CAD1C -> ( 28,173, 28) SbColor ViewProviderSketch::PreselectSelectedColor (0.36f,0.48f,0.11f); // #5D7B1C -> ( 93,123, 28) @@ -178,6 +184,7 @@ textX(0), textPos(0), constrGroup(0), + infoGroup(0), pickStyleAxes(0) {} @@ -240,6 +247,7 @@ SoTranslation *textPos; SoGroup *constrGroup; + SoGroup *infoGroup; SoPickStyle *pickStyleAxes; }; @@ -263,7 +271,8 @@ ViewProviderSketch::ViewProviderSketch() : edit(0), - Mode(STATUS_NONE) + Mode(STATUS_NONE), + visibleInformationChanged(true) { ADD_PROPERTY_TYPE(Autoconstraints,(true),"Auto Constraints",(App::PropertyType)(App::Prop_None),"Create auto constraints"); ADD_PROPERTY_TYPE(TempoVis,(Py::None()),"Visibility automation",(App::PropertyType)(App::Prop_None),"Object that handles hiding and showing other objects when entering/leaving sketch."); @@ -293,6 +302,7 @@ zHighlight=0.009f; zText=0.011f; zEdit=0.001f; + zInfo=0.004f; xInit=0; yInit=0; @@ -317,6 +327,7 @@ //rubberband selection rubberband = new Gui::Rubberband(); + } ViewProviderSketch::~ViewProviderSketch() @@ -832,7 +843,7 @@ const_cast(viewer)->setRenderType(Gui::View3DInventorViewer::Native); // a redraw is required in order to clear the rubberband - draw(true); + draw(true,false); Mode = STATUS_NONE; return true; case STATUS_SKETCH_UseHandler: @@ -1123,7 +1134,7 @@ if (GeoId != Sketcher::Constraint::GeoUndef && PosId != Sketcher::none) { if (getSketchObject()->getSolvedSketch().movePoint(GeoId, PosId, vec, relative) == 0) { setPositionText(Base::Vector2d(x,y)); - draw(true); + draw(true,false); signalSolved(QString::fromLatin1("Solved in %1 sec").arg(getSketchObject()->getSolvedSketch().SolveTime)); } else { signalSolved(QString::fromLatin1("Unsolved (%1 sec)").arg(getSketchObject()->getSolvedSketch().SolveTime)); @@ -1137,7 +1148,7 @@ Base::Vector3d vec(x-xInit,y-yInit,0); if (getSketchObject()->getSolvedSketch().movePoint(edit->DragCurve, Sketcher::none, vec, relative) == 0) { setPositionText(Base::Vector2d(x,y)); - draw(true); + draw(true,false); signalSolved(QString::fromLatin1("Solved in %1 sec").arg(getSketchObject()->getSolvedSketch().SolveTime)); } else { signalSolved(QString::fromLatin1("Unsolved (%1 sec)").arg(getSketchObject()->getSolvedSketch().SolveTime)); @@ -1355,7 +1366,7 @@ for (std::vector::const_iterator it=geomlist.begin(); it != geomlist.end(); ++it) if (*it) delete *it; - draw(true); + draw(true,false); } Base::Vector3d ViewProviderSketch::seekConstraintPosition(const Base::Vector3d &origPos, @@ -3163,7 +3174,7 @@ } } -void ViewProviderSketch::draw(bool temp) +void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer /*=true*/) { assert(edit); @@ -3188,7 +3199,25 @@ assert(int(geomlist->size()) >= 2); edit->CurvIdToGeoId.clear(); + + // information layer + if(rebuildinformationlayer) { + // everytime we start with empty information layer + edit->infoGroup->removeAllChildren(); + } + + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + int fontSize = hGrp->GetInt("EditSketcherFontSize", 17); + + int currentInfoNode = 0; + + ParameterGrp::handle hGrpsk = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + + // end information layer + int GeoId = 0; + + int stdcountsegments = hGrp->GetInt("SegmentsPerGeometry", 50); // RootPoint Points.push_back(Base::Vector3d(0.,0.,0.)); @@ -3214,7 +3243,7 @@ const Part::GeomCircle *circle = static_cast(*it); Handle_Geom_Circle curve = Handle_Geom_Circle::DownCast(circle->handle()); - int countSegments = 50; + int countSegments = stdcountsegments; Base::Vector3d center = circle->getCenter(); double segment = (2 * M_PI) / countSegments; for (int i=0; i < countSegments; i++) { @@ -3233,7 +3262,7 @@ const Part::GeomEllipse *ellipse = static_cast(*it); Handle_Geom_Ellipse curve = Handle_Geom_Ellipse::DownCast(ellipse->handle()); - int countSegments = 50; + int countSegments = stdcountsegments; Base::Vector3d center = ellipse->getCenter(); double segment = (2 * M_PI) / countSegments; for (int i=0; i < countSegments; i++) { @@ -3258,7 +3287,7 @@ std::swap(startangle, endangle); double range = endangle-startangle; - int countSegments = std::max(6, int(50.0 * range / (2 * M_PI))); + int countSegments = std::max(6, int(stdcountsegments * range / (2 * M_PI))); double segment = range / countSegments; Base::Vector3d center = arc->getCenter(); @@ -3291,7 +3320,7 @@ std::swap(startangle, endangle); double range = endangle-startangle; - int countSegments = std::max(6, int(50.0 * range / (2 * M_PI))); + int countSegments = std::max(6, int(stdcountsegments * range / (2 * M_PI))); double segment = range / countSegments; Base::Vector3d center = arc->getCenter(); @@ -3324,7 +3353,7 @@ std::swap(startangle, endangle); double range = endangle-startangle; - int countSegments = std::max(6, int(50.0 * range / (2 * M_PI))); + int countSegments = std::max(6, int(stdcountsegments * range / (2 * M_PI))); double segment = range / countSegments; Base::Vector3d center = aoh->getCenter(); @@ -3357,7 +3386,7 @@ std::swap(startangle, endangle); double range = endangle-startangle; - int countSegments = std::max(6, int(50.0 * range / (2 * M_PI))); + int countSegments = std::max(6, int(stdcountsegments * range / (2 * M_PI))); double segment = range / countSegments; Base::Vector3d center = aop->getCenter(); @@ -3393,7 +3422,7 @@ std::swap(first, last); double range = last-first; - int countSegments = 50; + int countSegments = stdcountsegments; double segment = range / countSegments; for (int i=0; i < countSegments; i++) { @@ -3406,20 +3435,303 @@ gp_Pnt end = curve->Value(last); Coords.push_back(Base::Vector3d(end.X(), end.Y(), end.Z())); - // abdullah: Poles thought as internal geometry - /*std::vector poles = spline->getPoles(); - for (std::vector::iterator it = poles.begin(); it != poles.end(); ++it) { - Points.push_back(*it); - }*/ - Index.push_back(countSegments+1); edit->CurvIdToGeoId.push_back(GeoId); Points.push_back(startp); Points.push_back(endp); + + //---------------------------------------------------------- + // geometry information layer + + // polynom degree -------------------------------------------------------- + std::vector poles = spline->getPoles(); + + Base::Vector3d midp = Base::Vector3d(0,0,0); + + for (std::vector::iterator it = poles.begin(); it != poles.end(); ++it) { + midp += (*it); + } + + midp /= poles.size(); + + if(rebuildinformationlayer) { + SoSwitch *sw = new SoSwitch(); + + sw->whichChild = hGrpsk->GetBool("BSplineDegreeVisible", true)?SO_SWITCH_ALL:SO_SWITCH_NONE; + + SoSeparator *sep = new SoSeparator(); + sep->ref(); + // no caching for fluctuand data structures + sep->renderCaching = SoSeparator::OFF; + + // every information visual node gets its own material for to-be-implemented preselection and selection + SoMaterial *mat = new SoMaterial; + mat->ref(); + mat->diffuseColor = InformationColor; + + SoTranslation *translate = new SoTranslation; + + translate->translation.setValue(midp.x,midp.y,zInfo); + + SoFont *font = new SoFont; + font->name.setValue("Helvetica"); + font->size.setValue(fontSize); + + SoText2 *degreetext = new SoText2; + degreetext->string = SbString(spline->getDegree()); + + sep->addChild(translate); + sep->addChild(mat); + sep->addChild(font); + sep->addChild(degreetext); + + sw->addChild(sep); + + edit->infoGroup->addChild(sw); + sep->unref(); + mat->unref(); + } + else { + SoSwitch *sw = static_cast(edit->infoGroup->getChild(currentInfoNode)); + + if(visibleInformationChanged) + sw->whichChild = hGrpsk->GetBool("BSplineDegreeVisible", true)?SO_SWITCH_ALL:SO_SWITCH_NONE; + + SoSeparator *sep = static_cast(sw->getChild(0)); + + static_cast(sep->getChild(GEOINFO_BSPLINE_DEGREE_POS))->translation.setValue(midp.x,midp.y,zInfo); + + static_cast(sep->getChild(GEOINFO_BSPLINE_DEGREE_TEXT))->string = SbString(spline->getDegree()); + } + + currentInfoNode++; // switch to next node + + // control polygon -------------------------------------------------------- + if(rebuildinformationlayer) { + SoSwitch *sw = new SoSwitch(); + + sw->whichChild = hGrpsk->GetBool("BSplineControlPolygonVisible", true)?SO_SWITCH_ALL:SO_SWITCH_NONE; + + SoSeparator *sep = new SoSeparator(); + sep->ref(); + // no caching for fluctuand data structures + sep->renderCaching = SoSeparator::OFF; + + // every information visual node gets its own material for to-be-implemented preselection and selection + SoMaterial *mat = new SoMaterial; + mat->ref(); + mat->diffuseColor = InformationColor; + + SoLineSet *lineset = new SoLineSet; + + SoCoordinate3 *coords = new SoCoordinate3; + + if(spline->isPeriodic()) { + coords->point.setNum(poles.size()+1); + } + else { + coords->point.setNum(poles.size()); + } + + SbVec3f *vts = coords->point.startEditing(); + + int i=0; + for (std::vector::iterator it = poles.begin(); it != poles.end(); ++it, i++) { + vts[i].setValue((*it).x,(*it).y,zInfo); + } + + if(spline->isPeriodic()) { + vts[poles.size()].setValue(poles[0].x,poles[0].y,zInfo); + } + + coords->point.finishEditing(); + + sep->addChild(mat); + sep->addChild(coords); + sep->addChild(lineset); + + sw->addChild(sep); + + edit->infoGroup->addChild(sw); + sep->unref(); + mat->unref(); + } + else { + SoSwitch *sw = static_cast(edit->infoGroup->getChild(currentInfoNode)); + + if(visibleInformationChanged) + sw->whichChild = hGrpsk->GetBool("BSplineControlPolygonVisible", true)?SO_SWITCH_ALL:SO_SWITCH_NONE; + + SoSeparator *sep = static_cast(sw->getChild(0)); + + SoCoordinate3 *coords = static_cast(sep->getChild(GEOINFO_BSPLINE_POLYGON)); + + if(spline->isPeriodic()) { + coords->point.setNum(poles.size()+1); + } + else { + coords->point.setNum(poles.size()); + } + + SbVec3f *vts = coords->point.startEditing(); + + int i=0; + for (std::vector::iterator it = poles.begin(); it != poles.end(); ++it, i++) { + vts[i].setValue((*it).x,(*it).y,zInfo); + } + + if(spline->isPeriodic()) { + vts[poles.size()].setValue(poles[0].x,poles[0].y,zInfo); + } + + coords->point.finishEditing(); + + } + currentInfoNode++; // switch to next node + + // curvature graph -------------------------------------------------------- + + // reimplementation of python source: + // https://github.com/tomate44/CurvesWB/blob/master/ParametricComb.py + // by FreeCAD user Chris_G + + double firstparam = spline->getFirstParameter(); + double lastparam = spline->getLastParameter(); + + const int ndiv = poles.size()>4?poles.size()*16:64; + double step = (lastparam - firstparam ) / (ndiv -1); + + std::vector paramlist(ndiv); + std::vector pointatcurvelist(ndiv); + std::vector curvaturelist(ndiv); + std::vector normallist(ndiv); + double maxcurv = 0; + + double maxdisttocenterofmass = 0; + + //double length = spline->length(firstparam,lastparam); + + for(int i = 0; i < ndiv; i++) { + paramlist[i] = firstparam + i * step; + pointatcurvelist[i] = spline->pointAtParameter(paramlist[i]); + curvaturelist[i] = spline->curvatureAt(paramlist[i]); + + if(curvaturelist[i] > maxcurv) + maxcurv = curvaturelist[i]; + + try { + spline->normalAt(paramlist[i],normallist[i]); + } + catch(Base::Exception) { + normallist[i] = Base::Vector3d(0,0,0); + } + + double temp = ( pointatcurvelist[i] - midp ).Length(); + + if( temp > maxdisttocenterofmass ) + maxdisttocenterofmass = temp; + + } + + double repscale; + + repscale = ( 0.5 * maxdisttocenterofmass ) / maxcurv; // just a factor to make it reasonably visible + //repscale = ( 0.5 * length ) / maxcurv; // this is Chris_G's original + + std::vector pointatcomblist(ndiv); + + for(int i = 0; i < ndiv; i++) { + pointatcomblist[i] = pointatcurvelist[i] - repscale * curvaturelist[i] * normallist[i]; + } + + if(rebuildinformationlayer) { + SoSwitch *sw = new SoSwitch(); + + sw->whichChild = hGrpsk->GetBool("BSplineCombVisible", true)?SO_SWITCH_ALL:SO_SWITCH_NONE; + + SoSeparator *sep = new SoSeparator(); + sep->ref(); + // no caching for fluctuand data structures + sep->renderCaching = SoSeparator::OFF; + + // every information visual node gets its own material for to-be-implemented preselection and selection + SoMaterial *mat = new SoMaterial; + mat->ref(); + mat->diffuseColor = InformationColor; + + SoLineSet *lineset = new SoLineSet; + + SoCoordinate3 *coords = new SoCoordinate3; + + coords->point.setNum(3*ndiv); // 2*ndiv +1 points of ndiv separate segments + ndiv points for last segment + lineset->numVertices.setNum(ndiv+1); // ndiv separate segments of radials + 1 segment connecting at comb end + + int32_t *index = lineset->numVertices.startEditing(); + SbVec3f *vts = coords->point.startEditing(); + + for(int i = 0; i < ndiv; i++) { + vts[2*i].setValue(pointatcurvelist[i].x, pointatcurvelist[i].y, zInfo); // radials + vts[2*i+1].setValue(pointatcomblist[i].x, pointatcomblist[i].y, zInfo); + index[i] = 2; + + vts[2*ndiv+i].setValue(pointatcomblist[i].x, pointatcomblist[i].y, zInfo); // comb endpoint closing segment + } + + index[ndiv] = ndiv; // comb endpoint closing segment + + coords->point.finishEditing(); + lineset->numVertices.finishEditing(); + + sep->addChild(mat); + sep->addChild(coords); + sep->addChild(lineset); + + sw->addChild(sep); + + edit->infoGroup->addChild(sw); + sep->unref(); + mat->unref(); + } + else { + SoSwitch *sw = static_cast(edit->infoGroup->getChild(currentInfoNode)); + + if(visibleInformationChanged) + sw->whichChild = hGrpsk->GetBool("BSplineCombVisible", true)?SO_SWITCH_ALL:SO_SWITCH_NONE; + + SoSeparator *sep = static_cast(sw->getChild(0)); + + SoCoordinate3 *coords = static_cast(sep->getChild(GEOINFO_BSPLINE_POLYGON)); + + SoLineSet *lineset = static_cast(sep->getChild(GEOINFO_BSPLINE_POLYGON+1)); + + coords->point.setNum(3*ndiv); // 2*ndiv +1 points of ndiv separate segments + ndiv points for last segment + lineset->numVertices.setNum(ndiv+1); // ndiv separate segments of radials + 1 segment connecting at comb end + + int32_t *index = lineset->numVertices.startEditing(); + SbVec3f *vts = coords->point.startEditing(); + + for(int i = 0; i < ndiv; i++) { + vts[2*i].setValue(pointatcurvelist[i].x, pointatcurvelist[i].y, zInfo); // radials + vts[2*i+1].setValue(pointatcomblist[i].x, pointatcomblist[i].y, zInfo); + index[i] = 2; + + vts[2*ndiv+i].setValue(pointatcomblist[i].x, pointatcomblist[i].y, zInfo); // comb endpoint closing segment + } + + index[ndiv] = ndiv; // comb endpoint closing segment + + coords->point.finishEditing(); + lineset->numVertices.finishEditing(); + + } + + currentInfoNode++; // switch to next node } else { } } + + visibleInformationChanged=false; // whatever that changed in Information layer is already updated edit->CurvesCoordinate->point.setNum(Coords.size()); edit->CurveSet->numVertices.setNum(Index.size()); @@ -4469,7 +4781,7 @@ getSketchObject()->getSolvedSketch().getGeometrySize()) { Gui::MDIView *mdi = Gui::Application::Instance->activeDocument()->getActiveView(); if (mdi->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) - draw(false); + draw(false,true); signalConstraintsChanged(); signalElementsChanged(); @@ -4655,7 +4967,7 @@ getSketchObject()->solve(false); UpdateSolverInformation(); - draw(false); + draw(false,true); connectUndoDocument = Gui::Application::Instance->activeDocument() ->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, _1)); @@ -4917,6 +5229,24 @@ edit->constrGroup = new SoGroup(); edit->constrGroup->setName("ConstraintGroup"); edit->EditRoot->addChild(edit->constrGroup); + + // group node for the Geometry information visual +++++++++++++++++++++++++++++++++++ + MtlBind = new SoMaterialBinding; + MtlBind->setName("InformationMaterialBinding"); + MtlBind->value = SoMaterialBinding::OVERALL ; + edit->EditRoot->addChild(MtlBind); + + // use small line width for the information visual + DrawStyle = new SoDrawStyle; + DrawStyle->setName("InformationDrawStyle"); + DrawStyle->lineWidth = 1; + edit->EditRoot->addChild(DrawStyle); + + // add the group where all the information entity has its SoSeparator + edit->infoGroup = new SoGroup(); + edit->infoGroup->setName("InformationGroup"); + edit->EditRoot->addChild(edit->infoGroup); + } void ViewProviderSketch::unsetEdit(int ModNum) @@ -5269,7 +5599,7 @@ // if the sketched could not be solved, we first redraw to update the UI geometry as // onChanged did not update it. UpdateSolverInformation(); - draw(); + draw(false,true); signalConstraintsChanged(); signalElementsChanged(); @@ -5297,3 +5627,9 @@ return Plz; } +void ViewProviderSketch::showRestoreInformationLayer() { + + visibleInformationChanged = true ; + draw(false,false); +} + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.h freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.h --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.h 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/ViewProviderSketch.h 2017-02-21 21:18:08.000000000 +0000 @@ -110,7 +110,9 @@ void drawConstraintIcons(); /// draw the sketch in the inventor nodes - void draw(bool temp=false); + /// temp => use temporary solver solution in SketchObject + /// recreateinformationscenography => forces a rebuild of the information layer scenography + void draw(bool temp=false, bool rebuildinformationlayer=true); /// draw the edit curve void drawEdit(const std::vector &EditCurve); @@ -120,6 +122,9 @@ /// Observer message from the Selection virtual void onSelectionChanged(const Gui::SelectionChanges& msg); + /// Show/Hide nodes from information layer + void showRestoreInformationLayer(); + /** @name handler control */ //@{ /// sets an DrawSketchHandler in control @@ -373,6 +378,7 @@ static SbColor PreselectColor; static SbColor SelectColor; static SbColor PreselectSelectedColor; + static SbColor InformationColor; static SbTime prvClickTime; static SbVec3f prvClickPoint; @@ -387,6 +393,7 @@ float zText; float zEdit; float zHighLine; + float zInfo; // reference coordinates for relative operations double xInit,yInit; @@ -397,6 +404,8 @@ Gui::Rubberband* rubberband; App::Part* parentPart = nullptr; Part::BodyBase* parentBody = nullptr; + + bool visibleInformationChanged; }; } // namespace PartGui diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -79,11 +79,16 @@ Gui::MenuItem* consaccel = new Gui::MenuItem(); consaccel->setCommand("Sketcher tools"); addSketcherWorkbenchTools(*consaccel); + + Gui::MenuItem* bsplines = new Gui::MenuItem(); + bsplines->setCommand("Sketcher B-spline tools"); + addSketcherWorkbenchBSplines(*bsplines); addSketcherWorkbenchSketchActions( *sketch ); *sketch << geom << cons - << consaccel; + << consaccel + << bsplines; return root; } @@ -107,6 +112,11 @@ Gui::ToolBarItem* consaccel = new Gui::ToolBarItem(root); consaccel->setCommand("Sketcher tools"); addSketcherWorkbenchTools( *consaccel ); + + Gui::ToolBarItem* bspline = new Gui::ToolBarItem(root); + bspline->setCommand("Sketcher B-spline tools"); + addSketcherWorkbenchBSplines( *bspline ); + return root; } @@ -233,7 +243,7 @@ << "Sketcher_ConstrainAngle" << "Sketcher_ConstrainSnellsLaw" << "Separator" - << "Sketcher_ToggleDrivingConstraint"; + << "Sketcher_ToggleDrivingConstraint"; } template @@ -269,6 +279,25 @@ } template +inline void SketcherAddWorkbenchBSplines(T& bspline); + +template <> +inline void SketcherAddWorkbenchBSplines(Gui::MenuItem& bspline){ + bspline << "Sketcher_BSplineDegree" + << "Sketcher_BSplinePolygon" + << "Sketcher_BSplineComb" + << "Sketcher_BSplineConvertToNURB" + << "Sketcher_BSplineIncreaseDegree"; +} + +template <> +inline void SketcherAddWorkbenchBSplines(Gui::ToolBarItem& bspline){ + bspline << "Sketcher_CompBSplineShowHideGeometryInformation" + << "Sketcher_BSplineConvertToNURB" + << "Sketcher_BSplineIncreaseDegree"; +} + +template inline void SketcherAddWorkspaceSketchExtra(T& /*sketch*/){ } @@ -295,9 +324,15 @@ void addSketcherWorkbenchConstraints( Gui::MenuItem& cons ){ SketcherAddWorkbenchConstraints( cons ); } + void addSketcherWorkbenchTools( Gui::MenuItem& consaccel ){ SketcherAddWorkbenchTools( consaccel ); } + +void addSketcherWorkbenchBSplines( Gui::MenuItem& bspline ){ + SketcherAddWorkbenchBSplines( bspline ); +} + void addSketcherWorkbenchSketchActions( Gui::MenuItem& sketch ){ Sketcher_addWorkbenchSketchActions( sketch ); } @@ -308,10 +343,17 @@ void addSketcherWorkbenchConstraints( Gui::ToolBarItem& cons ){ SketcherAddWorkbenchConstraints( cons ); } + void addSketcherWorkbenchTools( Gui::ToolBarItem& consaccel ) { SketcherAddWorkbenchTools( consaccel ); } + +void addSketcherWorkbenchBSplines( Gui::ToolBarItem& bspline ) +{ + SketcherAddWorkbenchBSplines( bspline ); +} + void addSketcherWorkbenchSketchActions( Gui::ToolBarItem& sketch ){ Sketcher_addWorkbenchSketchActions( sketch ); } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.h freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.h --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.h 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Sketcher/Gui/Workbench.h 2017-02-21 21:18:08.000000000 +0000 @@ -52,11 +52,13 @@ SketcherGuiExport void addSketcherWorkbenchConstraints( Gui::MenuItem& cons ); SketcherGuiExport void addSketcherWorkbenchTools( Gui::MenuItem& consaccel ); +SketcherGuiExport void addSketcherWorkbenchBSplines( Gui::MenuItem& bspline ); SketcherGuiExport void addSketcherWorkbenchSketchActions( Gui::MenuItem& sketch ); SketcherGuiExport void addSketcherWorkbenchGeometries( Gui::MenuItem& geom ); SketcherGuiExport void addSketcherWorkbenchConstraints( Gui::ToolBarItem& cons ); SketcherGuiExport void addSketcherWorkbenchTools( Gui::ToolBarItem& consaccel ); +SketcherGuiExport void addSketcherWorkbenchBSplines( Gui::ToolBarItem& bspline ); SketcherGuiExport void addSketcherWorkbenchSketchActions( Gui::ToolBarItem& sketch ); SketcherGuiExport void addSketcherWorkbenchGeometries( Gui::ToolBarItem& geom ); diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Spreadsheet/importXLSX.py freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Spreadsheet/importXLSX.py --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/Spreadsheet/importXLSX.py 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/Spreadsheet/importXLSX.py 2017-02-21 21:18:08.000000000 +0000 @@ -30,21 +30,27 @@ ''' This library imports an Excel-XLSX-file into FreeCAD. +Version 1.1, Nov. 2016: +Changed parser, adds rad-unit to trigonometric functions in order +to give the same result in FreeCAD. +Added factor to arcus-function in order to give the same result in FreeCAD +Added support for celltype "inlineStr" + +Version 1.0: It uses a minimal parser, in order to translate the IF-function into the different FreeCAD version. The other function-names are translated by search and replace. - -Version 1.0: +Features: - Imports tables defined inside Excel-document - Set alias definitions -- Translate formulas known by FreeCAD. (see funcDic + IF) +- Translate formulas known by FreeCAD. (see tokenDic as by version 1.1) - set cross table references - strings are imported - references to cells with strings are working known issues: - units are not imported -- string support is minimal, as it is so in FreeCAD +- string support is minimal, the same as in FreeCAD ''' @@ -60,39 +66,12 @@ pythonopen = open -funcDic = { - 'ABS(':'abs(', - 'ACOS(':'acos(', - 'ASIN(':'asin(', - 'ATAN(':'atan(', - 'ATAN2(':'atan2(', - 'COS(':'cos(', - 'COSH(':'cosh(', - 'EXP(':'exp(', - 'LOG(':'log(', - 'LOG10(':'log10(', - 'MOD(':'mod(', - 'POWER(':'pow(', - 'SIN(':'sin(', - 'SINH(':'sinh(', - 'SQRT(':'sqrt(', - 'TAN(':'tan(', - 'TANH(':'tanh(', - 'AVERAGE(':'average(', - 'COUNT(':'count(', - 'MAX(':'max(', - 'MIN(':'min(', - 'STDEVA(':'stddev(', - 'SUM(':'sum(', - 'PI()':'pi' - } - -# The treeToken structure is used in the tokenizer functions isKey and +# The sepToken structure is used in the tokenizer functions isKey and # getNextToken. -# treeToken defines a search tree for tokens with length of 1 to 3 characters -treeToken = { +# sepToken defines a search tree for separator tokens with length of 1 to 3 characters +# it is also used as a list of separators between other tokens. +sepToken = { '(':None, - 'I':'branchI', '=':None, '<':'branchLower', '>':'branchHigher', @@ -100,12 +79,14 @@ # '"':None, # ';':None, ' ':None, - ',':None, - '!':None + ',':None, # Separator on lists + '!':None, #Connector to cells on other Sheets + '+':None, + '-':None, + '*':None, + '/':None, + '^':None } - -branchI = {'F':'branchF'} -branchF = {'(':None} branchLower ={ '>':None, @@ -117,8 +98,6 @@ # Needed to get a reference from a string to a dict treeDict = { - 'branchI':branchI, - 'branchF':branchF, 'branchLower':branchLower, 'branchHigher':branchHigher } @@ -127,68 +106,95 @@ # The tokenDic contains the following information: # levelchange: -1: tree down, 0, +1: tree up # replacement token -# special token list +# function-state: needed to do something special in the parser +# 0 = normal, 1 = the pi-case, 2 = angle-function, +# 3 = IF-function, 4 = IF-truecase, 5 IF-falsecase + tokenDic = { - '(' :( 1, '(', None), - 'IF(':( 1, '(', None), - '=' :( 0 ,'==', None), - '<>' :( 0 ,'!=', None), - '>=' :( 0 ,'>=', None), - '<=' :( 0 ,'<=', None), - '<' :( 0 ,'<', None), - '>' :( 0 ,'>', None), -# ';' :( 0 ,';', ['?',':']), - ',' :( 0 ,',', ['?',':']), - ')' :(-1 ,')', None), - '!' :( 0 ,'.', None) #Connector to cells on other Sheets -# '"' :( 2 ,'', None) + '(' :( 1, '(', 0), + '=' :( 0 ,'==', 0), + '<>' :( 0 ,'!=', 0), + '>=' :( 0 ,'>=', 0), + '<=' :( 0 ,'<=', 0), + '<' :( 0 ,'<', 0), + '>' :( 0 ,'>', 0), + ',' :( 0 ,',', 0), + ')' :(-1 ,')', 0), + '!' :( 0 ,'.', 0), #Connector to cells on other Sheets +# '"' :( 2 ,'', 0), + '+' :( 0 ,'+', 0), + '-' :( 0 ,'-', 0), + '*' :( 0 ,'*', 0), + '/' :( 0 ,'/', 0), + '^' :( 0 ,'^', 0), + 'IF' :( 0, '', 3), + 'ABS' :( 0, 'abs', 0), + 'ACOS' :( 0, 'pi/180deg*acos', 0), + 'ASIN' :( 0, 'pi/180deg*asin', 0), + 'ATAN' :( 0, 'pi/180deg*atan', 0), + 'ATAN2':( 0, 'pi/180deg*atan2',0), + 'COS' :( 0, 'cos', 2), + 'COSH' :( 0, 'cosh', 2), + 'EXP' :( 0, 'exp', 0), + 'LOG' :( 0, 'log', 0), + 'LOG10':( 0, 'log10',0), + 'MOD' :( 0, 'mod', 0), + 'POWER':( 0, 'pow', 0), + 'SIN' :( 0, 'sin', 2), + 'SINH' :( 0, 'sinh', 2), + 'SQRT' :( 0, 'sqrt', 0), + 'TAN' :( 0, 'tan', 2), + 'TANH' :( 0, 'tanh', 2), + 'AVERAGE':( 0, 'average', 0), + 'COUNT':( 0, 'count',0), + 'MAX' :( 0, 'max', 0), + 'MIN' :( 0, 'min', 0), + 'STDEVA':( 0, 'stddev',0), + 'SUM' :( 0, 'sum', 0), + 'PI' :( 0, 'pi', 1) } class exprNode(object): - ''' This defines a tree class for expression parsing''' - def __init__(self, parent, state): - self.state = state #see comment: State machine for expression parsing + ''' This defines a tree class for expression parsing. + A tree is build, to step down into the levels of the expression.''' + def __init__(self, parent, state, actIndex): + self.state = state #see comment: State used for Angle-functions and IF-function self.parent = parent # Parent tree node + self.lIndex = actIndex # Index to the list of tokens self.result = '' class FormulaTranslator(object): ''' This class tranlates a cell-formula from Excel to FreeCAD.''' def __init__(self): - self.theTList = ['='] + self.tokenList = ['='] def translateForm(self, actExpr): self.getNextToken(actExpr) - #print "tokenList: ", self.theTList - self.resultTree = exprNode(None, 5) - self.resultTree.result = self.resultTree.result + self.theTList[0] - self.parseExpr(self.theTList, 1, self.resultTree) - #print 'parseResult: ', self.resultTree.result - return self.replaceFunc(self.resultTree.result) - + #print("tokenList: ", self.tokenList) + self.resultTree = exprNode(None, 0, 1) + self.resultTree.result = self.tokenList[0] + self.parseExpr(self.resultTree) + #print('parseResult: ', self.resultTree.result) + return self.resultTree.result - def replaceFunc(self, cellFormula): - for funcKey in funcDic: - if funcKey in cellFormula: - cellFormula = cellFormula.replace(funcKey, funcDic[funcKey]) - return cellFormula - - def getNextToken(self, theExpr): - #print 'next Token theExpr: ', theExpr - #print 'actTList: ', self.theTList + ''' This is the recursive tokenizer for an excel formula. + It appends all identified tokens to self.tokenList.''' + #print('next Token theExpr: ', theExpr) + #print('actTList: ', self.tokenList) tokenComplete = False keyToken = False if len(theExpr)>0: theTok = theExpr[0] theExpr = theExpr[1:] - if theTok in treeToken: + if theTok in sepToken: keyToken = True - branch = treeToken[theTok] + branch = sepToken[theTok] while branch: - #print branch, ' theExpr[0]: ',theExpr[0] + #print(branch, ' theExpr[0]: ',theExpr[0]) if theExpr[0] in treeDict[branch]: branch = treeDict[branch][theExpr[0]] theTok = theTok + theExpr[0] @@ -196,7 +202,7 @@ else: branch= None tokenComplete = True - self.theTList.append(theTok) + self.tokenList.append(theTok) self.getNextToken(theExpr) else: if len(theExpr)>0: @@ -208,21 +214,21 @@ tokenComplete = True else: tokenComplete = True - self.theTList.append(theTok) + self.tokenList.append(theTok) self.getNextToken(theExpr) def isKey(self, theExpr): - #print 'look up: ', theExpr + #print('look up: ', theExpr) keyToken = False lenExpr = len(theExpr) - if theExpr[0] in treeToken: - branch = treeToken[theExpr[0]] + if theExpr[0] in sepToken: + branch = sepToken[theExpr[0]] if branch == None: keyToken = True else: - #print 'There is a branch. look up: ', theExpr[1] + #print('There is a branch. look up: ', theExpr[1]) if (lenExpr > 1) and (theExpr[1] in treeDict[branch]): branch = treeDict[branch][theExpr[0]] if branch == None: @@ -235,60 +241,79 @@ return keyToken - # State machine for expression parsing - # 0 in ifsubexpression - # 1 in conditional - # 2 in truecase - # 3 in falsecase - # 4 in subexpression - # 5 toplevel '=' - - def parseExpr(self, tokenList, index, theTree): - token = tokenList[index] - #print 'state: ', theTree.state, ' ', token - nextIdx = index + 1 + + def parseExpr(self, treeNode): + token = self.tokenList[treeNode.lIndex] + treeNode.lIndex += 1 if token in tokenDic: - lChange, newToken, specialList = tokenDic[token] + lChange, newToken, funcState = tokenDic[token] else: lChange = 0 newToken = token - specialList = None - - if lChange == 1: - theTree.result = theTree.result + newToken - if token == '(': - state = 4 - else: - state = 1 - newNode = exprNode(theTree, state) - self.parseExpr(tokenList, nextIdx, newNode) + funcState = 0 + #print('treeNode.state: ', treeNode.state, ' my.index: ', treeNode.lIndex-1, ' ', token, ' fState: ', funcState) + + if token == ',': + if (treeNode.state == 4): + newToken = ':' + treeNode.state = 6 + if (treeNode.state == 3): + newToken = '?' + treeNode.state = 4 + + if funcState == 3: + funcState = 0 + newNode = exprNode(treeNode, 3, treeNode.lIndex) + self.parseIF(newNode) else: - if lChange == 0: - if theTree.state > 2: - theTree.result = theTree.result + newToken - else: - if (theTree.state == 1): - if specialList: - theTree.result = theTree.result + specialList[0] - theTree.state = 2 - else: - theTree.result = theTree.result + newToken - else: - if (theTree.state == 2): - if specialList: - theTree.result = theTree.result + specialList[1] - theTree.state = 3 - else: - theTree.result = theTree.result + newToken - - if nextIdx < len(tokenList): - self.parseExpr(tokenList, nextIdx, theTree) - else: - theTree.parent.result = theTree.parent.result + theTree.result + newToken - if nextIdx < len(tokenList): - self.parseExpr(tokenList, nextIdx, theTree.parent) + treeNode.result = treeNode.result + newToken + + if funcState == 2: + funcState = 0 + newNode = exprNode(treeNode, 2, treeNode.lIndex) + self.parseAngle(newNode) + treeNode.result = treeNode.result + ')' + elif funcState == 1: + treeNode.lIndex += 2 # do skip the 2 parentheses of the PI() - # End of Formula Translator + if lChange == -1: + #print 'state: ', treeNode.state, 'parent.result: ', treeNode.parent.result, ' mine: ', treeNode.result + treeNode.parent.result = treeNode.parent.result + treeNode.result + treeNode.parent.lIndex = treeNode.lIndex + #print('Go one level up, state: ', treeNode.state) + if (treeNode.state < 2): + #print(' Look up more token above') + if treeNode.lIndex < len(self.tokenList): + self.parseExpr(treeNode.parent) + + elif lChange == 1: + #print('Go one level down') + newNode = exprNode(treeNode, 1, treeNode.lIndex) + self.parseExpr(newNode) + treeNode.lIndex = newNode.lIndex + else: + if treeNode.lIndex < len(self.tokenList): + #print('parse to the end') + self.parseExpr(treeNode) + + + + def parseIF(self, treeNode): + #print('IF state: ', treeNode.state) + treeNode.result = treeNode.result + '(' + treeNode.lIndex += 1 + self.parseExpr(treeNode) + #print('IF result: ', treeNode.result) + return + + def parseAngle(self, treeNode): + #print('Angle state: ', treeNode.state) + treeNode.result = treeNode.result + '(1rad*(' + treeNode.lIndex += 1 + self.parseExpr(treeNode) + #print('angle result: ', treeNode.result) + + def getText(nodelist): rc = [] @@ -316,37 +341,50 @@ else: cellType = 'n' # fix me some cells dont have t and s attributes - #print "reference: ", ref, ' Cell type: ', cellType + #print("reference: ", ref, ' Cell type: ', cellType) + + if cellType == 'inlineStr': + iStringList = cell.getElementsByTagName("is") + #print('iString: ', iStringList) + for stringEle in iStringList: + tElement = stringEle.getElementsByTagName('t')[0] + theString = getText(tElement.childNodes) + + #print('theString: ', theString) + actCellSheet.set(ref, theString.encode('utf8')) formulaRef = cell.getElementsByTagName("f") if len(formulaRef)==1: theFormula = getText(formulaRef[0].childNodes) - #print "theFormula: ", theFormula + #print("theFormula: ", theFormula) fTrans = FormulaTranslator() actCellSheet.set(ref, fTrans.translateForm(theFormula)) else: - valueRef = cell.getElementsByTagName("v")[0] - if valueRef: - theValue = getText(valueRef.childNodes) - #print "theValue: ", theValue - if cellType == 'n': - actCellSheet.set(ref, theValue) - if cellType == 's': - actCellSheet.set(ref, (sList[int(theValue)]).encode('utf8')) + valueRef = cell.getElementsByTagName("v") + #print('valueRef: ', valueRef) + if len(valueRef)==1: + valueRef = cell.getElementsByTagName("v")[0] + if valueRef: + theValue = getText(valueRef.childNodes) + #print("theValue: ", theValue) + if cellType == 'n': + actCellSheet.set(ref, theValue) + if cellType == 's': + actCellSheet.set(ref, (sList[int(theValue)]).encode('utf8')) def handleWorkBook(theBook, sheetDict, Doc): theSheets = theBook.getElementsByTagName("sheet") - #print "theSheets: ", theSheets + #print("theSheets: ", theSheets) for sheet in theSheets: sheetAtts = sheet.attributes nameRef = sheetAtts.getNamedItem("name") sheetName = getText(nameRef.childNodes) - #print "table name: ", sheetName + #print("table name: ", sheetName) idRef = sheetAtts.getNamedItem("sheetId") sheetFile = "sheet" + getText(idRef.childNodes) + '.xml' - #print "sheetFile: ", sheetFile + #print("sheetFile: ", sheetFile) # add FreeCAD-spreadsheet sheetDict[sheetName] = (Doc.addObject('Spreadsheet::Sheet', sheetName), sheetFile) @@ -355,15 +393,15 @@ aliAtts = theAlias.attributes nameRef = aliAtts.getNamedItem("name") aliasName = getText(nameRef.childNodes) - #print "aliasName: ", aliasName + #print("aliasName: ", aliasName) aliasRef = getText(theAlias.childNodes) if '$' in aliasRef: refList = aliasRef.split('!$') adressList = refList[1].split('$') - #print "aliasRef: ", aliasRef - #print 'Sheet Name: ', refList[0] - #print 'Adress: ', adressList[0] + adressList[1] + #print("aliasRef: ", aliasRef) + #print('Sheet Name: ', refList[0]) + #print('Adress: ', adressList[0] + adressList[1]) actSheet, sheetFile = sheetDict[refList[0]] actSheet.setAlias(adressList[0]+adressList[1], aliasName.encode('utf8')) @@ -396,7 +434,7 @@ theStrings.unlink() for sheetSpec in sheetDict: - #print "sheetSpec: ", sheetSpec + #print("sheetSpec: ", sheetSpec) theSheet, sheetFile = sheetDict[sheetSpec] f=z.open('xl/worksheets/' + sheetFile) myDom = xml.dom.minidom.parse(f) @@ -434,7 +472,7 @@ theStrings.unlink() for sheetSpec in sheetDict: - #print "sheetSpec: ", sheetSpec + #print("sheetSpec: ", sheetSpec) theSheet, sheetFile = sheetDict[sheetSpec] f=z.open('xl/worksheets/' + sheetFile) myDom = xml.dom.minidom.parse(f) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/AppTechDraw.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/AppTechDraw.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/AppTechDraw.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/AppTechDraw.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -15,6 +15,7 @@ #endif #include +#include #include #include "DrawPage.h" @@ -40,11 +41,11 @@ #include "DrawViewDetail.h" namespace TechDraw { -extern PyObject* initModule(); + extern PyObject* initModule(); } /* Python entry */ -PyMODINIT_FUNC initTechDraw() +PyMOD_INIT_FUNC(TechDraw) { // load dependent module try { @@ -53,9 +54,9 @@ } catch(const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); - return; + PyMOD_Return(0); } - (void)TechDraw::initModule(); + PyObject* mod = TechDraw::initModule(); Base::Console().Log("Loading TechDraw module... done\n"); @@ -96,4 +97,5 @@ TechDraw::DrawViewMultiPython ::init(); TechDraw::DrawTemplatePython ::init(); TechDraw::DrawViewSymbolPython::init(); + PyMOD_Return(mod); } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawPagePyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawPagePyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawPagePyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawPagePyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -38,8 +38,11 @@ DrawView* view = pyView->getDrawViewPtr(); //get DrawView for pyView int rc = page->addView(view); - +#if PY_MAJOR_VERSION < 3 return PyInt_FromLong((long) rc); +#else + return PyLong_FromLong((long) rc); +#endif } PyObject* DrawPagePy::removeView(PyObject* args) @@ -60,7 +63,11 @@ int rc = page->removeView(view); +#if PY_MAJOR_VERSION < 3 return PyInt_FromLong((long) rc); +#else + return PyLong_FromLong((long) rc); +#endif } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -80,8 +80,8 @@ } -Py::Int DrawParametricTemplatePy::getGeometryCount(void) const +Py::Long DrawParametricTemplatePy::getGeometryCount(void) const { int size = getDrawParametricTemplatePtr()->getGeometry().size(); - return Py::Int(size); + return Py::Long(size); } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePy.xml freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePy.xml --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePy.xml 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawParametricTemplatePy.xml 2017-02-21 21:18:08.000000000 +0000 @@ -22,7 +22,7 @@ Number of geometry in template - + diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -49,7 +49,11 @@ DrawProjGroup* projGroup = getDrawProjGroupPtr(); int i = projGroup->removeProjection(projType); +#if PY_MAJOR_VERSION < 3 return PyInt_FromLong((long) i); +#else + return PyLong_FromLong((long) i); +#endif } PyObject* DrawProjGroupPy::purgeProjections(PyObject* /*args*/) @@ -57,7 +61,11 @@ DrawProjGroup* projGroup = getDrawProjGroupPtr(); int i = projGroup->purgeProjections(); +#if PY_MAJOR_VERSION < 3 return PyInt_FromLong((long) i); +#else + return PyLong_FromLong((long) i); +#endif } PyObject* DrawProjGroupPy::getItemByLabel(PyObject* args) diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -50,7 +50,11 @@ } std::string content = getDrawSVGTemplatePtr()->EditableTexts[fieldName]; if (!content.empty()) { +#if PY_MAJOR_VERSION < 3 result = PyString_FromString(content.c_str()); +#else + result = PyUnicode_FromString(content.c_str()); +#endif } return result; } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -82,7 +82,11 @@ std::vector::iterator it = strings.begin(); for( ; it != strings.end(); it++) { +#if PY_MAJOR_VERSION < 3 PyObject* pString = PyString_FromString(it->c_str()); //TODO: unicode & py3 +#else + PyObject* pString = PyUnicode_FromString(it->c_str()); +#endif //int rc = static_cast (PyList_Append(result, pString)); } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -29,7 +29,11 @@ int i = collect->addView(view); +#if PY_MAJOR_VERSION < 3 return PyInt_FromLong((long) i); +#else + return PyLong_FromLong((long) i); +#endif } PyObject* DrawViewCollectionPy::removeView(PyObject* args) @@ -47,7 +51,11 @@ int i = collect->removeView(view); +#if PY_MAJOR_VERSION < 3 return PyInt_FromLong((long) i); +#else + return PyLong_FromLong((long) i); +#endif } diff -Nru freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp --- freecad-daily-0.17~alpha1+git201702201410~ubuntu16.10.1/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp 2017-02-20 14:10:07.000000000 +0000 +++ freecad-daily-0.17~alpha1+git201702212118~ubuntu16.10.1/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp 2017-02-21 21:18:08.000000000 +0000 @@ -28,6 +28,7 @@ #endif #include +#include #include #include #include @@ -65,21 +66,38 @@ Gui::Translator::instance()->refresh(); } -/* registration table */ -extern struct PyMethodDef TechDrawGui_Import_methods[]; +namespace TechDrawGui { +class Module : public Py::ExtensionModule +{ +public: + Module() : Py::ExtensionModule("TechDrawGui") + { + initialize("This module is the TechDrawGui module."); // register with Python + } + + virtual ~Module() {} + +private: +}; + +PyObject* initModule() +{ + return (new Module)->module().ptr(); +} + +} // namespace TechDrawGui /* Python entry */ -extern "C" { -void TechDrawGuiExport initTechDrawGui() +PyMOD_INIT_FUNC(TechDrawGui) { if (!Gui::Application::Instance) { PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application."); - return; + PyMOD_Return(0); } + PyObject* mod = TechDrawGui::initModule(); - (void) Py_InitModule("TechDrawGui", TechDrawGui_Import_methods); /* mod name, table ptr */ - Base::Console().Log("Loading GUI of TechDraw module... done\n"); + Base::Console().Log("Loading TechDrawGui module... done\n"); // instantiating the commands CreateTechDrawCommands(); @@ -113,6 +131,6 @@ // add resources and reloads the translators loadTechDrawResource(); -} -} // extern "C" { + PyMOD_Return(mod); +}