]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Adding online help for chamfer
authorClarisse Genrault <cgenrault@is231796.intra.cea.fr>
Wed, 11 Sep 2019 14:04:39 +0000 (16:04 +0200)
committervsv <vsv@opencascade.com>
Wed, 6 Nov 2019 08:22:41 +0000 (11:22 +0300)
13 files changed:
src/FeaturesPlugin/doc/FeaturesPlugin.rst
src/FeaturesPlugin/doc/TUI_chamferDistAngle.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/TUI_chamferDistances.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/chamferFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/chamfer1.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/chamfer2.py [new file with mode: 0644]
src/FeaturesPlugin/doc/images/ChamferDistAngle.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/ChamferDistances.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/chamfer.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/chamfer_dist_angle.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/chamfer_distances.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/chamfer_res_dist_angle.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/chamfer_res_distances.png [new file with mode: 0644]

index 4200c3f2a816b478282e25ea0d2122e63544975f..f701574c7a0d137ee74088fce0e64a379b6e8a8f 100644 (file)
@@ -11,11 +11,12 @@ Features plug-in provides a set of common topological operations. It implements
    :maxdepth: 1
 
    angularCopyFeature.rst
+   chamferFeature.rst
    commonFeature.rst
    cutFeature.rst
    extrusionCutFeature.rst
    extrusionFeature.rst
-   extrusionFuseFeature.
+   extrusionFuseFeature.rst
    filletFeature.rst
    fuseFeature.rst
    fuseFeatureFaces.rst
@@ -31,7 +32,7 @@ Features plug-in provides a set of common topological operations. It implements
    revolutionFeature.rst
    revolutionFuseFeature.rst
    rotationFeature.rst
-   smashFeature.rstrst
+   smashFeature.rst
    splitFeature.rst
    symmetryFeature.rst
    transformationFeature.rst
