Salome HOME
bos #20646 [CEA] Fix error in polyhedron per solid on pentahedron
[modules/smesh.git] / src / Tools / blocFissure / doc / scripts.rst
1 .. _script:\r
2 \r
3 With scripts\r
4 =====================================\r
5 \r
6 « Bloc Fissure » has a script mode which is very close to the :ref:`GUI <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.\r
7 \r
8 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 /.\r
9 \r
10 +------------------------------------------------------------------------------------------------------------------+\r
11 |       Script parameters                                                                                          |\r
12 +======================+===================================+=======================================================+\r
13 | / **nomCas**         | *[string, default=’casStandard’]* |  Name of the problem                                  |\r
14 +----------------------+-----------------------------------+-------------------------------------------------------+\r
15 | **maillageSain**     | *[string]*                        |  Absolute address of the input structure 3D mesh      |\r
16 |                      |                                   |  in MED format                                        |\r
17 +----------------------+-----------------------------------+-------------------------------------------------------+\r
18 | **BrepFaceFissure**  | *[string]*                        |  Absolute address of the input crack geometry         |\r
19 |                      |                                   |  in BREP format                                       |\r
20 +----------------------+-----------------------------------+-------------------------------------------------------+\r
21 | **edgeFissIds**      | *[list of integers]*              |  List of edges number which define the crack front    |\r
22 +----------------------+-----------------------------------+-------------------------------------------------------+\r
23 | **meshBrep**         | *[list of 2 floats]*              |  List of two floats defining respectively minimum and |\r
24 |                      |                                   |  maximum size of elements of the crack mesh           |\r
25 +----------------------+-----------------------------------+-------------------------------------------------------+\r
26 | **lgInfluence**      | *[float]*                         |  Length of influence - distance that defines the      |\r
27 |                      |                                   |  size of the extracted Box around the crack           |\r
28 +----------------------+-----------------------------------+-------------------------------------------------------+\r
29 | **rayonPipe**        | *[float]*                         |  Radius of the tore around the front                  |\r
30 |                      |                                   |                                                       |\r
31 +----------------------+-----------------------------------+-------------------------------------------------------+\r
32 | / **lenSegPipe**     | *[float, default=rayonPipe]*      |  Length of the segments of the tore along crack front |\r
33 |                      |                                   |                                                       |\r
34 +----------------------+-----------------------------------+-------------------------------------------------------+\r
35 |  **nbSegRad**        | *[integer]*                       |  Number of radial segment of the tore                 |\r
36 |                      |                                   |                                                       |\r
37 +----------------------+-----------------------------------+-------------------------------------------------------+\r
38 | **nbSegCercle**      | *[integer]*                       |  Number of sectors of the tore                        |\r
39 |                      |                                   |                                                       |\r
40 +----------------------+-----------------------------------+-------------------------------------------------------+\r
41 | **areteFaceFissure** | *[float]*                         |  Mesh size of elements for the Box remeshing          |\r
42 |                      |                                   |                                                       |\r
43 +----------------------+-----------------------------------+-------------------------------------------------------+\r
44 \r
45 Geometrical parameters of the tore are illustrated :\r
46 \r
47 .. image:: images/parametres.png\r
48    :width: 350\r
49    :align: center\r
50 \r
51 Different levels of verbose are available. Use one of this 4 optional functions to set verbose type:\r
52 \r
53 - / **setDebug()**\r
54 \r
55 - / **setVerbose()**\r
56 \r
57 - / **setRelease()**\r
58 \r
59 - / **setUnitTests()**\r
60 \r
61 **example to run in salome session**::\r
62 \r
63   from blocFissure import gmu\r
64   from blocFissure.gmu import initLog\r
65   initLog.setDebug()\r
66 \r
67   from blocFissure.casStandard import casStandard\r
68 \r
69   dicoParams = dict(nomCas            = 'cubeFiss',\r
70                     maillageSain      = "/home/A123456/BF/cube.med",\r
71                     brepFaceFissure   = "/home/A123456/BF/fiss.brep",\r
72                     edgeFissIds       = [4],\r
73                     lgInfluence       = 20.,\r
74                     meshBrep          = (5.,10.),\r
75                     rayonPipe         = 5.,\r
76                     lenSegPipe        = 5,\r
77                     nbSegRad          = 5,\r
78                     nbSegCercle       = 32,\r
79                     areteFaceFissure  = 5)\r
80 \r
81   execInstance = casStandard(dicoParams)\r
82 \r
83 \r
84 \r
85 \r
86 \r