.. _script: With scripts ===================================== « Bloc Fissure » has a script mode which is very close to the :ref:`GUI `, in the sense that the same information is needed as input.This documentation aims at giving an example and explains how to generate a cracked mesh using a python script calling « Bloc Fissure » functions. There are several others functions available in « Bloc Fissure » but they are not documented in this documentation. The main command of « Bloc Fissure » is the casStandard function. It has a single argument which is a python dictionary with the following keys. All are mandatory parameters except those marked by /. +------------------------------------------------------------------------------------------------------------------+ | Script parameters | +======================+===================================+=======================================================+ | / **nomCas** | *[string, default=’casStandard’]* | Name of the problem | +----------------------+-----------------------------------+-------------------------------------------------------+ | **maillageSain** | *[string]* | Absolute address of the input structure 3D mesh | | | | in MED format | +----------------------+-----------------------------------+-------------------------------------------------------+ | **CAOFaceFissure** | *[string]* | Absolute address of the input crack geometry | | | | in XAO or BREP format | +----------------------+-----------------------------------+-------------------------------------------------------+ | **edgeFiss** | *[list of strings]* | List of edges group which define the crack front | +----------------------+-----------------------------------+-------------------------------------------------------+ | | *[list of integers]* | List of edges number which define the crack front | +----------------------+-----------------------------------+-------------------------------------------------------+ | **meshBrep** | *[list of 2 floats]* | List of two floats defining respectively minimum and | | | | maximum size of elements of the crack mesh | +----------------------+-----------------------------------+-------------------------------------------------------+ | **lgInfluence** | *[float]* | Length of influence - distance that defines the | | | | size of the extracted Box around the crack | +----------------------+-----------------------------------+-------------------------------------------------------+ | **rayonPipe** | *[float]* | Radius of the tore around the front | | | | | +----------------------+-----------------------------------+-------------------------------------------------------+ | / **lenSegPipe** | *[float, default=rayonPipe]* | Length of the segments of the tore along crack front | | | | | +----------------------+-----------------------------------+-------------------------------------------------------+ | **nbSegRad** | *[integer]* | Number of radial segment of the tore | | | | | +----------------------+-----------------------------------+-------------------------------------------------------+ | **nbSegCercle** | *[integer]* | Number of sectors of the tore | | | | | +----------------------+-----------------------------------+-------------------------------------------------------+ | **areteFaceFissure** | *[float]* | Mesh size of elements for the Box remeshing | | | | | +----------------------+-----------------------------------+-------------------------------------------------------+ Geometrical parameters of the tore are illustrated : .. image:: images/parametres.png :width: 350 :align: center :alt: Geometrical parameters of the tore Different levels of verbose are available. The prints are located in the file ''LOGFILE''. Use one of this 4 optional functions to set verbose type: - / **setDebug(LOGFILE)** - / **setVerbose(LOGFILE)** - / **setRelease(LOGFILE)** - / **setUnitTests(LOGFILE)** **example to run in salome session**:: from blocFissure import gmu from blocFissure.gmu import initLog initLog.setDebug("/tmp/blocFissure.log") from blocFissure.casStandard import casStandard dicoParams = dict(nomCas = 'cubeFiss', maillageSain = "/home/A123456/BF/cube.med", CAOFaceFissure = "/home/A123456/BF/fiss.xao", edgeFiss = ["Fond"], lgInfluence = 20., meshBrep = (5.,10.), rayonPipe = 5., lenSegPipe = 5, nbSegRad = 5, nbSegCercle = 32, areteFaceFissure = 5) execInstance = casStandard(dicoParams) newmesh = execInstance.maillageFissure