diff --git a/src/FeaturesPlugin/doc/TUI_chamferDistAngle.rst b/src/FeaturesPlugin/doc/TUI_chamferDistAngle.rst
new file mode 100644 (file)
index 0000000..db62e1d
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_chamfer2:
+
+Create Chamfer by a distance and an angle
+=========================================
+
+.. literalinclude:: examples/chamfer2.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/chamfer2.py >` 
+   
diff --git a/src/FeaturesPlugin/doc/TUI_chamferDistances.rst b/src/FeaturesPlugin/doc/TUI_chamferDistances.rst
new file mode 100644 (file)
index 0000000..b9786ab
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_chamfer1:
+
+Create Chamfer by distances
+===========================
+
+.. literalinclude:: examples/chamfer1.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/chamfer1.py >` 
+   
diff --git a/src/FeaturesPlugin/doc/chamferFeature.rst b/src/FeaturesPlugin/doc/chamferFeature.rst
new file mode 100644 (file)
index 0000000..dae55df
--- /dev/null
@@ -0,0 +1,105 @@
+.. |chamfer.icon|    image:: images/chamfer.png
+
+.. _featureChamfer:
+
+Chamfer
+======
+
+**Chamfer** feature creates chamfers on the edges or on the faces of a shape. 
+
+To create a Chamfer in the active part:
+
+#. select in the Main Menu *Feature - > Chamfer* item  or
+#. click |chamfer.icon| **Chamfer** button in the toolbar
+
+There are 2 types of chamfer:
+
+  .. image:: images/chamfer_distances.png   
+    :align: left
+  chamfer by two distances
+
+  .. image:: images/chamfer_dist_angle.png   
+    :align: left
+  chamfer by a distance and an angle
+
+Chamfer by two distances
+------------------------
+
+The  property panel is shown below.
+
+.. image:: images/ChamferDistances.png
+  :align: center
+
+.. centered::
+  Chamfer by two distances property panel
+
+Input fields:
+
+- **Faces or/and edges** panel contains chamfered faces and edges. All edges of a face are subject to chamfer operation. Faces and edges are selected in 3D OCC viewer;
+- **D1** define the first chamfer distance;
+- **D2** define the second chamfer distance;
+
+**TUI Command**:
+
+.. py:function:: model.addChamfer(Part_doc, [face,edge], perfomDistances, D1, D2)
+
+    :param part: The current part object.
+    :param list: A list of faces and edges subject to fillet operation in format *model.selection(TYPE, shape)*.
+    :param boolean: A "True" flag to indicate that the type of chamfer is by two distances. 
+    :param number: D1 value.
+    :param number: D2 value.
+    :return: Created object.
+
+Result
+""""""
+
+Result of **Chamfer by two distances** is shown below.
+
+.. image:: images/chamfer_res_distances.png
+   :align: center
+
+.. centered::
+   Chamfer by two distances
+
+**See Also** a sample TUI Script of :ref:`tui_create_chamfer1` operation.
+
+Chamfer by a distance and an angle
+----------------------------------
+
+Alternatively, there is a possibility to create a chamfer with a distance and an angle.
+
+.. image:: images/ChamferDistAngle.png
+  :align: center
+
+.. centered::
+  Chamfer by a distance and an angle
+
+Input fields:
+
+- **Faces or/and edges** panel contains filleted faces and edges. All edges of a face are subject to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **D** defines the chamfer distance;  
+- **Angle** defines the chamfer angle.
+
+**TUI Command**:
+
+.. py:function:: model.addChamfer(Part_doc, [face,edge], perfomDistances, D, Angle)
+
+    :param part: The current part object.
+    :param list: A list of faces and edges subject to fillet operation in format *model.selection(TYPE, shape)*.
+    :param boolean: A "False" flag to indicate that the type of chamfer is by a distance and an angle.
+    :param number: D value.
+    :param number: Angle value.
+    :return: Created object.
+
+Result
+""""""
+
+Result of **Chamfer by a distance and an angle** is shown below.
+
+.. image:: images/chamfer_res_dist_angle.png
+   :align: center
+
+.. centered::
+   Chamfer by a distance and an angle
+
+**See Also** a sample TUI Script of :ref:`tui_create_chamfer2` operation.
diff --git a/src/FeaturesPlugin/doc/examples/chamfer1.py b/src/FeaturesPlugin/doc/examples/chamfer1.py
new file mode 100644 (file)
index 0000000..ed603f6
--- /dev/null
@@ -0,0 +1,10 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 20, 20, 20)
+Chamfer_1 = model.addChamfer(Part_1_doc, [model.selection("FACE", "Box_1_1/Top")], True, 2, 2)
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/chamfer2.py b/src/FeaturesPlugin/doc/examples/chamfer2.py
new file mode 100644 (file)
index 0000000..387b60c
--- /dev/null
@@ -0,0 +1,11 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 20, 20, 20)
+Chamfer_1_objects = [model.selection("EDGE", "[Box_1_1/Right][Box_1_1/Top]"), model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]"), model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"), model.selection("EDGE", "[Box_1_1/Back][Box_1_1/Top]")]
+Chamfer_1 = model.addChamfer(Part_1_doc, Chamfer_1_objects, False, 2, 25)
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/images/ChamferDistAngle.png b/src/FeaturesPlugin/doc/images/ChamferDistAngle.png
new file mode 100644 (file)
index 0000000..444034c
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/ChamferDistAngle.png differ
diff --git a/src/FeaturesPlugin/doc/images/ChamferDistances.png b/src/FeaturesPlugin/doc/images/ChamferDistances.png
new file mode 100644 (file)
index 0000000..3bd9f06
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/ChamferDistances.png differ
diff --git a/src/FeaturesPlugin/doc/images/chamfer.png b/src/FeaturesPlugin/doc/images/chamfer.png
new file mode 100644 (file)
index 0000000..3fcc3a4
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/chamfer.png differ
diff --git a/src/FeaturesPlugin/doc/images/chamfer_dist_angle.png b/src/FeaturesPlugin/doc/images/chamfer_dist_angle.png
new file mode 100644 (file)
index 0000000..7ba6e83
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/chamfer_dist_angle.png differ
diff --git a/src/FeaturesPlugin/doc/images/chamfer_distances.png b/src/FeaturesPlugin/doc/images/chamfer_distances.png
new file mode 100644 (file)
index 0000000..2e67ab1
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/chamfer_distances.png differ
diff --git a/src/FeaturesPlugin/doc/images/chamfer_res_dist_angle.png b/src/FeaturesPlugin/doc/images/chamfer_res_dist_angle.png
new file mode 100644 (file)
index 0000000..9d4d8f5
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/chamfer_res_dist_angle.png differ
diff --git a/src/FeaturesPlugin/doc/images/chamfer_res_distances.png b/src/FeaturesPlugin/doc/images/chamfer_res_distances.png
new file mode 100644 (file)
index 0000000..0b6c648
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/chamfer_res_distances.png differ