From: Sergey POKHODENKO Date: Sat, 5 Dec 2015 20:49:23 +0000 (+0300) Subject: Create folder model for sphinx documentation X-Git-Tag: V_2.1.0~206^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=058a30e166a8474c2a8313cf4b5c1ef67bdcca05;p=modules%2Fshaper.git Create folder model for sphinx documentation --- diff --git a/src/PythonAPI/doc/source/boolean.rst b/src/PythonAPI/doc/source/boolean.rst deleted file mode 100644 index abe39727b..000000000 --- a/src/PythonAPI/doc/source/boolean.rst +++ /dev/null @@ -1,15 +0,0 @@ -Boolean -======= - -Create Boolean --------------- - -.. autofunction:: model.addAddition -.. autofunction:: model.addSubtraction -.. autofunction:: model.addIntersection - -Boolean object --------------- - -.. autoclass:: model.features.boolean.Boolean - :members: diff --git a/src/PythonAPI/doc/source/connection.rst b/src/PythonAPI/doc/source/connection.rst deleted file mode 100644 index 5a175fec3..000000000 --- a/src/PythonAPI/doc/source/connection.rst +++ /dev/null @@ -1,9 +0,0 @@ -Connection ----------- - -This feature is only for SALOME. - -Exprot to GEOM -.............. - -.. autofunction:: model.exportToGEOM diff --git a/src/PythonAPI/doc/source/construction.rst b/src/PythonAPI/doc/source/construction.rst deleted file mode 100644 index 8f13053f5..000000000 --- a/src/PythonAPI/doc/source/construction.rst +++ /dev/null @@ -1,37 +0,0 @@ -Construction -============ - -Create construction features. - -Create a point --------------- - -.. autofunction:: model.addPoint - -Point object -............ - -.. autoclass:: model.construction.point.Point - :members: - -Create an axis --------------- - -.. autofunction:: model.addAxis - -Axis object -........... - -.. autoclass:: model.construction.axis.Axis - :members: - -Create a plane --------------- - -.. autofunction:: model.addPlane - -Plane object -............ - -.. autoclass:: model.construction.plane.Plane - :members: diff --git a/src/PythonAPI/doc/source/exchange.rst b/src/PythonAPI/doc/source/exchange.rst deleted file mode 100644 index 737cb7737..000000000 --- a/src/PythonAPI/doc/source/exchange.rst +++ /dev/null @@ -1,26 +0,0 @@ -Exchange -======== - -Export/import features. - -Import objects from a file --------------------------- - -.. autofunction:: model.addImport - -Import object -............. - -.. autoclass:: model.exchange.exchange.Import - :members: - -Export objects to a file ------------------------- - -.. autofunction:: model.exportToFile - -Export object -............. - -.. autoclass:: model.exchange.exchange.Export - :members: diff --git a/src/PythonAPI/doc/source/extrusion.rst b/src/PythonAPI/doc/source/extrusion.rst deleted file mode 100644 index 2f81a25c6..000000000 --- a/src/PythonAPI/doc/source/extrusion.rst +++ /dev/null @@ -1,63 +0,0 @@ -Extrusion -========= - -.. testsetup:: - - import model - model.begin() - partset = model.moduleDocument() - part = model.addPart(partset).document() - plane = model.defaultPlane("XOY") - sketch = model.addSketch(part, plane) - p1 = sketch.addPoint(0, 0) - p2 = sketch.addPoint(0, 1) - p3 = sketch.addPoint(1, 1) - p4 = sketch.addPoint(1, 0) - sketch.addPolygon(p1.pointData(), p2.pointData(), p3.pointData(), p4.pointData()) - -Provided that a sketch has been created before an extrusion can then be created -by the following code: - -.. doctest:: - - >>> base = sketch.selectFace() - >>> extrusion = model.addExtrusion(part, base, 10) - >>> # Modification of the extrusion - >>> extrusion.setSize(20) - -All the ways to create an extrusion and the data access and modification methods -of the extrusion are documented below - -Create an extrusion -------------------- - -.. autofunction:: model.addExtrusion - -Extrusion object -................ - -.. autoclass:: model.features.extrusion.Extrusion - :members: - -Create an Extrusion Bolean --------------------------- - -.. autofunction:: model.addExtrusionCut -.. autofunction:: model.addExtrusionFuse - -Extrusion Boolean object -........................ - -.. autoclass:: model.features.extrusion_boolean.ExtrusionBoolean - :members: - -Create an Extrusion Sketch --------------------------- - -.. autofunction:: model.addExtrusionSketch - -Extrusion Sketch object -....................... - -.. autoclass:: model.features.extrusion_sketch.ExtrusionSketch - :members: diff --git a/src/PythonAPI/doc/source/group.rst b/src/PythonAPI/doc/source/group.rst deleted file mode 100644 index b6765a189..000000000 --- a/src/PythonAPI/doc/source/group.rst +++ /dev/null @@ -1,13 +0,0 @@ -Group -===== - -Create a group --------------- - -.. autofunction:: model.addGroup - -Group object -............ - -.. autoclass:: model.features.group.Group - :members: diff --git a/src/PythonAPI/doc/source/index.rst b/src/PythonAPI/doc/source/index.rst index 91677e73d..8d06304bf 100644 --- a/src/PythonAPI/doc/source/index.rst +++ b/src/PythonAPI/doc/source/index.rst @@ -36,24 +36,10 @@ to modify the feature and retrieve data from it. .. toctree:: :maxdepth: 1 + :glob: sketcher - - connection - construction - exchange - - boolean - partition - extrusion - revolution - placement - rotation - translation - group - - parameter - partset + model/* Indices and tables ================== diff --git a/src/PythonAPI/doc/source/model.rst b/src/PythonAPI/doc/source/model.rst deleted file mode 100644 index 865de2ab2..000000000 --- a/src/PythonAPI/doc/source/model.rst +++ /dev/null @@ -1,101 +0,0 @@ -.. py:module:: model - -Parametric Geometry API -*********************** - -.. automodule:: model - :members: - :special-members: - -Common Modules -============== - -This modules are used by other submodules of Parametric Geometry API. - -roots ------ - -.. automodule:: model.roots - :members: - :special-members: - -services --------- - -.. automodule:: model.services - :members: - :special-members: - -tools ------ - -.. automodule:: model.tools - :members: - :special-members: - -errors ------- - -.. automodule:: model.errors - :members: - :special-members: - -Modules fo Plugins -================== - -connection ----------- - -.. automodule:: model.connection - :members: - :special-members: - -.. autofunction:: model.connection.connection.exportToGEOM - -construction ------------- - -.. automodule:: model.construction - :members: - :special-members: - -exchange --------- - -.. automodule:: model.exchange - :members: - :special-members: - -features --------- - -.. automodule:: model.features - :members: - :special-members: - -parameter -......... - -.. automodule:: model.parameter - :members: - :special-members: - -partset -------- - -.. automodule:: model.partset - :members: - :special-members: - -sketcher --------- - -.. automodule:: model.sketcher - :members: - :special-members: - -.. toctree:: - :maxdepth: 1 - - sketcher - diff --git a/src/PythonAPI/doc/source/model/boolean.rst b/src/PythonAPI/doc/source/model/boolean.rst new file mode 100644 index 000000000..abe39727b --- /dev/null +++ b/src/PythonAPI/doc/source/model/boolean.rst @@ -0,0 +1,15 @@ +Boolean +======= + +Create Boolean +-------------- + +.. autofunction:: model.addAddition +.. autofunction:: model.addSubtraction +.. autofunction:: model.addIntersection + +Boolean object +-------------- + +.. autoclass:: model.features.boolean.Boolean + :members: diff --git a/src/PythonAPI/doc/source/model/connection.rst b/src/PythonAPI/doc/source/model/connection.rst new file mode 100644 index 000000000..5a175fec3 --- /dev/null +++ b/src/PythonAPI/doc/source/model/connection.rst @@ -0,0 +1,9 @@ +Connection +---------- + +This feature is only for SALOME. + +Exprot to GEOM +.............. + +.. autofunction:: model.exportToGEOM diff --git a/src/PythonAPI/doc/source/model/construction.rst b/src/PythonAPI/doc/source/model/construction.rst new file mode 100644 index 000000000..8f13053f5 --- /dev/null +++ b/src/PythonAPI/doc/source/model/construction.rst @@ -0,0 +1,37 @@ +Construction +============ + +Create construction features. + +Create a point +-------------- + +.. autofunction:: model.addPoint + +Point object +............ + +.. autoclass:: model.construction.point.Point + :members: + +Create an axis +-------------- + +.. autofunction:: model.addAxis + +Axis object +........... + +.. autoclass:: model.construction.axis.Axis + :members: + +Create a plane +-------------- + +.. autofunction:: model.addPlane + +Plane object +............ + +.. autoclass:: model.construction.plane.Plane + :members: diff --git a/src/PythonAPI/doc/source/model/exchange.rst b/src/PythonAPI/doc/source/model/exchange.rst new file mode 100644 index 000000000..737cb7737 --- /dev/null +++ b/src/PythonAPI/doc/source/model/exchange.rst @@ -0,0 +1,26 @@ +Exchange +======== + +Export/import features. + +Import objects from a file +-------------------------- + +.. autofunction:: model.addImport + +Import object +............. + +.. autoclass:: model.exchange.exchange.Import + :members: + +Export objects to a file +------------------------ + +.. autofunction:: model.exportToFile + +Export object +............. + +.. autoclass:: model.exchange.exchange.Export + :members: diff --git a/src/PythonAPI/doc/source/model/extrusion.rst b/src/PythonAPI/doc/source/model/extrusion.rst new file mode 100644 index 000000000..2f81a25c6 --- /dev/null +++ b/src/PythonAPI/doc/source/model/extrusion.rst @@ -0,0 +1,63 @@ +Extrusion +========= + +.. testsetup:: + + import model + model.begin() + partset = model.moduleDocument() + part = model.addPart(partset).document() + plane = model.defaultPlane("XOY") + sketch = model.addSketch(part, plane) + p1 = sketch.addPoint(0, 0) + p2 = sketch.addPoint(0, 1) + p3 = sketch.addPoint(1, 1) + p4 = sketch.addPoint(1, 0) + sketch.addPolygon(p1.pointData(), p2.pointData(), p3.pointData(), p4.pointData()) + +Provided that a sketch has been created before an extrusion can then be created +by the following code: + +.. doctest:: + + >>> base = sketch.selectFace() + >>> extrusion = model.addExtrusion(part, base, 10) + >>> # Modification of the extrusion + >>> extrusion.setSize(20) + +All the ways to create an extrusion and the data access and modification methods +of the extrusion are documented below + +Create an extrusion +------------------- + +.. autofunction:: model.addExtrusion + +Extrusion object +................ + +.. autoclass:: model.features.extrusion.Extrusion + :members: + +Create an Extrusion Bolean +-------------------------- + +.. autofunction:: model.addExtrusionCut +.. autofunction:: model.addExtrusionFuse + +Extrusion Boolean object +........................ + +.. autoclass:: model.features.extrusion_boolean.ExtrusionBoolean + :members: + +Create an Extrusion Sketch +-------------------------- + +.. autofunction:: model.addExtrusionSketch + +Extrusion Sketch object +....................... + +.. autoclass:: model.features.extrusion_sketch.ExtrusionSketch + :members: diff --git a/src/PythonAPI/doc/source/model/group.rst b/src/PythonAPI/doc/source/model/group.rst new file mode 100644 index 000000000..b6765a189 --- /dev/null +++ b/src/PythonAPI/doc/source/model/group.rst @@ -0,0 +1,13 @@ +Group +===== + +Create a group +-------------- + +.. autofunction:: model.addGroup + +Group object +............ + +.. autoclass:: model.features.group.Group + :members: diff --git a/src/PythonAPI/doc/source/model/parameter.rst b/src/PythonAPI/doc/source/model/parameter.rst new file mode 100644 index 000000000..6b62c9f9b --- /dev/null +++ b/src/PythonAPI/doc/source/model/parameter.rst @@ -0,0 +1,13 @@ +Parameter +========= + +Create a parameter +------------------ + +.. autofunction:: model.addParameter + +Parameter object +................ + +.. autoclass:: model.parameter.parameter.Parameter + :members: diff --git a/src/PythonAPI/doc/source/model/partition.rst b/src/PythonAPI/doc/source/model/partition.rst new file mode 100644 index 000000000..75c3b7f0b --- /dev/null +++ b/src/PythonAPI/doc/source/model/partition.rst @@ -0,0 +1,13 @@ +Partition +========= + +Create a partition +------------------ + +.. autofunction:: model.addPartition + +Partition object +................ + +.. autoclass:: model.features.partition.Partition + :members: diff --git a/src/PythonAPI/doc/source/model/partset.rst b/src/PythonAPI/doc/source/model/partset.rst new file mode 100644 index 000000000..5427d7f63 --- /dev/null +++ b/src/PythonAPI/doc/source/model/partset.rst @@ -0,0 +1,17 @@ +PartSet +======= + +Manipulate Parts in a PartSet. + +Manipulate a Part +----------------- + +.. autofunction:: model.addPart +.. autofunction:: model.duplicatePart +.. autofunction:: model.removePart + +Part object +........... + +.. autoclass:: model.partset.part.Part + :members: diff --git a/src/PythonAPI/doc/source/model/placement.rst b/src/PythonAPI/doc/source/model/placement.rst new file mode 100644 index 000000000..3834ce7a1 --- /dev/null +++ b/src/PythonAPI/doc/source/model/placement.rst @@ -0,0 +1,13 @@ +Placement +========= + +Create a placement +------------------ + +.. autofunction:: model.addPlacement + +Placement object +................ + +.. autoclass:: model.features.placement.Placement + :members: diff --git a/src/PythonAPI/doc/source/model/revolution.rst b/src/PythonAPI/doc/source/model/revolution.rst new file mode 100644 index 000000000..061904ff9 --- /dev/null +++ b/src/PythonAPI/doc/source/model/revolution.rst @@ -0,0 +1,36 @@ +Revolution +========== + +Create a Revolution +------------------- + +.. autofunction:: model.addRevolution + +Revolution object +................. + +.. autoclass:: model.features.revolution.Revolution + :members: + +Create an Revolution Bolean +--------------------------- + +.. autofunction:: model.addRevolutionCut +.. autofunction:: model.addRevolutionFuse + +Revolution Boolean object +......................... + +.. autoclass:: model.features.revolution_boolean.RevolutionBoolean + :members: + +Create an Revolution Sketch +--------------------------- + +.. autofunction:: model.addRevolutionSketch + +Revolution Sketch object +........................ + +.. autoclass:: model.features.revolution_sketch.RevolutionSketch + :members: diff --git a/src/PythonAPI/doc/source/model/rotation.rst b/src/PythonAPI/doc/source/model/rotation.rst new file mode 100644 index 000000000..70619bb81 --- /dev/null +++ b/src/PythonAPI/doc/source/model/rotation.rst @@ -0,0 +1,13 @@ +Rotation +======== + +Create a rotation +----------------- + +.. autofunction:: model.addRotation + +Rotation object +............... + +.. autoclass:: model.features.rotation.Rotation + :members: diff --git a/src/PythonAPI/doc/source/model/translation.rst b/src/PythonAPI/doc/source/model/translation.rst new file mode 100644 index 000000000..6f3f4a9cc --- /dev/null +++ b/src/PythonAPI/doc/source/model/translation.rst @@ -0,0 +1,13 @@ +Translation +=========== + +Create a translation +-------------------- + +.. autofunction:: model.addTranslation + +Translation object +.................. + +.. autoclass:: model.features.translation.Translation + :members: diff --git a/src/PythonAPI/doc/source/parameter.rst b/src/PythonAPI/doc/source/parameter.rst deleted file mode 100644 index 6b62c9f9b..000000000 --- a/src/PythonAPI/doc/source/parameter.rst +++ /dev/null @@ -1,13 +0,0 @@ -Parameter -========= - -Create a parameter ------------------- - -.. autofunction:: model.addParameter - -Parameter object -................ - -.. autoclass:: model.parameter.parameter.Parameter - :members: diff --git a/src/PythonAPI/doc/source/partition.rst b/src/PythonAPI/doc/source/partition.rst deleted file mode 100644 index 75c3b7f0b..000000000 --- a/src/PythonAPI/doc/source/partition.rst +++ /dev/null @@ -1,13 +0,0 @@ -Partition -========= - -Create a partition ------------------- - -.. autofunction:: model.addPartition - -Partition object -................ - -.. autoclass:: model.features.partition.Partition - :members: diff --git a/src/PythonAPI/doc/source/partset.rst b/src/PythonAPI/doc/source/partset.rst deleted file mode 100644 index 5427d7f63..000000000 --- a/src/PythonAPI/doc/source/partset.rst +++ /dev/null @@ -1,17 +0,0 @@ -PartSet -======= - -Manipulate Parts in a PartSet. - -Manipulate a Part ------------------ - -.. autofunction:: model.addPart -.. autofunction:: model.duplicatePart -.. autofunction:: model.removePart - -Part object -........... - -.. autoclass:: model.partset.part.Part - :members: diff --git a/src/PythonAPI/doc/source/placement.rst b/src/PythonAPI/doc/source/placement.rst deleted file mode 100644 index 3834ce7a1..000000000 --- a/src/PythonAPI/doc/source/placement.rst +++ /dev/null @@ -1,13 +0,0 @@ -Placement -========= - -Create a placement ------------------- - -.. autofunction:: model.addPlacement - -Placement object -................ - -.. autoclass:: model.features.placement.Placement - :members: diff --git a/src/PythonAPI/doc/source/revolution.rst b/src/PythonAPI/doc/source/revolution.rst deleted file mode 100644 index 061904ff9..000000000 --- a/src/PythonAPI/doc/source/revolution.rst +++ /dev/null @@ -1,36 +0,0 @@ -Revolution -========== - -Create a Revolution -------------------- - -.. autofunction:: model.addRevolution - -Revolution object -................. - -.. autoclass:: model.features.revolution.Revolution - :members: - -Create an Revolution Bolean ---------------------------- - -.. autofunction:: model.addRevolutionCut -.. autofunction:: model.addRevolutionFuse - -Revolution Boolean object -......................... - -.. autoclass:: model.features.revolution_boolean.RevolutionBoolean - :members: - -Create an Revolution Sketch ---------------------------- - -.. autofunction:: model.addRevolutionSketch - -Revolution Sketch object -........................ - -.. autoclass:: model.features.revolution_sketch.RevolutionSketch - :members: diff --git a/src/PythonAPI/doc/source/rotation.rst b/src/PythonAPI/doc/source/rotation.rst deleted file mode 100644 index 70619bb81..000000000 --- a/src/PythonAPI/doc/source/rotation.rst +++ /dev/null @@ -1,13 +0,0 @@ -Rotation -======== - -Create a rotation ------------------ - -.. autofunction:: model.addRotation - -Rotation object -............... - -.. autoclass:: model.features.rotation.Rotation - :members: diff --git a/src/PythonAPI/doc/source/translation.rst b/src/PythonAPI/doc/source/translation.rst deleted file mode 100644 index 6f3f4a9cc..000000000 --- a/src/PythonAPI/doc/source/translation.rst +++ /dev/null @@ -1,13 +0,0 @@ -Translation -=========== - -Create a translation --------------------- - -.. autofunction:: model.addTranslation - -Translation object -.................. - -.. autoclass:: model.features.translation.Translation - :members: diff --git a/src/PythonAPI/geom/missed.py b/src/PythonAPI/geom/missed.py index f5a6cfca8..247cfef3a 100644 --- a/src/PythonAPI/geom/missed.py +++ b/src/PythonAPI/geom/missed.py @@ -2,7 +2,7 @@ # Author: Daniel Brunier-Coulin # ----------------------------- -from GeomAPI import * +#from GeomAPI import * class Ax3: diff --git a/src/PythonAPI/model/features/boolean.py b/src/PythonAPI/model/features/boolean.py index 89ce1fd6b..ef294346e 100644 --- a/src/PythonAPI/model/features/boolean.py +++ b/src/PythonAPI/model/features/boolean.py @@ -3,13 +3,8 @@ Author: Daniel Brunier-Coulin Copyright (C) 2014-20xx CEA/DEN, EDF R&D """ -from ModelAPI import * -from GeomAlgoAPI import * - - from model.roots import Interface - def addAddition(part, *args): """Inserts an addition to the given Part and executes the operation. This operation adds tool to the given object.