Salome HOME
Merge branch 'master' into occ/bsplines
[modules/shaper.git] / src / SketchPlugin / CMakeLists.txt
index dad15e6d74b932e9b8f9530f56e2395f63e40718..27965e742648c96ed226431afd726e030ca30892 100644 (file)
@@ -1,22 +1,21 @@
-## 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
+#
 
 INCLUDE(Common)
 INCLUDE(UnitTest)
@@ -24,11 +23,15 @@ INCLUDE(UnitTest)
 SET(PROJECT_HEADERS
     SketchPlugin.h
     SketchPlugin_Arc.h
+    SketchPlugin_BSpline.h
+    SketchPlugin_BSplineBase.h
+    SketchPlugin_BSplinePeriodic.h
     SketchPlugin_Circle.h
     SketchPlugin_Constraint.h
     SketchPlugin_ConstraintAngle.h
     SketchPlugin_ConstraintBase.h
     SketchPlugin_ConstraintCoincidence.h
+    SketchPlugin_ConstraintCoincidenceInternal.h
     SketchPlugin_ConstraintCollinear.h
     SketchPlugin_ConstraintDistance.h
     SketchPlugin_ConstraintDistanceAlongDir.h
@@ -47,34 +50,41 @@ SET(PROJECT_HEADERS
     SketchPlugin_ConstraintTangent.h
     SketchPlugin_ConstraintVertical.h
     SketchPlugin_Ellipse.h
+    SketchPlugin_EllipticArc.h
     SketchPlugin_ExternalValidator.h
     SketchPlugin_Feature.h
     SketchPlugin_IntersectionPoint.h
     SketchPlugin_Line.h
     SketchPlugin_MacroArc.h
     SketchPlugin_MacroArcReentrantMessage.h
+    SketchPlugin_MacroBSpline.h
     SketchPlugin_MacroCircle.h
     SketchPlugin_MacroEllipse.h
+    SketchPlugin_MacroEllipticArc.h
     SketchPlugin_MultiRotation.h
     SketchPlugin_MultiTranslation.h
     SketchPlugin_Plugin.h
     SketchPlugin_Point.h
     SketchPlugin_Projection.h
     SketchPlugin_Sketch.h
+    SketchPlugin_SketchDrawer.h
     SketchPlugin_SketchEntity.h
     SketchPlugin_Split.h
     SketchPlugin_Tools.h
     SketchPlugin_Trim.h
     SketchPlugin_Validators.h
-    SketchPlugin_SketchDrawer.h
 )
 
 SET(PROJECT_SOURCES
     SketchPlugin_Arc.cpp
+    SketchPlugin_BSpline.cpp
+    SketchPlugin_BSplineBase.cpp
+    SketchPlugin_BSplinePeriodic.cpp
     SketchPlugin_Circle.cpp
     SketchPlugin_Constraint.cpp
     SketchPlugin_ConstraintAngle.cpp
     SketchPlugin_ConstraintCoincidence.cpp
+    SketchPlugin_ConstraintCoincidenceInternal.cpp
     SketchPlugin_ConstraintCollinear.cpp
     SketchPlugin_ConstraintDistance.cpp
     SketchPlugin_ConstraintDistanceAlongDir.cpp
@@ -93,25 +103,28 @@ SET(PROJECT_SOURCES
     SketchPlugin_ConstraintTangent.cpp
     SketchPlugin_ConstraintVertical.cpp
     SketchPlugin_Ellipse.cpp
+    SketchPlugin_EllipticArc.cpp
     SketchPlugin_ExternalValidator.cpp
     SketchPlugin_Feature.cpp
     SketchPlugin_IntersectionPoint.cpp
     SketchPlugin_Line.cpp
     SketchPlugin_MacroArc.cpp
+    SketchPlugin_MacroBSpline.cpp
     SketchPlugin_MacroCircle.cpp
     SketchPlugin_MacroEllipse.cpp
+    SketchPlugin_MacroEllipticArc.cpp
     SketchPlugin_MultiRotation.cpp
     SketchPlugin_MultiTranslation.cpp
     SketchPlugin_Plugin.cpp
     SketchPlugin_Point.cpp
     SketchPlugin_Projection.cpp
     SketchPlugin_Sketch.cpp
+    SketchPlugin_SketchDrawer.cpp
     SketchPlugin_SketchEntity.cpp
     SketchPlugin_Split.cpp
     SketchPlugin_Tools.cpp
     SketchPlugin_Trim.cpp
     SketchPlugin_Validators.cpp
-    SketchPlugin_SketchDrawer.cpp
 )
 
 SET(PROJECT_LIBRARIES
@@ -120,22 +133,29 @@ SET(PROJECT_LIBRARIES
     GeomAlgoAPI
     ModelAPI
     ModelGeomAlgo
+    ModuleBase
     SketcherPrs
     GeomDataAPI
 )
 
 SET(XML_RESOURCES
   plugin-Sketch.xml
+  plugin-SketchDrawer.xml
 )
 
 SET(TEXT_RESOURCES
-       SketchPlugin_msg_en.ts
+    SketchPlugin_msg_en.ts
+    SketchPlugin_msg_fr.ts
 )
 
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+
+SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
 
 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
-ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
+ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES} ${PROJECT_AUTOMOC})
 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
 
 INCLUDE_DIRECTORIES(
@@ -143,10 +163,12 @@ INCLUDE_DIRECTORIES(
   ../Events
   ../ModelAPI
   ../ModelGeomAlgo
+  ../ModuleBase
   ../GeomAPI
   ../GeomAlgoAPI
   ../GeomDataAPI
   ../SketcherPrs
+  ${OpenCASCADE_INCLUDE_DIR}
 )
 
 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
@@ -193,33 +215,76 @@ ADD_UNIT_TESTS(
   Test2741.py
   Test2810.py
   Test2824.py
+  Test2860.py
+  Test2894.py
+  Test3019.py
+  Test3087_1.py
+  Test3087_2.py
   TestArcBehavior.py
+  TestChangeSketchPlane1.py
+  TestChangeSketchPlane2.py
+  TestChangeSketchPlane3.py
+  TestChangeSketchPlane4.py
   TestConstraintAngle.py
+  TestConstraintAngle_v0_1.py
+  TestConstraintAngle_v0_2.py
+  TestConstraintAngle_v20191210_1.py
+  TestConstraintAngle_v20191210_2.py
+  TestConstraintAngleBehaviorDirect.py
+  TestConstraintAngleBehaviorSupplementary_1.py
+  TestConstraintAngleBehaviorSupplementary_2.py
+  TestConstraintAngleBehaviorBackward_1.py
+  TestConstraintAngleBehaviorBackward_2.py
+  TestConstraintAngleEllipse.py
   TestConstraintCoincidence.py
+  TestConstraintCoincidenceBSpline.py
+  TestConstraintCoincidenceEllipse.py
+  TestConstraintCoincidenceEllipticArc.py
   TestConstraintCollinear.py
+  TestConstraintCollinearEllipse.py
   TestConstraintDistance.py
+  TestConstraintDistanceEllipse.py
   TestConstraintDistanceBehavior.py
   TestConstraintDistanceHorizontal.py
   TestConstraintDistanceVertical.py
+  TestConstraintDistanceZero.py
+  TestConstraintDistanceHorizontalZero.py
+  TestConstraintDistanceVerticalZero.py
   TestConstraintEqual.py
+  TestConstraintEqualEllipse.py
   TestConstraintFixed.py
   TestConstraintHorizontal.py
   TestConstraintHorizontalValidator.py
   TestConstraintLength.py
   TestConstraintMiddlePoint.py
+  TestConstraintMiddlePointOnArc.py
+  TestConstraintMiddlePointOnEllipticArc.py
   TestConstraintParallel.py
   TestConstraintPerpendicular.py
+  TestConstraintPerpendicularArcLine.py
+  TestConstraintPerpendicularEllipseLine.py
   TestConstraintRadius.py
   TestConstraintRadiusFailure.py
   TestConstraintTangent.py
+  TestConstraintTangentBSpline.py
+  TestConstraintTangentEllipse.py
+  TestConstraintTangentEllipticArc.py
   TestConstraintVertical.py
   TestCreateArcByCenterStartEnd.py
   TestCreateArcByTangentEdge.py
   TestCreateArcByThreePoints.py
+  TestCreateArcByTransversalLine.py
   TestCreateArcChangeType.py
+  TestCreateBSpline.py
+  TestCreateBSplinePeriodic.py
   TestCreateCircleByCenterAndPassed.py
   TestCreateCircleByThreePoints.py
   TestCreateCircleChangeType.py
+  TestCreateEllipseByCenterSemiaxisAndPassed.py
+  TestCreateEllipseByMajorAxisAndPassed.py
+  TestCreateEllipseByExternal.py
+  TestCreateEllipticArc.py
+  TestCreateEllipticArcByExternal.py
   TestDegeneratedGeometry.py
   TestDistanceDump.py
   TestDistanceSignedVsUnsigned01.py
@@ -247,9 +312,18 @@ ADD_UNIT_TESTS(
   TestMultiTranslation.py
   TestPresentation.py
   TestProjection.py
+  TestProjectionBSpline.py
+  TestProjectionBSplinePeriodic.py
+  TestProjectionEllipse.py
+  TestProjectionEllipticArc.py
   TestProjectionIntoResult.py
   TestProjectionUpdate.py
   TestRectangle.py
+  TestRemainingDoF.py
+  TestRemoveBSpline.py
+  TestRemoveBSplinePeriodic.py
+  TestRemoveEllipse.py
+  TestRemoveEllipticArc.py
   TestRemoveSketch.py
   TestSignedDistancePointLine.py
   TestSignedDistancePointPoint.py
@@ -257,6 +331,7 @@ ADD_UNIT_TESTS(
   TestSketchPointLine.py
   TestSnowflake.py
   TestSplit.py
+  TestSplitEllipse.py
   TestSplitLine.py
   TestSplitPreview.py
   TestTrimArc01.py
@@ -273,6 +348,7 @@ ADD_UNIT_TESTS(
   TestTrimCircle04.py
   TestTrimCircle05.py
   TestTrimCircleAndArc01.py
+  TestTrimEllipse.py
   TestTrimLine01.py
   TestTrimLine02.py
   TestTrimLine03.py
@@ -283,7 +359,11 @@ ADD_UNIT_TESTS(
 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
   ADD_UNIT_TESTS(
     TestMoveArc.py
+    TestMoveBSpline.py
+    TestMoveBSplinePeriodic.py
     TestMoveCircle.py
+    TestMoveEllipse.py
+    TestMoveEllipticArc.py
     TestMoveLine.py
     TestMovementComplex.py
     TestMovePoint.py