Functions | |
def | DegreesToRadians |
Convert an angle from degrees to radians. More... | |
def | ParseParameters |
Return list of variable values from salome notebook. More... | |
def | ParseAngles |
Parse parameters while converting variables to radians. More... | |
def | __initPointStruct |
Substitute PointStruct.__init__() to create SMESH.PointStruct using notebook variables. More... | |
def | __initAxisStruct |
Substitute AxisStruct.__init__() to create SMESH.AxisStruct using notebook variables. More... | |
def | IsEqual |
Compare real values using smeshPrecisionConfusion as tolerance. More... | |
def | GetName |
Return object name. More... | |
def | TreatHypoStatus |
Print error message if a hypothesis was not assigned. More... | |
def | AssureGeomPublished |
Private method. More... | |
def | FirstVertexOnCurve |
Return the first vertex of a geometrical edge by ignoring orientation. More... | |
def | DumpPython |
Dump component to the Python script This method overrides IDL function to allow default values for the parameters. More... | |
def | SetDumpPythonHistorical |
Set mode of DumpPython(), historical or snapshot. More... | |
def | init_smesh |
Set the current study and Geometry component. More... | |
def | EnumToLong |
Return a long value from enumeration. More... | |
def | ColorToString |
Return a string representation of the color. More... | |
def | GetPointStruct |
Get PointStruct from vertex. More... | |
def | GetDirStruct |
Get DirStruct from vector. More... | |
def | MakeDirStruct |
Make DirStruct from a triplet. More... | |
def | GetAxisStruct |
Get AxisStruct from object. More... | |
def | SetName |
Set the given name to the object. More... | |
def | SetEmbeddedMode |
Set the current mode. More... | |
def | IsEmbeddedMode |
Get the current mode. More... | |
def | SetCurrentStudy |
Set the current study. More... | |
def | GetCurrentStudy |
Get the current study. More... | |
def | GetSubShapesId |
Return IDs of sub-shapes. More... | |
def | SetBoundaryBoxSegmentation |
Set number of segments per diagonal of boundary box of geometry, by which default segment length of appropriate 1D hypotheses is defined in GUI. More... | |
def | GetSubShapeName |
Return a name of a sub-shape by its ID. More... | |
def | GetLog |
Return the log of nodes and elements added or removed since the previous clear of the log. More... | |
def | ClearLog |
Clear the log of nodes and elements added or removed since the previous clear. More... | |
def | GetId |
Get the internal ID. More... | |
def | GetStudyId |
Get the study Id. More... | |
def | GetIDSource |
Wrap a list of IDs of elements or nodes into SMESH_IDSource which can be passed as argument to a method accepting mesh, group or sub-mesh. More... | |
Variables | |
notebook = salome_notebook.notebook | |
string | var_separator = ":" |
int | smeshPrecisionConfusion = 1 |
string | NO_NAME = "NoName" |
def smeshBuilder.DegreesToRadians | ( | AngleInDegrees | ) |
Convert an angle from degrees to radians.
def smeshBuilder.ParseParameters | ( | args | ) |
Return list of variable values from salome notebook.
The last argument, if is callable, is used to modify values got from notebook
def smeshBuilder.ParseAngles | ( | args | ) |
Parse parameters while converting variables to radians.
References smeshBuilder.ParseParameters().
|
private |
Substitute PointStruct.__init__() to create SMESH.PointStruct using notebook variables.
Parameters are stored in PointStruct.parameters attribute
References smeshBuilder.ParseParameters().
|
private |
Substitute AxisStruct.__init__() to create SMESH.AxisStruct using notebook variables.
Parameters are stored in AxisStruct.parameters attribute
References smeshBuilder.ParseParameters().
def smeshBuilder.IsEqual | ( | val1, | |
val2, | |||
tol = smeshPrecisionConfusion |
|||
) |
Compare real values using smeshPrecisionConfusion as tolerance.
def smeshBuilder.GetName | ( | obj | ) |
Return object name.
def smeshBuilder.TreatHypoStatus | ( | status, | |
hypName, | |||
geomName, | |||
isAlgo, | |||
mesh | |||
) |
Print error message if a hypothesis was not assigned.
References smeshBuilder.GetName().
def smeshBuilder.AssureGeomPublished | ( | mesh, | |
geom, | |||
name = '' |
|||
) |
Private method.
Add geom (sub-shape of the main shape) into the study if not yet there
def smeshBuilder.FirstVertexOnCurve | ( | mesh, | |
edge | |||
) |
Return the first vertex of a geometrical edge by ignoring orientation.
def DumpPython | ( | self, | |
theStudy, | |||
theIsPublished = True , |
|||
theIsMultiFile = True |
|||
) |
Dump component to the Python script This method overrides IDL function to allow default values for the parameters.
def SetDumpPythonHistorical | ( | self, | |
isHistorical | |||
) |
Set mode of DumpPython(), historical or snapshot.
In the historical mode, the Python Dump script includes all commands performed by SMESH engine. In the snapshot mode, commands relating to objects removed from the Study are excluded from the script as well as commands not influencing the current state of meshes
def init_smesh | ( | self, | |
theStudy, | |||
geompyD = None |
|||
) |
Set the current study and Geometry component.
References smeshBuilder.SetCurrentStudy().
def EnumToLong | ( | self, | |
theItem | |||
) |
Return a long value from enumeration.
def ColorToString | ( | self, | |
c | |||
) |
Return a string representation of the color.
To be used with filters.
c | color value (SALOMEDS.Color) |
def GetPointStruct | ( | self, | |
theVertex | |||
) |
Get PointStruct from vertex.
theVertex | a GEOM object(vertex) |
def GetDirStruct | ( | self, | |
theVector | |||
) |
Get DirStruct from vector.
theVector | a GEOM object(vector) |
def MakeDirStruct | ( | self, | |
x, | |||
y, | |||
z | |||
) |
Make DirStruct from a triplet.
x,y,z | vector components |
def GetAxisStruct | ( | self, | |
theObj | |||
) |
Get AxisStruct from object.
theObj | a GEOM object (line or plane) |
def SetName | ( | self, | |
obj, | |||
name | |||
) |
Set the given name to the object.
obj | the object to rename |
name | a new object name |
def SetEmbeddedMode | ( | self, | |
theMode | |||
) |
Set the current mode.
def IsEmbeddedMode | ( | self | ) |
Get the current mode.
def SetCurrentStudy | ( | self, | |
theStudy, | |||
geompyD = None |
|||
) |
Set the current study.
Calling SetCurrentStudy( None ) allows to switch OFF automatic pubilishing in the Study of mesh objects.
def GetCurrentStudy | ( | self | ) |
Get the current study.
def GetSubShapesId | ( | self, | |
theMainObject, | |||
theListOfSubObjects | |||
) |
Return IDs of sub-shapes.
def SetBoundaryBoxSegmentation | ( | self, | |
nbSegments | |||
) |
Set number of segments per diagonal of boundary box of geometry, by which default segment length of appropriate 1D hypotheses is defined in GUI.
Default value is 10.
def GetSubShapeName | ( | self, | |
subShapeID | |||
) |
Return a name of a sub-shape by its ID.
subShapeID | a unique ID of a sub-shape |
References Mesh.GetShape().
def GetLog | ( | self, | |
clearAfterGet | |||
) |
Return the log of nodes and elements added or removed since the previous clear of the log.
clearAfterGet | log is emptied after Get (safe if concurrents access) |
def ClearLog | ( | self | ) |
Clear the log of nodes and elements added or removed since the previous clear.
Must be used immediately after GetLog if clearAfterGet is false.
def GetId | ( | self | ) |
Get the internal ID.
def GetStudyId | ( | self | ) |
Get the study Id.
def GetIDSource | ( | self, | |
ids, | |||
elemType = SMESH.ALL |
|||
) |
Wrap a list of IDs of elements or nodes into SMESH_IDSource which can be passed as argument to a method accepting mesh, group or sub-mesh.
ids | list of IDs |
elemType | type of elements; this parameter is used to distinguish IDs of nodes from IDs of elements; by default ids are treated as IDs of elements; use SMESH.NODE if ids are IDs of nodes. |
notebook = salome_notebook.notebook |
string var_separator = ":" |
int smeshPrecisionConfusion = 1 |
string NO_NAME = "NoName" |