Merge branch 'master' into openscadLinearExtrudeAngleFix
This commit is contained in:
@@ -125,6 +125,19 @@ class GmshTools():
|
||||
else:
|
||||
self.algorithm3D = "1"
|
||||
|
||||
# RecombinationAlgorithm
|
||||
algoRecombo = self.mesh_obj.RecombinationAlgorithm
|
||||
if algoRecombo == "Simple":
|
||||
self.RecombinationAlgorithm = "0"
|
||||
elif algoRecombo == "Blossom":
|
||||
self.RecombinationAlgorithm = "1"
|
||||
elif algoRecombo == "Simple full-quad":
|
||||
self.RecombinationAlgorithm = "2"
|
||||
elif algoRecombo == "Blossom full-quad":
|
||||
self.RecombinationAlgorithm = "3"
|
||||
else:
|
||||
self.algoRecombo = "0"
|
||||
|
||||
# HighOrderOptimize
|
||||
optimizers = self.mesh_obj.HighOrderOptimize
|
||||
if optimizers == "None":
|
||||
@@ -766,8 +779,15 @@ class GmshTools():
|
||||
)
|
||||
geo.write("\n")
|
||||
if hasattr(self.mesh_obj, "RecombineAll") and self.mesh_obj.RecombineAll is True:
|
||||
geo.write("// other mesh options\n")
|
||||
geo.write("// recombination for surfaces\n")
|
||||
geo.write("Mesh.RecombineAll = 1;\n")
|
||||
if hasattr(self.mesh_obj, "Recombine3DAll") and self.mesh_obj.Recombine3DAll is True:
|
||||
geo.write("// recombination for volumes\n")
|
||||
geo.write("Mesh.Recombine3DAll = 1;\n")
|
||||
if ( (hasattr(self.mesh_obj, "RecombineAll") and self.mesh_obj.RecombineAll is True)
|
||||
or (hasattr(self.mesh_obj, "Recombine3DAll") and self.mesh_obj.Recombine3DAll is True)):
|
||||
geo.write("// recombination algorithm\n")
|
||||
geo.write("Mesh.RecombinationAlgorithm = " + self.RecombinationAlgorithm + ";\n")
|
||||
geo.write("\n")
|
||||
|
||||
geo.write("// optimize the mesh\n")
|
||||
|
||||
@@ -60,6 +60,12 @@ class MeshGmsh(base_fempythonobject.BaseFemPythonObject):
|
||||
"R-tree",
|
||||
"HXT"
|
||||
]
|
||||
known_mesh_RecombinationAlgorithms = [
|
||||
"Simple",
|
||||
"Blossom",
|
||||
"Simple full-quad",
|
||||
"Blossom full-quad"
|
||||
]
|
||||
known_mesh_HighOrderOptimizers = [
|
||||
"None",
|
||||
"Optimization",
|
||||
@@ -169,7 +175,7 @@ class MeshGmsh(base_fempythonobject.BaseFemPythonObject):
|
||||
"App::PropertyBool",
|
||||
"OptimizeStd",
|
||||
"FEM Gmsh Mesh Params",
|
||||
"Optimize tetra elements"
|
||||
"Optimize tetrahedral elements"
|
||||
)
|
||||
obj.OptimizeStd = True
|
||||
|
||||
@@ -201,6 +207,25 @@ class MeshGmsh(base_fempythonobject.BaseFemPythonObject):
|
||||
)
|
||||
obj.RecombineAll = False
|
||||
|
||||
if not hasattr(obj, "Recombine3DAll"):
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
"Recombine3DAll",
|
||||
"FEM Gmsh Mesh Params",
|
||||
"Apply recombination algorithm to all volumes"
|
||||
)
|
||||
obj.Recombine3DAll = False
|
||||
|
||||
if not hasattr(obj, "RecombinationAlgorithm"):
|
||||
obj.addProperty(
|
||||
"App::PropertyEnumeration",
|
||||
"RecombinationAlgorithm",
|
||||
"FEM Gmsh Mesh Params",
|
||||
"Recombination algorithm"
|
||||
)
|
||||
obj.RecombinationAlgorithm = MeshGmsh.known_mesh_RecombinationAlgorithms
|
||||
obj.RecombinationAlgorithm = "Simple"
|
||||
|
||||
if not hasattr(obj, "CoherenceMesh"):
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
|
||||
@@ -693,7 +693,8 @@ private:
|
||||
TColStd_IndexedDataMapOfStringString aMetadata;
|
||||
RWGltf_CafWriter aWriter (name8bit.c_str(), file.hasExtension("glb"));
|
||||
aWriter.SetTransformationFormat (RWGltf_WriterTrsfFormat_Compact);
|
||||
//aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001);
|
||||
// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units
|
||||
aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001);
|
||||
aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (RWMesh_CoordinateSystem_Zup);
|
||||
Standard_Boolean ret = aWriter.Perform (hDoc, aMetadata, Message_ProgressRange());
|
||||
if (!ret) {
|
||||
|
||||
@@ -80,7 +80,6 @@ PartExport extern PyObject* PartExceptionOCCDimensionError;
|
||||
str += " "; \
|
||||
if (msg) {str += msg;} \
|
||||
else {str += "No OCCT Exception Message";} \
|
||||
Base::Console().Error(str.c_str()); \
|
||||
_Py_Error(R,Part::PartExceptionOCCError,str.c_str()); \
|
||||
} \
|
||||
_PY_CATCH(R)
|
||||
|
||||
@@ -592,6 +592,7 @@ PyObject * TopoShape::getPyObject()
|
||||
}
|
||||
}
|
||||
|
||||
prop->setNotTracking();
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ TopoDS_Shape Transformed::getRemainingSolids(const TopoDS_Shape& shape)
|
||||
builder.Add(compShape, xp.Current());
|
||||
}
|
||||
|
||||
return compShape;
|
||||
return TopoDS_Shape(std::move(compShape));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 32 KiB |
@@ -1199,7 +1199,7 @@ void CmdTechDrawCosmeticEraser::activated(int iMsg)
|
||||
cl2Delete.push_back(tag);
|
||||
} else {
|
||||
Base::Console().Message(
|
||||
"CMD::CosmeticEraserP - edge: %d is confused - source: %d\n",idx,source);
|
||||
"CMD::CosmeticEraser - edge: %d is confused - source: %d\n",idx,source);
|
||||
}
|
||||
}
|
||||
} else if (geomType == "Vertex") {
|
||||
|
||||
@@ -99,7 +99,7 @@ bool ViewProviderRichAnno::setEdit(int ModNum)
|
||||
{
|
||||
// Base::Console().Message("VPRA::setEdit(%d)\n",ModNum);
|
||||
if (ModNum == ViewProvider::Default ) {
|
||||
if (Gui::Control().activeDialog()) { //TaskPanel already open!
|
||||
if (Gui::Control().activeDialog()) { //TaskPanel already open!
|
||||
return false;
|
||||
}
|
||||
Gui::Selection().clearSelection();
|
||||
|
||||
Reference in New Issue
Block a user