From: Clarisse Genrault Date: Wed, 11 Sep 2019 14:04:39 +0000 (+0200) Subject: Adding online help for chamfer X-Git-Tag: V9_4_0a2~8^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a371561662322ce986218f184a0611cade63b83e;p=modules%2Fshaper.git Adding online help for chamfer --- diff --git a/src/FeaturesPlugin/doc/FeaturesPlugin.rst b/src/FeaturesPlugin/doc/FeaturesPlugin.rst index 4200c3f2a..f701574c7 100644 --- a/src/FeaturesPlugin/doc/FeaturesPlugin.rst +++ b/src/FeaturesPlugin/doc/FeaturesPlugin.rst @@ -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 index 000000000..db62e1d88 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_chamferDistAngle.rst @@ -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 ` + diff --git a/src/FeaturesPlugin/doc/TUI_chamferDistances.rst b/src/FeaturesPlugin/doc/TUI_chamferDistances.rst new file mode 100644 index 000000000..b9786abe9 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_chamferDistances.rst @@ -0,0 +1,12 @@ + + .. _tui_create_chamfer1: + +Create Chamfer by distances +=========================== + +.. literalinclude:: examples/chamfer1.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/chamferFeature.rst b/src/FeaturesPlugin/doc/chamferFeature.rst new file mode 100644 index 000000000..dae55dfb0 --- /dev/null +++ b/src/FeaturesPlugin/doc/chamferFeature.rst @@ -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 index 000000000..ed603f6c6 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/chamfer1.py @@ -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 index 000000000..387b60cb0 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/chamfer2.py @@ -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 index 000000000..444034c3a 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 index 000000000..3bd9f0652 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 index 000000000..3fcc3a479 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 index 000000000..7ba6e8383 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 index 000000000..2e67ab1f0 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 index 000000000..9d4d8f5e8 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 index 000000000..0b6c64842 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/chamfer_res_distances.png differ