Skip to content

Commit

Permalink
Merge branch 'master' into pathpocketshape_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Russ4262 committed Jun 16, 2019
2 parents 69623f0 + 1b39fe3 commit 4296df8
Show file tree
Hide file tree
Showing 57 changed files with 3,907 additions and 147 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -229,7 +229,7 @@ if(MSVC)
# Copy libpack 'bin' directory contents to build 'bin' per user request - only IF NOT EXISTS already
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/DLLs)
set(COPY_LIBPACK_BIN_TO_BUILD ON)
option(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build direcctory." OFF)
option(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build directory." OFF)
endif()
else()
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/DlgMacroRecordImp.h
Expand Up @@ -37,7 +37,7 @@ namespace Dialog {
* \author Jürgen Riegel
*/
class DlgMacroRecordImp : public QDialog, public Ui_DlgMacroRecord, public Gui::WindowParameter
{
{
Q_OBJECT

public:
Expand All @@ -52,8 +52,8 @@ protected Q_SLOTS:
void on_lineEditMacroPath_textChanged ( const QString & );

protected:
/// conviniance pointer
MacroManager* macroManager;
/// convenience pointer
MacroManager* macroManager;
QString macroPath; // Macro file to save in
};

Expand Down
8 changes: 5 additions & 3 deletions src/Mod/Draft/DraftGeomUtils.py
Expand Up @@ -47,9 +47,11 @@

def precision():
"precision(): returns the Draft precision setting"
# Set precision level with a cap to avoid overspecification that:-
# 1 - whilst it is precise enough (e.g. that OCC would consider 2 points are conincident) (not sure what it should be 10 or otherwise);
# 2 - but FreeCAD / OCC can handle 'internally' (e.g. otherwise user may set something like 15 that the code would never consider 2 points are coincident as internal float is not that precise);
# Set precision level with a cap to avoid overspecification that:
# 1 - whilst it is precise enough (e.g. that OCC would consider 2 points are coincident)
# (not sure what it should be 10 or otherwise);
# 2 - but FreeCAD/OCC can handle 'internally' (e.g. otherwise user may set something like
# 15 that the code would never consider 2 points are coincident as internal float is not that precise);

precisionMax = 10
precisionInt = params.GetInt("precision",6)
Expand Down
7 changes: 3 additions & 4 deletions src/Mod/Fem/App/FemMesh.cpp
Expand Up @@ -946,10 +946,10 @@ std::set<int> FemMesh::getFacesOnly(void) const
// get the volume nodes
// if the face nodes are a subset of the volume nodes
// add the face to the volume faces and break
// if face not belongs to a volume
// if face doesn't belong to a volume
// add it to faces only
//
// This means it is iterated over a lot of volumes many times, this is quite expensive !
// This means it is iterated over a lot of volumes many times, this is quite expensive!
//
// TODO make this faster
// Idea:
Expand All @@ -959,7 +959,7 @@ std::set<int> FemMesh::getFacesOnly(void) const
// if not in volume faces
// add it to the faces only
//
// but the volume faces does not seam know their global mesh ID, I could not found any method in SMESH
// but the volume faces do not seem to know their global mesh ID, I could not find any method in SMESH

std::set<int> resultIDs;

Expand Down Expand Up @@ -2050,4 +2050,3 @@ Base::Quantity FemMesh::getVolume(void)const


}

15 changes: 12 additions & 3 deletions src/Mod/Fem/App/FemVTKTools.cpp
Expand Up @@ -660,6 +660,10 @@ std::map<std::string, std::string> _getFreeCADMechResultVectorProperties() {
// App::PropertyVectorList will be a list of vectors in vtk
std::map<std::string, std::string> resFCVecProp;
resFCVecProp["DisplacementVectors"] = "Displacement";
// https://forum.freecadweb.org/viewtopic.php?f=18&t=33106&start=70#p296317
resFCVecProp["PS1Vector"] = "Major Principal Stress";
resFCVecProp["PS2Vector"] = "Intermediate Principal Stress";
resFCVecProp["PS3Vector"] = "Minor Principal Stress";

return resFCVecProp;
}
Expand All @@ -686,11 +690,16 @@ std::map<std::string, std::string> _getFreeCADMechResultScalarProperties() {
resFCScalProp["NodeStrainXZ"] = "Strain xz component";
resFCScalProp["NodeStrainYZ"] = "Strain yz component";
resFCScalProp["Peeq"] = "Equivalent Plastic Strain";
resFCScalProp["PrincipalMax"] = "Major Principal Stress"; // can be plotted in Paraview as THE MAJOR PRINCIPAL STRESS MAGNITUDE
resFCScalProp["PrincipalMed"] = "Intermediate Principal Stress"; // can be plotted in Paraview as THE INTERMEDIATE PRINCIPAL STRESS MAGNITUDE
resFCScalProp["PrincipalMin"] = "Minor Principal Stress"; // can be plotted in Paraview as THE MINOR PRINCIPAL STRESS MAGNITUDE
// https://forum.freecadweb.org/viewtopic.php?f=18&t=33106&start=70#p296317
// resFCScalProp["PrincipalMax"] = "Major Principal Stress"; // can be plotted in Paraview as THE MAJOR PRINCIPAL STRESS MAGNITUDE
// resFCScalProp["PrincipalMed"] = "Intermediate Principal Stress"; // can be plotted in Paraview as THE INTERMEDIATE PRINCIPAL STRESS MAGNITUDE
// resFCScalProp["PrincipalMin"] = "Minor Principal Stress"; // can be plotted in Paraview as THE MINOR PRINCIPAL STRESS MAGNITUDE
resFCScalProp["StressValues"] = "von Mises Stress";
resFCScalProp["Temperature"] = "Temperature";
resFCScalProp["MohrCoulomb"] = "MohrCoulomb";
resFCScalProp["ReinforcementRatio_x"] = "ReinforcementRatio_x";
resFCScalProp["ReinforcementRatio_y"] = "ReinforcementRatio_y";
resFCScalProp["ReinforcementRatio_z"] = "ReinforcementRatio_z";

resFCScalProp["UserDefined"] = "UserDefinedMyName"; // this is empty or am I wrong ?!
resFCScalProp["MassFlowRate"] = "Mass Flow Rate";
Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Fem/CMakeLists.txt
Expand Up @@ -36,11 +36,13 @@ SET(FemExamples_SRCS
femexamples/__init__.py
femexamples/ccx_cantilever_std.py
femexamples/manager.py
femexamples/rc_wall_2d.py
)

SET(FemExampleMeshes_SRCS
femexamples/meshes/__init__.py
femexamples/meshes/mesh_canticcx_tetra10.py
femexamples/meshes/mesh_rc_wall_2d_tria6.py
)

SET(FemInOut_SRCS
Expand Down Expand Up @@ -206,6 +208,7 @@ SET(FemObjectsScripts_SRCS
femobjects/_FemElementGeometry2D.py
femobjects/_FemElementRotation1D.py
femobjects/_FemMaterial.py
femobjects/_FemMaterialReinforced.py
femobjects/_FemMaterialMechanicalNonlinear.py
femobjects/_FemMeshBoundaryLayer.py
femobjects/_FemMeshGmsh.py
Expand Down Expand Up @@ -286,6 +289,7 @@ SET(FemGuiScripts_SRCS
femguiobjects/_ViewProviderFemElementGeometry2D.py
femguiobjects/_ViewProviderFemElementRotation1D.py
femguiobjects/_ViewProviderFemMaterial.py
femguiobjects/_ViewProviderFemMaterialReinforced.py
femguiobjects/_ViewProviderFemMaterialMechanicalNonlinear.py
femguiobjects/_ViewProviderFemMeshBoundaryLayer.py
femguiobjects/_ViewProviderFemMeshGmsh.py
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Fem/Gui/CMakeLists.txt
Expand Up @@ -401,6 +401,7 @@ SET(FemGuiPythonUI_SRCS
Resources/ui/FlowVelocity.ui
Resources/ui/InitialFlowVelocity.ui
Resources/ui/Material.ui
Resources/ui/MaterialReinforcement.ui
Resources/ui/MeshBoundaryLayer.ui
Resources/ui/MeshGmsh.ui
Resources/ui/MeshGroup.ui
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Fem/Gui/Resources/Fem.qrc
Expand Up @@ -52,6 +52,7 @@
<file>icons/fem-material.svg</file>
<file>icons/fem-material-fluid.svg</file>
<file>icons/fem-material-nonlinear.svg</file>
<file>icons/fem-material-reinforced.svg</file>
<file>icons/fem-post-data-pipline.svg</file>
<file>icons/fem-post-filter-clip-region.svg</file>
<file>icons/fem-post-filter-clip-scalar.svg</file>
Expand Down

0 comments on commit 4296df8

Please sign in to comment.