From: azv Date: Thu, 30 Jan 2020 12:53:06 +0000 (+0300) Subject: Issue #17342: 3D Model defeaturing X-Git-Tag: V9_5_0a1~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f51be56206268bea1f4b376adb6d88c16dfb315b;p=modules%2Fshaper.git Issue #17342: 3D Model defeaturing * Translation to French and Russian * Documentation --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts b/src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts index df8d45ad1..71f2863f6 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts +++ b/src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts @@ -248,6 +248,42 @@ + + + Defeaturing + + Defeaturing + Vaincre + + + Faces to remove + Visages à retirer + + + Select faces + Sélectionnez des faces + + + + Defeaturing:FeaturesPlugin_ValidatorDefeaturingSelection + + Error: This validator can only work with selection list attributes. + Erreur: ce validateur ne peut fonctionner qu'avec des attributs de liste de sélection. + + + Error: Empty attribute selection. + La sélection d'attribut est vide. + + + Error: Empty selection context. + Erreur: contexte de sélection vide. + + + Error: Not all selected shapes are sub-shapes of solids. + Erreur: toutes les formes sélectionnées ne sont pas des sous-formes de solides. + + + Extrusion diff --git a/src/FeaturesPlugin/FeaturesPlugin_msg_ru.ts b/src/FeaturesPlugin/FeaturesPlugin_msg_ru.ts index 690108637..4e52f4527 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_msg_ru.ts +++ b/src/FeaturesPlugin/FeaturesPlugin_msg_ru.ts @@ -141,4 +141,40 @@ Выберите вспомогательные объекты. + + + + Defeaturing + + Defeaturing + Удаление фичеров + + + Faces to remove + Удаляемые грани + + + Select faces + Выберите грани + + + + Defeaturing:FeaturesPlugin_ValidatorDefeaturingSelection + + Error: This validator can only work with selection list attributes. + Ошибка: валидатор поддерживает только аттрибуты типа SelectionList. + + + Error: Empty attribute selection. + Ошибка: незаполненный аттрибут. + + + Error: Empty selection context. + Ошибка: пустой контекст. + + + Error: Not all selected shapes are sub-shapes of solids. + Ошибка: не все выбранные объекты являются подэлементами твердых тел. + + diff --git a/src/FeaturesPlugin/doc/FeaturesPlugin.rst b/src/FeaturesPlugin/doc/FeaturesPlugin.rst index 4d4a52d77..91db9f48f 100644 --- a/src/FeaturesPlugin/doc/FeaturesPlugin.rst +++ b/src/FeaturesPlugin/doc/FeaturesPlugin.rst @@ -15,6 +15,7 @@ Features plug-in provides a set of common topological operations. It implements commonFeature.rst copyFeature.rst cutFeature.rst + defeaturingFeature.rst extrusionCutFeature.rst extrusionFeature.rst extrusionFuseFeature.rst diff --git a/src/FeaturesPlugin/doc/TUI_defeaturingFeature.rst b/src/FeaturesPlugin/doc/TUI_defeaturingFeature.rst new file mode 100644 index 000000000..aafc73317 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_defeaturingFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_defeaturing: + +Perform Defeaturing +=================== + +.. literalinclude:: examples/defeaturing.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/defeaturingFeature.rst b/src/FeaturesPlugin/doc/defeaturingFeature.rst new file mode 100644 index 000000000..33ebe856e --- /dev/null +++ b/src/FeaturesPlugin/doc/defeaturingFeature.rst @@ -0,0 +1,49 @@ +.. |defeaturing.icon| image:: images/defeaturing.png + +Defeaturing +=========== + +**Defeaturing** operation is intended for removal of the unwanted parts or features from the model. These parts can be holes, protrusions, gaps, chamfers, fillets, etc. + +To create a Defeaturing in the active part: + +#. select in the Main Menu *Feature -> Defeaturing* item or +#. click |defeaturing.icon| **Defeaturing** button in the toolbar. + +After that select one or more faces of solids to suppress them. The Defeaturing works with faces from comsolids and compounds of solids as well. + +.. image:: images/defeaturing_property_panel.png + :align: center + +.. centered:: + Defeaturing property panel + +Input field: + +- **Faces to remove** panel contains the list of faces which should be suppressed. + +**TUI Command**: + +.. py:function:: model.addDefeaturing(Part_doc, [faces]) + + :param part: The current part object. + :param list: A list of faces in format *model.selection("FACE", shape)*. + :return: Created object. + +Result +"""""" + +Result of **Defeaturing** is shown below. + +.. image:: images/defeaturing_result.png + :align: center + +.. centered:: + Defeaturing operation + +**See Also** a sample TUI Script of :ref:`tui_defeaturing` operation. + +References +"""""""""" + +For more information, please, visit `OpenCASCADE Documentation `_. diff --git a/src/FeaturesPlugin/doc/examples/defeaturing.py b/src/FeaturesPlugin/doc/examples/defeaturing.py new file mode 100644 index 000000000..0dc1f52f8 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/defeaturing.py @@ -0,0 +1,12 @@ +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, 10, 10, 10) +Fillet_1_objects = [model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"), model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Left]"), model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]")] +Fillet_1 = model.addFillet(Part_1_doc, Fillet_1_objects, 2) +Defeaturing_1 = model.addDefeaturing(Part_1_doc, [model.selection("FACE", "Fillet_1_1/GF:Fillet&Fillet_1_1/FilletSelected_3"), model.selection("FACE", "(Fillet_1_1/GF:Fillet&Fillet_1_1/FilletSelected_1)(Fillet_1_1/GF:Fillet&Fillet_1_1/FilletSelected_2)(Fillet_1_1/GF:Fillet&Fillet_1_1/FilletSelected_3)")]) + +model.end() diff --git a/src/FeaturesPlugin/doc/images/defeaturing.png b/src/FeaturesPlugin/doc/images/defeaturing.png new file mode 100644 index 000000000..9b5ecc8d6 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/defeaturing.png differ diff --git a/src/FeaturesPlugin/doc/images/defeaturing_property_panel.png b/src/FeaturesPlugin/doc/images/defeaturing_property_panel.png new file mode 100644 index 000000000..d62e6ae56 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/defeaturing_property_panel.png differ diff --git a/src/FeaturesPlugin/doc/images/defeaturing_result.png b/src/FeaturesPlugin/doc/images/defeaturing_result.png new file mode 100644 index 000000000..25b6fcd70 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/defeaturing_result.png differ