Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / doc / general_architecture.doc
1 /*!
2 \page general_architecture General Architecture
3
4 NewGeom is made of Workshop (see XGUI_Workshop) which loads a Module, connecting its features with GUI, providing it with services for launching of operations, tools for user inputs and visualisation of results. The Module can consist of one or several plug-ins which provide implementation of Module features. Each plug-in can implement one or several features. These features can be structured by Workbenches within Workshop. Workshop provides introducing of these Workbenches within main window in form of menus or/and tool bars.
5 \n
6 Workshop interacts with a Module with help of specific interface defined in ModuleBase package. Each module for NewGeom application has to implement ModuleBase_IModile interface.
7 \n
8 A Module manages a one document (ModelAPI_Document). This document consists of a one root document and several, loaded by request, sub-documents. Each sub-document can be stored in a single file. 
9 \n
10
11 <b>Main features of the general architecture of New GEOM:</b>
12 <ul>
13 <li> New GEOM consists of a one Module running within a Workshop.</li>
14 <li> This Module produces one type of Document only.</li>
15 <li> This Document consists of a main document and several sub-documents which can be stored and loaded as separated files.</li>
16 <li> A Module is made of one or several Plug-ins implementing Features supported of the Module.</li>
17 <li> These Features are structured by Workbenches.</li>
18 <li> The Module communicates with the Workshop through Interfaces.</li>
19 <li> The API of New GEOM consists of the Interface of the Workshop and of Modules.</li>
20 <li> A configuration file describes the composition of the Workshop where the Module and Plug-ins are referenced by their unique names.</li>
21 </ul>
22 \n\n
23 \image html general_architecture_1.png
24 \n\n
25 For today there is a one implementation of NewGeom module which implements Part Set functionality (PartSet_Module).
26 The geometric model (i.e. the whole geometry produce by New GEOM) is created through operations, or features (ModelAPI_Feature), which define a meaningful piece of design (see \ref Plugins group). In order to easily create dedicated variants of the modeler, also to gradually develop New GEOM, each feature is implemented in a <i>Plug-in</i> (ModelAPI_Plugin, a piece of application including its own GUI, built separately from the application. It is loaded dynamically to the application). In other words, a Module is made of a collection of Plug-ins.
27 Each sub-document contains a data of a one Part. When the user saves its session, all documents are saved: the PartSet and each Part.
28 \n
29 New GEOM is used either as a stand-alone application or as a Module integrated to the SALOME environment in order to, ultimately, replace the old GEOM.
30
31 <h2>Stand-alone New GEOM</h2>
32
33 In case of using as a standalone application, Workshop uses an application main window implementing the general ergonomics of New GEOM (see \ref Desktop group), including the layout of the user interface, organization of menus, runtime help, etc.
34 \n
35 The Workshop structures the features by related functionality presented in a tabbed panels Workbenches. Each tab displays a set of available actions. These sets of features are called below <i>Workbenches</i>.
36 \n\n
37
38
39 <h2>New GEOM as SALOME module</h2>
40
41 The NewGeom package allows to launch the application as one of the module of SALOME platform. In that case all user interface elements are integrated into SALOME platform: the \ref Salome package is used for this connection.
42 \n
43 To integrate New GEOM into SALOME the next steps are done:
44 <ol>
45 <li> LightApp_Module class from SALOME GUI LightApp package is redefined (see NewGeom_Module). This redefined class provides a connection between LightApp_Module interface and Workshop object of the application.</li>
46 <li>Provide Workshop with a <i>SALOME</i> mode of launching in SALOME environment. In this case it is launched without its own main window, 3d viewer and main menu.</li>
47 <li>In <i>SALOME</i> mode workshop uses:
48   <ol>
49   <li>SALOME desktop as a main window.</li>
50   <li>OCC viewer from SALOME platform instead of its own 3d viewer.</li>
51   <li>SALOME main menu and tool bars for creation of workbenches commands.</li>
52   <li>Object Browser of New GEOM application is used instead of SALOME Object Browser.</li>
53   <li>Creation of a New GEOM property panel as a docking window of SALOME desktop.</li>
54   <li>Use SALOME Python console instead of console in main window. Since 3 packages from SALOME GUI module become shared between this project and SALOME modules and they are independent from other SALOME parts, it is proposed in the future to detach it from SALOME platform into separated prerequisite product to avoid code duplication.</li>
55   </ol>
56 </li>
57 <li>Each workbench is defined as a menu in main menu bar of SALOME desktop and as a tool bar with corresponded title.</li>
58 <li>Each feature in the workbench is defined as a menu item in the corresponded menu and a button in the corresponded tool bar.</li>
59 <li>Object Browser of SALOME is hidden on activation of NewGEOM and restored on its deactivation.</li>
60 <li>Object Browser and Property panel of NewGEOM is shown on activation of the module and hidden on its deactivation.</li>
61 <li>Persistent of NewGEOM is compatible with persistent of SALOME. On saving of SALOME study the content of NewGEOM data structure is saved into study also and restored on restoring of study.</li>
62 </ol>
63
64 */