Salome HOME
Merge remote-tracking branch 'remotes/origin/HigherLevelObjectsHistory'
authorazv <azv@opencascade.com>
Tue, 26 Feb 2019 12:38:17 +0000 (15:38 +0300)
committerazv <azv@opencascade.com>
Tue, 26 Feb 2019 12:38:17 +0000 (15:38 +0300)
# Conflicts:
# env.sh
# src/FeaturesPlugin/CMakeLists.txt
# src/SketchPlugin/Test/TestUpdateSketch.py

65 files changed:
1  2 
doc/gui/conf.py.in
src/BuildPlugin/BuildPlugin_CompSolid.cpp
src/BuildPlugin/BuildPlugin_CompSolid.h
src/BuildPlugin/BuildPlugin_Compound.cpp
src/BuildPlugin/BuildPlugin_Edge.cpp
src/BuildPlugin/BuildPlugin_Face.cpp
src/BuildPlugin/BuildPlugin_Face.h
src/BuildPlugin/BuildPlugin_Shell.cpp
src/BuildPlugin/BuildPlugin_Shell.h
src/BuildPlugin/BuildPlugin_Solid.cpp
src/BuildPlugin/BuildPlugin_Solid.h
src/BuildPlugin/BuildPlugin_Validators.cpp
src/BuildPlugin/CMakeLists.txt
src/CollectionPlugin/CMakeLists.txt
src/CollectionPlugin/Test/TestGroupMove01.py
src/CollectionPlugin/Test/TestGroupMove02.py
src/CollectionPlugin/Test/TestGroupMove03.py
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_BooleanCommon.cpp
src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp
src/FeaturesPlugin/FeaturesPlugin_BooleanFill.cpp
src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp
src/FeaturesPlugin/FeaturesPlugin_BooleanSmash.cpp
src/FeaturesPlugin/FeaturesPlugin_Fillet.cpp
src/FeaturesPlugin/FeaturesPlugin_FusionFaces.cpp
src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp
src/FeaturesPlugin/FeaturesPlugin_MultiRotation.cpp
src/FeaturesPlugin/FeaturesPlugin_MultiRotation.h
src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.cpp
src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.h
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp
src/FeaturesPlugin/FeaturesPlugin_Placement.cpp
src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp
src/FeaturesPlugin/FeaturesPlugin_Scale.cpp
src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp
src/FeaturesPlugin/FeaturesPlugin_Tools.cpp
src/FeaturesPlugin/FeaturesPlugin_Tools.h
src/FeaturesPlugin/FeaturesPlugin_Translation.cpp
src/FeaturesPlugin/Test/Test1942.py
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAPI/GeomAPI_Shape.h
src/GeomAlgoAPI/GeomAlgoAPI.i
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h
src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.h
src/GeomAlgoAPI/GeomAlgoAPI_Sewing.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelection.h
src/Model/Model_AttributeString.h
src/Model/Model_BodyBuilder.cpp
src/Model/Model_BodyBuilder.h
src/Model/Model_ResultBody.cpp
src/Model/Model_ResultBody.h
src/Model/Model_ResultConstruction.cpp
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_BodyBuilder.h
src/ModelAPI/ModelAPI_ResultBody.cpp
src/ModelAPI/ModelAPI_ResultBody.h
src/ModelAPI/Test/Test2358_2.py
src/SketchPlugin/Test/TestMovementComplex.py

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0000000000000000000000000000000000000000,604989e39385f35ba50ed42bf8a6a4ed11b436e8..fb3768c8caae5c36c7834c87adf91f2896c294da
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,50 +1,49 @@@
 -## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 -##
 -## This library is free software; you can redistribute it and/or
 -## modify it under the terms of the GNU Lesser General Public
 -## License as published by the Free Software Foundation; either
 -## version 2.1 of the License, or (at your option) any later version.
 -##
 -## This library is distributed in the hope that it will be useful,
 -## but WITHOUT ANY WARRANTY; without even the implied warranty of
 -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 -## Lesser General Public License for more details.
 -##
 -## You should have received a copy of the GNU Lesser General Public
 -## License along with this library; if not, write to the Free Software
 -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 -##
 -## See http:##www.salome-platform.org/ or
 -## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 -##
++# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
++#
++# This library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++#
++# This library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with this library; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
++#
++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
++#
+ # Test that box partitioned is splitted: group with edge becomes 2 edges group,
+ # group with not-touched vertex keeps this vertex.
+ from salome.shaper import model
+ from ModelAPI import *
+ model.begin()
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ Box_1 = model.addBox(Part_1_doc, 20, 10, 10)
+ Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Back"), 10, True)
+ Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]")])
+ Group_2 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Left][Box_1_1/Top]")])
+ Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")])
+ model.do()
+ # move groups
+ Part_1_doc.moveFeature(Group_1.feature(), Partition_1.feature())
+ Part_1_doc.moveFeature(Group_2.feature(), Group_1.feature())
+ model.end()
+ # Check groups
+ aFactory = ModelAPI_Session.get().validators()
+ selectionList = Group_1.feature().selectionList("group_list")
+ assert(selectionList.size() == 2)
+ assert(aFactory.validate(Group_1.feature()))
+ selectionList = Group_2.feature().selectionList("group_list")
+ assert(selectionList.size() == 1)
+ assert(aFactory.validate(Group_2.feature()))
index 0000000000000000000000000000000000000000,46f1be056dc99714457b91984df70ee71e451031..e764e5c4c1442cea9cf696aaf4fccc8531a7b017
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,45 +1,44 @@@
 -## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 -##
 -## This library is free software; you can redistribute it and/or
 -## modify it under the terms of the GNU Lesser General Public
 -## License as published by the Free Software Foundation; either
 -## version 2.1 of the License, or (at your option) any later version.
 -##
 -## This library is distributed in the hope that it will be useful,
 -## but WITHOUT ANY WARRANTY; without even the implied warranty of
 -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 -## Lesser General Public License for more details.
 -##
 -## You should have received a copy of the GNU Lesser General Public
 -## License along with this library; if not, write to the Free Software
 -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 -##
 -## See http:##www.salome-platform.org/ or
 -## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 -##
++# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
++#
++# This library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++#
++# This library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with this library; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
++#
++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
++#
+ # Test that removed vertex, selected in the group makes empty group => invalid one
+ from salome.shaper import model
+ from ModelAPI import *
+ 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, 20)
+ Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Right][Box_1_1/Top]"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Left][Box_1_1/Top]"), model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Left][Box_1_1/Bottom]"))
+ Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Left][Box_1_1/Top]")])
+ Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")])
+ Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPSOLID", "Partition_1_1"))
+ Remove_SubShapes_1.setSubShapesToKeep([model.selection("SOLID", "Partition_1_1_2")])
+ model.do()
+ # move group
+ Part_1_doc.moveFeature(Group_1.feature(), Remove_SubShapes_1.feature())
+ model.end()
+ # Check group
+ aFactory = ModelAPI_Session.get().validators()
+ selectionList = Group_1.feature().selectionList("group_list")
+ assert(selectionList.size() == 0)
+ assert(aFactory.validate(Group_1.feature()) == False)
index 0000000000000000000000000000000000000000,f3c2bda62dc94510bd817b94885bb85cdedba517..495bd4b0720ac9064fa6dfd925f4b3c7b233bd58
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,87 +1,86 @@@
 -## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 -##
 -## This library is free software; you can redistribute it and/or
 -## modify it under the terms of the GNU Lesser General Public
 -## License as published by the Free Software Foundation; either
 -## version 2.1 of the License, or (at your option) any later version.
 -##
 -## This library is distributed in the hope that it will be useful,
 -## but WITHOUT ANY WARRANTY; without even the implied warranty of
 -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 -## Lesser General Public License for more details.
 -##
 -## You should have received a copy of the GNU Lesser General Public
 -## License along with this library; if not, write to the Free Software
 -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 -##
 -## See http:##www.salome-platform.org/ or
 -## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 -##
++# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
++#
++# This library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++#
++# This library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with this library; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
++#
++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
++#
+ # Test that partition divides cylinder into 4 faces, there is no edges in a group moved to the end
+ # Based on the CEA report mail 04.12.2018, page 2
+ from SketchAPI import *
+ from ModelAPI import *
+ from GeomAPI import *
+ from salome.shaper import model
+ model.begin()
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+ SketchArc_1 = Sketch_1.addArc(-1.103476974288834e-12, 24.99999999999979, 24.49489742783218, 30, 0, 50, False)
+ SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
+ SketchLine_1 = SketchProjection_1.createdFeature()
+ SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.result())
+ SketchLine_2 = Sketch_1.addLine(0, 50, -10, 50)
+ SketchLine_2.setAuxiliary(True)
+ SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_2.startPoint())
+ SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_2.result())
+ SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_2.result())
+ SketchLine_3 = Sketch_1.addLine(24.49489742783218, 30, 24.49489742783218, 5)
+ SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_3.startPoint())
+ SketchLine_4 = Sketch_1.addLine(24.49489742783218, 5, 34.49489742783218, 5)
+ SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+ SketchLine_5 = Sketch_1.addLine(34.49489742783218, 5, 34.49489742783218, 0)
+ SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+ SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False)
+ SketchLine_6 = SketchProjection_2.createdFeature()
+ SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.result())
+ SketchLine_7 = Sketch_1.addLine(34.49489742783218, 0, 0, 0)
+ SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_7.startPoint())
+ SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_1).startPoint(), SketchLine_7.endPoint())
+ SketchLine_8 = Sketch_1.addLine(0, 50, 0, 0)
+ SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_8.startPoint())
+ SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_1).startPoint(), SketchLine_8.endPoint())
+ SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
+ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_3.result())
+ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
+ SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_4.result(), 10)
+ SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_5.result(), 5)
+ SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_3.result(), 25)
+ SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_8.result(), 50)
+ SketchConstraintLength_5 = Sketch_1.setLength(SketchLine_2.result(), 10)
+ SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 25)
+ model.do()
+ Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2r-SketchLine_8f-SketchLine_7r-SketchLine_5r-SketchLine_4r-SketchLine_3r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
+ Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3")])
+ Partition_1_objects = [model.selection("SOLID", "Revolution_1_1"), model.selection("FACE", "PartSet/XOZ"), model.selection("FACE", "PartSet/YOZ")]
+ Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
+ model.do()
+ # move group
+ Part_1_doc.moveFeature(Group_1.feature(), Partition_1.feature())
+ model.end()
+ # Check group: result must be four faces
+ aFactory = ModelAPI_Session.get().validators()
+ selectionList = Group_1.feature().selectionList("group_list")
+ assert(selectionList.size() == 4)
+ assert(aFactory.validate(Group_1.feature()))
+ for i in range(4):
+   assert(Group_1.groupList().value(i).value().shapeType() == GeomAPI_Shape.FACE)
+ assert(model.checkPythonDump())
index 2c7b1e2bb4c57c73f182bddafbd6ce51668a19ab,0a7813bcd95f102c454b5568c0d88b6b7a7707e9..70a5a6fcd2e79b629aedc4ce6ead5c6d42e7179e
@@@ -411,7 -415,7 +414,8 @@@ ADD_UNIT_TESTS(TestExtrusion.p
                 TestPartitionSubCompsolidWithPlane3.py
                 TestPartitionSubCompsolidWithPlane4.py
                 TestPartitionSubCompsolidWithPlane5.py
 +               TestPartitionArgsUpdate.py
+                TestPartition_SolidsHistory.py
                 TestBooleanFuse_Vertex_Vertex.py
                 TestBooleanFuse_VertexCompound_VertexCompound.py
                 TestBooleanFuse_Edge_Edge.py
                 Test2692.py
                 Test2617.py
                 Test2729.py
+                Test2738.py
                 Test2751.py
+                Test2826.py
 +               Test2854.py
  )
index 477d6b62fc622bf2dcfde37ebc73fff6e7d8f271,96e9df0946fbbf94f12101da2bca805ae1a53edd..f7dc3dc8d304ce105ca0011301e3959ab38b90e8
@@@ -135,10 -118,6 +135,6 @@@ private
                      std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                      std::shared_ptr<GeomAPI_Shape> theBaseShape, int nb);
  #endif
-   void loadNamingDS(std::list<std::shared_ptr<GeomAlgoAPI_Rotation> > theListOfRotationAlgo,
-                     std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                     std::shared_ptr<GeomAPI_Shape> theBaseShape);
  };
  
 -#endif // FEATURESPLUGIN_MULTIROTATION_H_
 +#endif // FEATURESPLUGIN_MULTIROTATION_H_
index a97985ea40bfff5fb88c3db2600a1a1893ea36f2,8215f029374057be0ab4bc3eb9c3298c1685a1cd..f572664a2cc85c8fa5e71914c0c62a06ee39613c
mode 100644,100755..100644
index bfe4ad1a84cd4774838c4f04c6ef29200bd91b2a,d0754a9dce1e7fedb974268acbd6ad8db4aeb954..7ef1d86b8827fb58468b62ca83b4628ffa0e2124
mode 100644,100755..100644
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 7b2dfb6f8cd5abcc17c93fd5dca8ad46d702590c,733cb88bd9253f078b31d8e79c5d3e0ef29d20c5..2ab3b1cff4a3c553e434bb9d3fb2138a1358f9c6
@@@ -45,11 -44,9 +45,11 @@@ class Model_AttributeString : public Mo
  
    /// Returns the std::string  value
    MODEL_EXPORT virtual std::string value();
 +  /// Returns the std::wstring  value
 +  MODEL_EXPORT virtual std::wstring valueW();
  
   protected:
-   /// Initializes attibutes
+   /// Initializes attributes
    Model_AttributeString(TDF_Label& theLabel);
    /// Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)
    virtual void reinit();
index 913a773ada5efb0f960d9b934ebbe458f4193cc9,f65a38951923900400ca64ffec72af06c3f74070..5c89b7cc31fa069cdcfb89defed73961c4f32af1
mode 100644,100755..100644
index 3819141009aecadbb48339a7dbbe207f72e560f6,13c91151769df68aa486495c89cf270ee6c37c27..08e79790b890d04982205f1cb2d3e92525954744
mode 100644,100755..100644
Simple merge
Simple merge
index 98d13b066b410deb6d813c01e22827520efa7214,8356838450635e191e224a07d91c3240c6535660..f86c3076b240ecde193a2eb4955552fbbed23100
mode 100644,100755..100644
index 3cbdf43e0ddbfc158d2f09ddf52fadf5bc888742,10803b8c77815768d543db5384ada017412c7cfe..ecf3137338df10ba16e832437dc7af0c6aad6a9c
mode 100644,100755..100644
Simple merge
Simple merge
Simple merge