mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
Initial version of files for OCC developers
This commit is contained in:
parent
99d2c1048c
commit
ca135511fb
@ -498,6 +498,10 @@ void SMESHGUI_GroupDlg::onGrpTypeChanged(int id)
|
||||
//=================================================================================
|
||||
void SMESHGUI_GroupDlg::setSelectionMode(int theMode)
|
||||
{
|
||||
// PAL7314
|
||||
if (myMesh->_is_nil())
|
||||
return;
|
||||
|
||||
if (mySelectionMode != theMode) {
|
||||
mySelection->ClearIObjects();
|
||||
mySelection->ClearFilters();
|
||||
|
@ -37,7 +37,7 @@ class MeshHexaImpl:
|
||||
# - hypothesis "NumberOfSegments" with number of segments <n>
|
||||
# --------------------
|
||||
|
||||
def Mesh1D(self, shape, n):
|
||||
def Mesh1D(self, shape, n, propagate=0):
|
||||
hyp1D=smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
|
||||
smeshgui.SetName(salome.ObjectToID(hyp1D), self.name+"/WireDiscretisation/"+str(self.cpt))
|
||||
self.mesh.AddHypothesis(shape, hyp1D)
|
||||
@ -47,6 +47,11 @@ class MeshHexaImpl:
|
||||
smeshgui.SetName(salome.ObjectToID(hyp), self.name+"/Segments_"+str(n)+"/"+str(self.cpt))
|
||||
self.mesh.AddHypothesis(shape, hyp)
|
||||
|
||||
if propagate:
|
||||
hypPro=smesh.CreateHypothesis("Propagation", "libStdMeshersEngine.so")
|
||||
smeshgui.SetName(salome.ObjectToID(hypPro), self.name+"/Propagation/"+str(self.cpt))
|
||||
self.mesh.AddHypothesis(shape, hypPro)
|
||||
|
||||
self.cpt=self.cpt+1
|
||||
|
||||
# Constructor
|
||||
@ -93,6 +98,20 @@ class MeshHexaImpl:
|
||||
submesh = self.mesh.GetSubMesh(edge, self.name+"/SubMeshEdge/"+str(self.cpt))
|
||||
self.Mesh1D(edge, n)
|
||||
|
||||
# Creates sub-mesh of the mesh, created by constructor.
|
||||
# This sub-mesh will be created on edge <edge> and propagate the hypothesis on all correspondant edges.
|
||||
# Set algorithm and hypothesis for 1D discretization of the <edge> and all other propagate edges:
|
||||
# - algorithm "Regular_1D"
|
||||
# - hypothesis "NumberOfSegments" with number of segments <n>
|
||||
# - hypothesis "Propagation" with number of segments <n>
|
||||
# Note: the <edge> will be automatically published in study under the shape, given in constructor.
|
||||
# --------------------
|
||||
|
||||
def Propagate(self, edge, n):
|
||||
geompy.addToStudyInFather(self.piece, edge, geompy.SubShapeName(edge, self.piece))
|
||||
submesh = self.mesh.GetSubMesh(edge, self.name+"/SubMeshEdge/"+str(self.cpt))
|
||||
self.Mesh1D(edge, n, 1)
|
||||
|
||||
# Computes mesh, created by constructor.
|
||||
# --------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user