]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Update README ehm/shaperecogn 17/head
authorEl Hadi Moussi <moussi@phimeca.com>
Tue, 13 Aug 2024 09:33:03 +0000 (11:33 +0200)
committerEl Hadi Moussi <moussi@phimeca.com>
Tue, 13 Aug 2024 09:33:03 +0000 (11:33 +0200)
src/ShapeRecogn/README.md

index a9f17c589dc42c794c57a698a4dfc310da9fcba4..61b9eb4d0b9afb8569dd2899f37657eb9b50dadc 100644 (file)
@@ -14,8 +14,9 @@ A tool leveraging the MEDCoupling library for recognizing canonical shapes in 3D
 ```python
 >> import ShapeRecogn as sr
 >>
->> shape_recogn = sr.ShapeRecognMesh("resources/ShapeRecognCone.med")
->> shape_recogn.recognize("ShapeRecognCone_areas.med")
+>> shape_recogn_builder = sr.ShapeRecognMeshBuilder("resources/ShapeRecognCone.med")
+>> shape_recogn = shape_recogn_builder.recognize()
+>> shape_recogn.save("ShapeRecognCone_areas.med")
 ```
 
 ### Without output file
@@ -23,9 +24,9 @@ A tool leveraging the MEDCoupling library for recognizing canonical shapes in 3D
 ```python
 >> import ShapeRecogn as sr
 >>
->> shape_recogn = sr.ShapeRecognMesh("resources/ShapeRecognCone.med")
->> shape_recogn.recognize()
->> radius_field = shape_recogn.buildRadius()
+>> shape_recogn_builder = sr.ShapeRecognMeshBuilder("resources/ShapeRecognCone.med")
+>> shape_recogn = shape_recogn_builder.recognize()
+>> radius_field = shape_recogn.getRadius()
 >> radius_field
 MEDCouplingFieldDouble C++ instance at 0x55f3418c6700. Name : "Radius (Area)".
 Nature of field : NoNature.
@@ -89,17 +90,17 @@ Some intermediate computation values concerning the nodes are also available:
  - Primitive Type (Node) : One of the canonical shape with the id describe above. The primitive type is deduced usint K1 and K2 values.
  - Normal (Node): Normal of the nodes using neighbor nodes
 
-Each field can be respectively build as a `MEDCouplingDoubleField` using the following methods of the `ShapeRecognMesh` class:
- - `buildAreaId()`
- - `buildAreaPrimitiveType()`
- - `buildAreaNormal()`
- - `buildMinorRadius()`
- - `buildRadius()`
- - `buildAngle()`
- - `buildCenter()`
- - `buildAxis()`
- - `buildApex()`
- - `buildNodeK1()`
- - `buildNodeK2()`
- - `buildNodePrimitiveType()`
- - `buildNodeNormal()`
+Each field can be retrieved as a `MEDCouplingDoubleField` using the following methods of the `ShapeRecognMesh` class:
+ - `getAreaId()`
+ - `getAreaPrimitiveType()`
+ - `getAreaNormal()`
+ - `getMinorRadius()`
+ - `getRadius()`
+ - `getAngle()`
+ - `getCenter()`
+ - `getAxis()`
+ - `getApex()`
+ - `getNodeK1()`
+ - `getNodeK2()`
+ - `getNodePrimitiveType()`
+ - `getNodeNormal()`