Salome HOME
Issue #1834: Fix length of lines
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 3 Nov 2016 09:51:35 +0000 (12:51 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 3 Nov 2016 09:51:47 +0000 (12:51 +0300)
52 files changed:
src/SketchAPI/SketchAPI_Arc.cpp
src/SketchAPI/SketchAPI_Arc.h
src/SketchAPI/SketchAPI_Circle.h
src/SketchAPI/SketchAPI_Constraint.cpp
src/SketchAPI/SketchAPI_Constraint.h
src/SketchAPI/SketchAPI_IntersectionPoint.cpp
src/SketchAPI/SketchAPI_IntersectionPoint.h
src/SketchAPI/SketchAPI_Line.cpp
src/SketchAPI/SketchAPI_Line.h
src/SketchAPI/SketchAPI_Mirror.cpp
src/SketchAPI/SketchAPI_Mirror.h
src/SketchAPI/SketchAPI_Point.cpp
src/SketchAPI/SketchAPI_Point.h
src/SketchAPI/SketchAPI_Projection.cpp
src/SketchAPI/SketchAPI_Projection.h
src/SketchAPI/SketchAPI_Rectangle.cpp
src/SketchAPI/SketchAPI_Rectangle.h
src/SketchAPI/SketchAPI_Rotation.cpp
src/SketchAPI/SketchAPI_Rotation.h
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h
src/SketchAPI/SketchAPI_SketchEntity.cpp
src/SketchAPI/SketchAPI_SketchEntity.h
src/SketchAPI/SketchAPI_Translation.cpp
src/SketchAPI/SketchAPI_Translation.h
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_Angle.h
src/SketcherPrs/SketcherPrs_Coincident.cpp
src/SketcherPrs/SketcherPrs_Coincident.h
src/SketcherPrs/SketcherPrs_Collinear.cpp
src/SketcherPrs/SketcherPrs_DimensionStyleListener.cpp
src/SketcherPrs/SketcherPrs_Equal.cpp
src/SketcherPrs/SketcherPrs_Factory.cpp
src/SketcherPrs/SketcherPrs_HVDirection.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.h
src/SketcherPrs/SketcherPrs_Middle.cpp
src/SketcherPrs/SketcherPrs_Mirror.cpp
src/SketcherPrs/SketcherPrs_Parallel.cpp
src/SketcherPrs/SketcherPrs_Perpendicular.cpp
src/SketcherPrs/SketcherPrs_PositionMgr.cpp
src/SketcherPrs/SketcherPrs_Radius.cpp
src/SketcherPrs/SketcherPrs_Radius.h
src/SketcherPrs/SketcherPrs_Rigid.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.h
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.h
src/SketcherPrs/SketcherPrs_Tangent.cpp
src/SketcherPrs/SketcherPrs_Tools.cpp
src/SketcherPrs/SketcherPrs_Tools.h
src/SketcherPrs/SketcherPrs_Transformation.cpp

index 628e43238efb0e887ea83ca98c464b6e22934870..8428bf78431237a6bf20aea7d8979a1f22dbf6be 100644 (file)
 #include <ModelHighAPI_Selection.h>
 #include <ModelHighAPI_Tools.h>
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature> & theFeature)
 : SketchAPI_SketchEntity(theFeature)
 {
   initialize();
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              double theCenterX, double theCenterY,
                              double theStartX, double theStartY,
@@ -29,11 +29,12 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
 : SketchAPI_SketchEntity(theFeature)
 {
   if(initialize()) {
-    setByCenterStartEnd(theCenterX, theCenterY, theStartX, theStartY, theEndX, theEndY, theInversed);
+    setByCenterStartEnd(theCenterX, theCenterY, theStartX, 
+                        theStartY, theEndX, theEndY, theInversed);
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
                              const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
@@ -46,7 +47,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              double theStartX, double theStartY,
                              double theEndX, double theEndY,
@@ -58,7 +59,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//===============================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
                              const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
@@ -70,7 +71,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const ModelHighAPI_RefAttr& theTangentPoint,
                              double theEndX, double theEndY,
@@ -82,7 +83,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const ModelHighAPI_RefAttr& theTangentPoint,
                              const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
@@ -94,7 +95,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const ModelHighAPI_Selection& theExternal)
 : SketchAPI_SketchEntity(theFeature)
@@ -104,7 +105,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const std::string& theExternalName)
 : SketchAPI_SketchEntity(theFeature)
@@ -114,13 +115,13 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
   }
 }
 
-//==================================================================================================
+//================================================================================================
 SketchAPI_Arc::~SketchAPI_Arc()
 {
 
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByCenterStartEnd(double theCenterX, double theCenterY,
                                         double theStartX, double theStartY,
                                         double theEndX, double theEndY,
@@ -135,7 +136,7 @@ void SketchAPI_Arc::setByCenterStartEnd(double theCenterX, double theCenterY,
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByCenterStartEnd(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
                                         const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
                                         const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
@@ -150,7 +151,7 @@ void SketchAPI_Arc::setByCenterStartEnd(const std::shared_ptr<GeomAPI_Pnt2d>& th
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByStartEndPassed(double theStartX, double theStartY,
                                         double theEndX, double theEndY,
                                         double thePassedX, double thePassedY)
@@ -163,7 +164,7 @@ void SketchAPI_Arc::setByStartEndPassed(double theStartX, double theStartY,
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByStartEndPassed(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
                                         const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
                                         const std::shared_ptr<GeomAPI_Pnt2d>& thePassed)
@@ -176,7 +177,7 @@ void SketchAPI_Arc::setByStartEndPassed(const std::shared_ptr<GeomAPI_Pnt2d>& th
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoint,
                                  double theEndX, double theEndY,
                                  bool theInversed)
@@ -189,7 +190,7 @@ void SketchAPI_Arc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoint,
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoint,
                                  const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
                                  bool theInversed)
@@ -202,7 +203,7 @@ void SketchAPI_Arc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoint,
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setByExternal(const ModelHighAPI_Selection & theExternal)
 {
   fillAttribute(theExternal, external());
@@ -210,7 +211,7 @@ void SketchAPI_Arc::setByExternal(const ModelHighAPI_Selection & theExternal)
   execute();
 }
 
-//==================================================================================================
+//===============================================================================================
 void SketchAPI_Arc::setByExternalName(const std::string & theExternalName)
 {
   fillAttribute(ModelHighAPI_Selection("EDGE", theExternalName), external());
@@ -218,7 +219,7 @@ void SketchAPI_Arc::setByExternalName(const std::string & theExternalName)
   execute();
 }
 
-//==================================================================================================
+//===============================================================================================
 void SketchAPI_Arc::setRadius(double theRadius)
 {
   fillAttribute(ModelHighAPI_Double(theRadius), myradius);
@@ -226,7 +227,7 @@ void SketchAPI_Arc::setRadius(double theRadius)
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::setAngle(double theAngle)
 {
   fillAttribute(ModelHighAPI_Double(theAngle), myangle);
@@ -234,7 +235,7 @@ void SketchAPI_Arc::setAngle(double theAngle)
   execute();
 }
 
-//==================================================================================================
+//================================================================================================
 void SketchAPI_Arc::dump(ModelHighAPI_Dumper& theDumper) const
 {
   if (isCopy())
index 92f24fb3ec896d0b21fed79220229438be56279d..c1d302377f4473e6ec4fe8948fda3fff46859566 100644 (file)
@@ -86,16 +86,26 @@ public:
   virtual ~SketchAPI_Arc();
 
   INTERFACE_10(SketchPlugin_Arc::ID(),
-               arcType, SketchPlugin_Arc::ARC_TYPE(), ModelAPI_AttributeString, /** Arc type */,
-               center, SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D, /** Center point */,
-               startPoint, SketchPlugin_Arc::START_ID(), GeomDataAPI_Point2D, /** Start point */,
-               endPoint, SketchPlugin_Arc::END_ID(), GeomDataAPI_Point2D, /** End point */,
-               inversed, SketchPlugin_Arc::INVERSED_ID(), ModelAPI_AttributeBoolean, /** Inversed flag */,
-               passedPoint, SketchPlugin_Arc::PASSED_POINT_ID(), GeomDataAPI_Point2D, /** Passed point */,
-               tangentPoint, SketchPlugin_Arc::TANGENT_POINT_ID(), ModelAPI_AttributeRefAttr, /** Tangent point */,
-               radius, SketchPlugin_Arc::RADIUS_ID(), ModelAPI_AttributeDouble, /** Radius */,
-               angle, SketchPlugin_Arc::ANGLE_ID(), ModelAPI_AttributeDouble, /** Angle */,
-               external, SketchPlugin_Arc::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */)
+               arcType, SketchPlugin_Arc::ARC_TYPE(),
+               ModelAPI_AttributeString, /** Arc type */,
+               center, SketchPlugin_Arc::CENTER_ID(),
+               GeomDataAPI_Point2D, /** Center point */,
+               startPoint, SketchPlugin_Arc::START_ID(),
+               GeomDataAPI_Point2D, /** Start point */,
+               endPoint, SketchPlugin_Arc::END_ID(),
+               GeomDataAPI_Point2D, /** End point */,
+               inversed, SketchPlugin_Arc::INVERSED_ID(),
+               ModelAPI_AttributeBoolean, /** Inversed flag */,
+               passedPoint, SketchPlugin_Arc::PASSED_POINT_ID(),
+               GeomDataAPI_Point2D, /** Passed point */,
+               tangentPoint, SketchPlugin_Arc::TANGENT_POINT_ID(),
+               ModelAPI_AttributeRefAttr, /** Tangent point */,
+               radius, SketchPlugin_Arc::RADIUS_ID(),
+               ModelAPI_AttributeDouble, /** Radius */,
+               angle, SketchPlugin_Arc::ANGLE_ID(),
+               ModelAPI_AttributeDouble, /** Angle */,
+               external, SketchPlugin_Arc::EXTERNAL_ID(),
+               ModelAPI_AttributeSelection, /** External */)
 
   /// Set by center and start, end point.
   SKETCHAPI_EXPORT
index 3c10b00c11772bc73447e54de9ffc9562a14d8c3..99e0aefc1cda80d628bd9c3191f34c1bdf5ebce5 100644 (file)
@@ -66,13 +66,20 @@ public:
   virtual ~SketchAPI_Circle();
 
   INTERFACE_7(SketchPlugin_Circle::ID(),
-              circleType, SketchPlugin_Circle::CIRCLE_TYPE(), ModelAPI_AttributeString, /** Circle type */,
-              center, SketchPlugin_Circle::CENTER_ID(), GeomDataAPI_Point2D, /** Center point */,
-              radius, SketchPlugin_Circle::RADIUS_ID(), ModelAPI_AttributeDouble, /** Radius */,
-              firstPoint, SketchPlugin_Circle::FIRST_POINT_ID(), GeomDataAPI_Point2D, /** First point */,
-              secondPoint, SketchPlugin_Circle::SECOND_POINT_ID(), GeomDataAPI_Point2D, /** Second point */,
-              thirdPoint, SketchPlugin_Circle::THIRD_POINT_ID(), GeomDataAPI_Point2D, /** Third point */,
-              external, SketchPlugin_Circle::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */)
+              circleType, SketchPlugin_Circle::CIRCLE_TYPE(),
+              ModelAPI_AttributeString, /** Circle type */,
+              center, SketchPlugin_Circle::CENTER_ID(),
+              GeomDataAPI_Point2D, /** Center point */,
+              radius, SketchPlugin_Circle::RADIUS_ID(),
+              ModelAPI_AttributeDouble, /** Radius */,
+              firstPoint, SketchPlugin_Circle::FIRST_POINT_ID(),
+              GeomDataAPI_Point2D, /** First point */,
+              secondPoint, SketchPlugin_Circle::SECOND_POINT_ID(),
+              GeomDataAPI_Point2D, /** Second point */,
+              thirdPoint, SketchPlugin_Circle::THIRD_POINT_ID(),
+              GeomDataAPI_Point2D, /** Third point */,
+              external, SketchPlugin_Circle::EXTERNAL_ID(),
+              ModelAPI_AttributeSelection, /** External */)
 
   /// Set by center and radius.
   SKETCHAPI_EXPORT
index 6ed3e193fac98bdd0e4560a4b8cb0cf517050231..d8ca207c4c513beaadd3f9649d793691278fa9b6 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Constraint.cpp
 // Purpose: 
 //
@@ -139,7 +140,8 @@ void SketchAPI_Constraint::dump(ModelHighAPI_Dumper& theDumper) const
     FeaturePtr aFeature = ModelAPI_Feature::feature(aRefAttr->object());
     if (!aFeature)
       return;
-    AttributeSelectionPtr aAttr = aFeature->data()->selection(SketchPlugin_SketchEntity::EXTERNAL_ID());
+    AttributeSelectionPtr aAttr = 
+      aFeature->data()->selection(SketchPlugin_SketchEntity::EXTERNAL_ID());
     if (aAttr && aAttr->context().get() != NULL && !aAttr->isInvalid())
       return;
   }
index 2f876525102280fa742e5a1ff066bb2fb25bdb5e..4885631164d38469126e7c23847595819d56128d 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Constraint.h
 // Purpose: 
 //
index ce33717b16b1287ae120f1939f6f98a03866079f..7723dc240f20b07c215bf71be2a951547db2792e 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_IntersectionPoint.cpp
 // Purpose: 
 //
@@ -68,7 +69,8 @@ void SketchAPI_IntersectionPoint::dump(ModelHighAPI_Dumper& theDumper) const
   const std::string& aSketchName = theDumper.parentName(aBase);
 
   AttributeSelectionPtr aLine = externalLine();
-  theDumper << aBase << " = " << aSketchName << ".addIntersectionPoint(" << aLine << ")" << std::endl;
+  theDumper << aBase << " = " << 
+    aSketchName << ".addIntersectionPoint(" << aLine << ")" << std::endl;
   // dump "auxiliary" flag if necessary
   SketchAPI_SketchEntity::dump(theDumper);
 }
index 4460f3df577daf76a3cbe9aa793de663baa08232..4d0b52c86137cbed88ae313ffa0055cc45afef67 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_IntersectionPoint.h
 // Purpose: 
 //
@@ -39,8 +40,10 @@ public:
   virtual ~SketchAPI_IntersectionPoint();
 
   INTERFACE_2(SketchPlugin_IntersectionPoint::ID(),
-              coordinates, SketchPlugin_IntersectionPoint::COORD_ID(), GeomDataAPI_Point2D, /** IntersectionPoint coordinates */,
-              externalLine, SketchPlugin_IntersectionPoint::EXTERNAL_LINE_ID(), ModelAPI_AttributeSelection, /** External line */
+              coordinates, SketchPlugin_IntersectionPoint::COORD_ID(), 
+              GeomDataAPI_Point2D, /** IntersectionPoint coordinates */,
+              externalLine, SketchPlugin_IntersectionPoint::EXTERNAL_LINE_ID(), 
+              ModelAPI_AttributeSelection, /** External line */
   )
 
   /// Set by external
index 1e5a2da04fc01a250631b6940ea62338ae6df9c1..b1ea975ee2b836109e14e44ab6785c61d80327eb 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Line.cpp
 // Purpose: 
 //
index 23f9042400ca9378001c450ac8b85d4cead7a331..beec3cb8797ff0756ecbc8122e6125cd97b7b05c 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Line.h
 // Purpose: 
 //
@@ -50,9 +51,12 @@ public:
   virtual ~SketchAPI_Line();
 
   INTERFACE_3(SketchPlugin_Line::ID(),
-              startPoint, SketchPlugin_Line::START_ID(), GeomDataAPI_Point2D, /** Start point */,
-              endPoint, SketchPlugin_Line::END_ID(), GeomDataAPI_Point2D, /** End point */,
-              external, SketchPlugin_Line::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */
+              startPoint, SketchPlugin_Line::START_ID(), 
+              GeomDataAPI_Point2D, /** Start point */,
+              endPoint, SketchPlugin_Line::END_ID(),
+              GeomDataAPI_Point2D, /** End point */,
+              external, SketchPlugin_Line::EXTERNAL_ID(),
+              ModelAPI_AttributeSelection, /** External */
   )
 
   /// Set by coordinates
index 0039dffb8ba78e9c37286ae2d3fcb916ea9ebb55..38c814fd80124da626997c16f43baa2bdcc78521 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Mirror.cpp
 // Purpose: 
 //
index 4de2f172f6dc6932c2f72f6b229fabd59de37db4..4c00c36844b50ab55ea81790ebd97763408220f2 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Mirror.h
 // Purpose: 
 //
@@ -40,10 +41,14 @@ public:
   virtual ~SketchAPI_Mirror();
 
   INTERFACE_4(SketchPlugin_ConstraintMirror::ID(),
-              mirrorLine, SketchPlugin_ConstraintMirror::ENTITY_A(), ModelAPI_AttributeRefAttr, /** Mirror line */,
-              mirrorList, SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(), ModelAPI_AttributeRefList, /** Mirror list */,
-              referenceObjects, SketchPlugin_ConstraintMirror::ENTITY_B(), ModelAPI_AttributeRefList, /** Reference objects */,
-              mirroredObjects, SketchPlugin_ConstraintMirror::ENTITY_C(), ModelAPI_AttributeRefList, /** Mirrored objects */
+              mirrorLine, SketchPlugin_ConstraintMirror::ENTITY_A(), 
+              ModelAPI_AttributeRefAttr, /** Mirror line */,
+              mirrorList, SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(), 
+              ModelAPI_AttributeRefList, /** Mirror list */,
+              referenceObjects, SketchPlugin_ConstraintMirror::ENTITY_B(), 
+              ModelAPI_AttributeRefList, /** Reference objects */,
+              mirroredObjects, SketchPlugin_ConstraintMirror::ENTITY_C(), 
+              ModelAPI_AttributeRefList, /** Mirrored objects */
   )
 
   /// List of mirrored objects
index 346ae4442983e89735d5f97afc67f2aa128e8232..2c8820a5367d07110f460ff8a20a9e2a6f472f9d 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Point.cpp
 // Purpose: 
 //
index a680aacc6d69e6b2160071c9a4407cc8a0a60b93..42d9da9305d63938e118b70722601d3fc69acbdc 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Point.h
 // Purpose: 
 //
@@ -49,8 +50,10 @@ public:
   virtual ~SketchAPI_Point();
 
   INTERFACE_2(SketchPlugin_Point::ID(),
-              coordinates, SketchPlugin_Point::COORD_ID(), GeomDataAPI_Point2D, /** Point coordinates */,
-              external, SketchPlugin_Point::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */
+              coordinates, SketchPlugin_Point::COORD_ID(),
+              GeomDataAPI_Point2D, /** Point coordinates */,
+              external, SketchPlugin_Point::EXTERNAL_ID(),
+              ModelAPI_AttributeSelection, /** External */
   )
 
   /// Set by coordinates
index b0bb46b5593b07999dd6cf8ca3a4c2651b19c892..0c5c7f0bea448c2a1087473819aa991ee9a298ee 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Projection.cpp
 // Purpose: 
 //
index 4a573843b0d74d712d125b3a63669fc5256cc8b6..3906f60b72b30482421629524adae28198e2913f 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Projection.h
 // Purpose: 
 //
@@ -39,9 +40,12 @@ public:
   virtual ~SketchAPI_Projection();
 
   INTERFACE_3(SketchPlugin_Projection::ID(),
-              externalFeature, SketchPlugin_Projection::EXTERNAL_FEATURE_ID(), ModelAPI_AttributeSelection, /** External feature */,
-              projectedFeature, SketchPlugin_Projection::PROJECTED_FEATURE_ID(), ModelAPI_AttributeRefAttr, /** Projected feature */,
-              external, SketchPlugin_Projection::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */
+              externalFeature, SketchPlugin_Projection::EXTERNAL_FEATURE_ID(), 
+              ModelAPI_AttributeSelection, /** External feature */,
+              projectedFeature, SketchPlugin_Projection::PROJECTED_FEATURE_ID(), 
+              ModelAPI_AttributeRefAttr, /** Projected feature */,
+              external, SketchPlugin_Projection::EXTERNAL_ID(), 
+              ModelAPI_AttributeSelection, /** External */
   )
 
   /// Set external feature
index 3da59f0ff8a220b4b3c1fc5cc7260b93bd4c78fa..88e5d5b22e5e2530612ab6b7bda8b9c6b29d0c39 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rectangle.cpp
 // Purpose: 
 //
index 455d33bdf2bbe4f9bece59277654250fbfa689c4..8aeda2a9821873bb64b3a90bdc53fb81dcfc0c3b 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rectangle.h
 // Purpose: 
 //
index 57fd4bf15867b8c32ad15ad7f067ce71d4c9a97f..ea2cea1ded7985a6223169cfe6271d13db338562 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rotation.cpp
 // Purpose: 
 //
index 2f58d77605df198fe59749f686f14b7f3065ca45..2deebb5650c0c3d61f377d9a08c29cae5fcf5aa6 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rotation.h
 // Purpose: 
 //
@@ -45,13 +46,20 @@ public:
   virtual ~SketchAPI_Rotation();
 
   INTERFACE_7(SketchPlugin_MultiRotation::ID(),
-              rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(), ModelAPI_AttributeRefList, /** Rotation list */,
-              center, SketchPlugin_MultiRotation::CENTER_ID(), ModelAPI_AttributeRefAttr, /** Center */,
-              angle, SketchPlugin_MultiRotation::ANGLE_ID(), ModelAPI_AttributeDouble, /** Angle */,
-              numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger, /** Number of objects */,
-              valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(), ModelAPI_AttributeString, /** Value type */,
-              referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(), ModelAPI_AttributeRefList, /** Reference objects */,
-              rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(), ModelAPI_AttributeRefList, /** Rotated objects */
+              rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(),
+              ModelAPI_AttributeRefList, /** Rotation list */,
+              center, SketchPlugin_MultiRotation::CENTER_ID(),
+              ModelAPI_AttributeRefAttr, /** Center */,
+              angle, SketchPlugin_MultiRotation::ANGLE_ID(),
+              ModelAPI_AttributeDouble, /** Angle */,
+              numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
+              ModelAPI_AttributeInteger, /** Number of objects */,
+              valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(), 
+              ModelAPI_AttributeString, /** Value type */,
+              referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(), 
+              ModelAPI_AttributeRefList, /** Reference objects */,
+              rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(), 
+              ModelAPI_AttributeRefList, /** Rotated objects */
   )
 
   /// List of rotated objects
index 6b1731aba941e5d6adb767c8821df8e0890e2ed5..ce765e71bd9fb8961bb7032e23f026d76eb03283 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Sketch.cpp
 // Purpose: 
 //
@@ -123,7 +124,8 @@ void SketchAPI_Sketch::setValue(
     const std::shared_ptr<ModelHighAPI_Interface> & theConstraint,
     const ModelHighAPI_Double & theValue)
 {
-  // TODO(spo): check somehow that the feature is a constraint or eliminate crash if the feature have no real attribute VALUE
+  // TODO(spo): check somehow that the feature is a constraint or eliminate
+  // crash if the feature have no real attribute VALUE
   fillAttribute(theValue, theConstraint->feature()->real(SketchPlugin_Constraint::VALUE()));
 
 //  theConstraint->execute();
@@ -172,7 +174,8 @@ SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
 {
   // TODO(spo): check that thePart is not empty
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(SketchAPI_Sketch::ID());
-  return SketchPtr(new SketchAPI_Sketch(aFeature, ModelHighAPI_Selection("FACE", theExternalName)));
+  return SketchPtr(
+    new SketchAPI_Sketch(aFeature, ModelHighAPI_Selection("FACE", theExternalName)));
 }
 
 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
@@ -187,23 +190,28 @@ SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(
     double theX, double theY)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, theX, theY));
 }
 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(
     const std::shared_ptr<GeomAPI_Pnt2d> & thePoint)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, thePoint));
 }
-std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const ModelHighAPI_Selection & theExternal)
+std::shared_ptr<SketchAPI_Point> 
+  SketchAPI_Sketch::addPoint(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, theExternal));
 }
 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, theExternalName));
 }
 
@@ -211,51 +219,62 @@ std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const std::string &
 std::shared_ptr<SketchAPI_IntersectionPoint> SketchAPI_Sketch::addIntersectionPoint(
     const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
   return IntersectionPointPtr(new SketchAPI_IntersectionPoint(aFeature, theExternal));
 }
 std::shared_ptr<SketchAPI_IntersectionPoint> SketchAPI_Sketch::addIntersectionPoint(
     const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
   return IntersectionPointPtr(new SketchAPI_IntersectionPoint(aFeature, theExternalName));
 }
 
 //--------------------------------------------------------------------------------------
-std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(double theX1, double theY1, double theX2, double theY2)
+std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(double theX1, double theY1, 
+                                                          double theX2, double theY2)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theX1, theY1, theX2, theY2));
 }
 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(
     const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
     const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theStartPoint, theEndPoint));
 }
-std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(const ModelHighAPI_Selection & theExternal)
+std::shared_ptr<SketchAPI_Line> 
+  SketchAPI_Sketch::addLine(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theExternal));
 }
 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theExternalName));
 }
 
 //--------------------------------------------------------------------------------------
-std::shared_ptr<SketchAPI_Rectangle> SketchAPI_Sketch::addRectangle(double theX1, double theY1, double theX2, double theY2)
+std::shared_ptr<SketchAPI_Rectangle> SketchAPI_Sketch::addRectangle(double theX1, double theY1, 
+                                                                    double theX2, double theY2)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchAPI_Rectangle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchAPI_Rectangle::ID());
   return RectanglePtr(new SketchAPI_Rectangle(aFeature, theX1, theY1, theX2, theY2));
 }
 std::shared_ptr<SketchAPI_Rectangle> SketchAPI_Sketch::addRectangle(
     const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
     const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchAPI_Rectangle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchAPI_Rectangle::ID());
   return RectanglePtr(new SketchAPI_Rectangle(aFeature, theStartPoint, theEndPoint));
 }
 
@@ -264,14 +283,17 @@ std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(double theCenterX,
                                                               double theCenterY,
                                                               double theRadius)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theCenterX, theCenterY, theRadius));
 }
 
-std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                                                              double theRadius)
+std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(
+                                    const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                                    double theRadius)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theCenter, theRadius));
 }
 
@@ -279,28 +301,34 @@ std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(double theX1, doub
                                                               double theX2, double theY2,
                                                               double theX3, double theY3)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theX1, theY1, theX2, theY2, theX3, theY3));
 }
 
-std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
-                                                              const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
-                                                              const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3)
+std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, thePoint1, thePoint2, thePoint3));
 }
 
-std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const ModelHighAPI_Selection & theExternal)
+std::shared_ptr<SketchAPI_Circle> 
+  SketchAPI_Sketch::addCircle(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theExternal));
 }
 
 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::string & theExternalName)
 {
   // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theExternalName));
 }
 
@@ -310,7 +338,8 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theCenterX, doubl
                                                         double theEndX, double theEndY,
                                                         bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature,
                                   theCenterX, theCenterY,
                                   theStartX, theStartY,
@@ -318,12 +347,14 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theCenterX, doubl
                                   theInversed));
 }
 
-std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                                                        const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
-                                                        const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
-                                                        bool theInversed)
+std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
+                                              const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                                              const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
+                                              const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
+                                              bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theCenter, theStart, theEnd, theInversed));
 }
 
@@ -331,47 +362,56 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theStartX, double
                                                         double theEndX, double theEndY,
                                                         double thePassedX, double thePassedY)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature,
                                   theStartX, theStartY,
                                   theEndX, theEndY,
                                   thePassedX, thePassedY));
 }
 
-std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
-                                                        const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
-                                                        const std::shared_ptr<GeomAPI_Pnt2d>& thePassed)
+std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
+                                                const std::shared_ptr<GeomAPI_Pnt2d>& thePassed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theStart, theEnd, thePassed));
 }
 
-std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_RefAttr& theTangentPoint,
-                                                        double theEndX, double theEndY,
-                                                        bool theInversed)
+std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
+                                                const ModelHighAPI_RefAttr& theTangentPoint,
+                                                double theEndX, double theEndY,
+                                                bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theTangentPoint, theEndX, theEndY, theInversed));
 }
 
-std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_RefAttr& theTangentPoint,
-                                                        const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
-                                                        bool theInversed)
+std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
+                                              const ModelHighAPI_RefAttr& theTangentPoint,
+                                              const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
+                                              bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theTangentPoint, theEnd, theInversed));
 }
 
 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theExternal));
 }
 
 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::string & theExternalName)
 {
   // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theExternalName));
 }
 
@@ -379,14 +419,16 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::string & theE
 std::shared_ptr<SketchAPI_Projection> SketchAPI_Sketch::addProjection(
     const ModelHighAPI_Selection & theExternalFeature)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Projection::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Projection::ID());
   return ProjectionPtr(new SketchAPI_Projection(aFeature, theExternalFeature));
 }
 
 std::shared_ptr<SketchAPI_Projection> SketchAPI_Sketch::addProjection(
     const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Projection::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_Projection::ID());
   return ProjectionPtr(new SketchAPI_Projection(aFeature, theExternalName));
 }
 
@@ -395,7 +437,8 @@ std::shared_ptr<SketchAPI_Mirror> SketchAPI_Sketch::addMirror(
     const ModelHighAPI_RefAttr & theMirrorLine,
     const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_ConstraintMirror::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_ConstraintMirror::ID());
   return MirrorPtr(new SketchAPI_Mirror(aFeature, theMirrorLine, theObjects));
 }
 
@@ -407,8 +450,10 @@ std::shared_ptr<SketchAPI_Translation> SketchAPI_Sketch::addTranslation(
     const ModelHighAPI_Integer & theNumberOfObjects,
     bool theFullValue)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_MultiTranslation::ID());
-  return TranslationPtr(new SketchAPI_Translation(aFeature, theObjects, thePoint1, thePoint2, theNumberOfObjects, theFullValue));
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_MultiTranslation::ID());
+  return TranslationPtr(new SketchAPI_Translation(aFeature, theObjects, thePoint1, 
+                                                  thePoint2, theNumberOfObjects, theFullValue));
 }
 
 //--------------------------------------------------------------------------------------
@@ -419,16 +464,21 @@ std::shared_ptr<SketchAPI_Rotation> SketchAPI_Sketch::addRotation(
     const ModelHighAPI_Integer & theNumberOfObjects,
     bool theFullValue)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_MultiRotation::ID());
-  return RotationPtr(new SketchAPI_Rotation(aFeature, theObjects, theCenter, theAngle, theNumberOfObjects, theFullValue));
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_MultiRotation::ID());
+  return RotationPtr(
+    new SketchAPI_Rotation(aFeature, theObjects, theCenter, 
+                           theAngle, theNumberOfObjects, theFullValue));
 }
 
 //--------------------------------------------------------------------------------------
-std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::addSplit(const ModelHighAPI_Reference& theFeature,
-                                                             const ModelHighAPI_RefAttr& thePoint1,
-                                                             const ModelHighAPI_RefAttr& thePoint2)
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::addSplit(
+                                                    const ModelHighAPI_Reference& theFeature,
+                                                    const ModelHighAPI_RefAttr& thePoint1,
+                                                    const ModelHighAPI_RefAttr& thePoint2)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_ConstraintSplit::ID());
+  std::shared_ptr<ModelAPI_Feature> aFeature = 
+    compositeFeature()->addFeature(SketchPlugin_ConstraintSplit::ID());
   fillAttribute(theFeature, aFeature->reference(SketchPlugin_Constraint::VALUE()));
   fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
   fillAttribute(thePoint2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
@@ -660,7 +710,8 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const
 
   AttributeSelectionPtr anExternal = aBase->selection(SketchPlugin_SketchEntity::EXTERNAL_ID());
   if (anExternal->value()) {
-    theDumper << aBase << " = model.addSketch(" << aDocName << ", " << anExternal << ")" << std::endl;
+    theDumper << aBase << " = model.addSketch(" << aDocName <<
+      ", " << anExternal << ")" << std::endl;
   } else {
     // Sketch is base on a plane.
     std::shared_ptr<GeomAPI_Pnt> anOrigin = std::dynamic_pointer_cast<GeomDataAPI_Point>(
@@ -678,7 +729,8 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const
         theDumper << aBase << " = model.addSketch(" << aDocName
                   << ", model.standardPlane(\"" << aPlaneName << "\"))" << std::endl;
       } else { // some other plane
-        theDumper << aBase << " = model.addSketch(" << aDocName << ", " << anExternal<< ")" << std::endl;
+        theDumper << aBase << " = model.addSketch(" << aDocName << 
+          ", " << anExternal<< ")" << std::endl;
       }
     } else {
       if (aPlaneName.empty()) {
index 462f1de1e9244f79b6f4c22aafa4273c9159dfe1..60c5e4202bf0f2979ca4cf09c4cd88d64ea28b92 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Sketch.h
 // Purpose: 
 //
@@ -63,13 +64,20 @@ public:
   virtual ~SketchAPI_Sketch();
 
   INTERFACE_7(SketchPlugin_Sketch::ID(),
-              origin, SketchPlugin_Sketch::ORIGIN_ID(), GeomDataAPI_Point, /** Origin point */,
-              dirX, SketchPlugin_Sketch::DIRX_ID(), GeomDataAPI_Dir, /** Direction of X */,
-              normal, SketchPlugin_Sketch::NORM_ID(), GeomDataAPI_Dir, /** Normal */,
-              features, SketchPlugin_Sketch::FEATURES_ID(), ModelAPI_AttributeRefList, /** Features */,
-              external, SketchPlugin_SketchEntity::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */,
-              solverError, SketchPlugin_Sketch::SOLVER_ERROR(), ModelAPI_AttributeString, /** Solver error */,
-              solverDOF, SketchPlugin_Sketch::SOLVER_DOF(), ModelAPI_AttributeString, /** Solver DOF */
+              origin, SketchPlugin_Sketch::ORIGIN_ID(),
+              GeomDataAPI_Point, /** Origin point */,
+              dirX, SketchPlugin_Sketch::DIRX_ID(),
+              GeomDataAPI_Dir, /** Direction of X */,
+              normal, SketchPlugin_Sketch::NORM_ID(),
+              GeomDataAPI_Dir, /** Normal */,
+              features, SketchPlugin_Sketch::FEATURES_ID(), 
+              ModelAPI_AttributeRefList, /** Features */,
+              external, SketchPlugin_SketchEntity::EXTERNAL_ID(), 
+              ModelAPI_AttributeSelection, /** External */,
+              solverError, SketchPlugin_Sketch::SOLVER_ERROR(),
+              ModelAPI_AttributeString, /** Solver error */,
+              solverDOF, SketchPlugin_Sketch::SOLVER_DOF(),
+              ModelAPI_AttributeString, /** Solver DOF */
   )
 
   /// Set plane
@@ -101,10 +109,12 @@ public:
 
   /// Add intersection point
   SKETCHAPI_EXPORT
-  std::shared_ptr<SketchAPI_IntersectionPoint> addIntersectionPoint(const ModelHighAPI_Selection & theExternal);
+  std::shared_ptr<SketchAPI_IntersectionPoint> 
+    addIntersectionPoint(const ModelHighAPI_Selection & theExternal);
   /// Add point
   SKETCHAPI_EXPORT
-  std::shared_ptr<SketchAPI_IntersectionPoint> addIntersectionPoint(const std::string & theExternalName);
+  std::shared_ptr<SketchAPI_IntersectionPoint> 
+    addIntersectionPoint(const std::string & theExternalName);
 
   /// Add line
   SKETCHAPI_EXPORT
index 24758c6803b8f70bd7422ec95e202a613b8d493a..b693505d1ab44df2e9e158acbc33f4d02eaf5d12 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_SketchEntity.cpp
 // Purpose: 
 //
@@ -87,7 +88,8 @@ SketchAPI_SketchEntity::wrap(const std::list<std::shared_ptr<ModelAPI_Feature> >
     else if ((*anIt)->getKind() == SketchPlugin_Point::ID())
       aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_Point(*anIt)));
     else if ((*anIt)->getKind() == SketchPlugin_IntersectionPoint::ID())
-      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_IntersectionPoint(*anIt)));
+      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(
+                                                    new SketchAPI_IntersectionPoint(*anIt)));
   }
   return aResult;
 }
index 77773910f8f5f6518119960061261a629f27c5e7..fdd3b40a990893db300f983ec15e2de28c6a5013 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_SketchEntity.h
 // Purpose: 
 //
index 53c18e97100a8971271801c699d48934ddb18494..67e8457e90ce68765c3385979da42ef4b2d55751 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Translation.cpp
 // Purpose: 
 //
index b6093844494600a6b8ce88d014992534bc381c36..aee6e38bfab883e8fcad08b2efe09378b89762ba 100644 (file)
@@ -1,3 +1,4 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Translation.h
 // Purpose: 
 //
@@ -44,13 +45,20 @@ public:
   virtual ~SketchAPI_Translation();
 
   INTERFACE_7(SketchPlugin_MultiTranslation::ID(),
-              translationList, SketchPlugin_MultiTranslation::TRANSLATION_LIST_ID(), ModelAPI_AttributeRefList, /** Translation list */,
-              startPoint, SketchPlugin_MultiTranslation::START_POINT_ID(), ModelAPI_AttributeRefAttr, /** Start point */,
-              endPoint, SketchPlugin_MultiTranslation::END_POINT_ID(), ModelAPI_AttributeRefAttr, /** Start point */,
-              numberOfObjects, SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger, /** Number of objects */,
-              valueType, SketchPlugin_MultiTranslation::VALUE_TYPE(), ModelAPI_AttributeString, /** Value type */,
-              referenceObjects, SketchPlugin_MultiTranslation::ENTITY_A(), ModelAPI_AttributeRefList, /** Reference objects */,
-              translatedObjects, SketchPlugin_MultiTranslation::ENTITY_B(), ModelAPI_AttributeRefList, /** Translationed objects */
+              translationList, SketchPlugin_MultiTranslation::TRANSLATION_LIST_ID(),
+              ModelAPI_AttributeRefList, /** Translation list */,
+              startPoint, SketchPlugin_MultiTranslation::START_POINT_ID(),
+              ModelAPI_AttributeRefAttr, /** Start point */,
+              endPoint, SketchPlugin_MultiTranslation::END_POINT_ID(),
+              ModelAPI_AttributeRefAttr, /** Start point */,
+              numberOfObjects, SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID(),
+              ModelAPI_AttributeInteger, /** Number of objects */,
+              valueType, SketchPlugin_MultiTranslation::VALUE_TYPE(),
+              ModelAPI_AttributeString, /** Value type */,
+              referenceObjects, SketchPlugin_MultiTranslation::ENTITY_A(),
+              ModelAPI_AttributeRefList, /** Reference objects */,
+              translatedObjects, SketchPlugin_MultiTranslation::ENTITY_B(),
+              ModelAPI_AttributeRefList, /** Translationed objects */
   )
 
   /// List of translated objects
index 25750ff5d77f5411b52e31b728108ecc18ef92f6..0427ff1f46651d05764e97a8b3a0e7f9824ab54e 100644 (file)
@@ -90,8 +90,10 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint,
   if (!anAttr2->isInitialized())
     return aReadyToDisplay;
 
-  FeaturePtr aLineA = SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_A());
-  FeaturePtr aLineB = SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_B());
+  FeaturePtr aLineA = 
+    SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_A());
+  FeaturePtr aLineB = 
+    SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_B());
 
   if (!aLineA.get() || !aLineB.get())
     return aReadyToDisplay;
@@ -106,16 +108,22 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint,
       aLineB->attribute(SketchPlugin_Line::END_ID()));
 
   std::shared_ptr<GeomAPI_Angle2d> anAng;
-  if (!aData->attribute(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID())->isInitialized() ||
-      !aData->attribute(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->isInitialized())
+  bool isFirstPnt = aData->attribute(
+    SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID())->isInitialized();
+  bool isSecondPnt = aData->attribute(
+    SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->isInitialized();
+  if (!isFirstPnt || !isSecondPnt)
     anAng = std::shared_ptr<GeomAPI_Angle2d>(new GeomAPI_Angle2d(
         aStartA->pnt(), aEndA->pnt(), aStartB->pnt(), aEndB->pnt()));
   else {
     std::shared_ptr<GeomAPI_Lin2d> aLine1(new GeomAPI_Lin2d(aStartA->pnt(), aEndA->pnt()));
-    bool isReversed1 = aData->boolean(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID())->value();
+    bool isReversed1 = 
+      aData->boolean(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID())->value();
     std::shared_ptr<GeomAPI_Lin2d> aLine2(new GeomAPI_Lin2d(aStartB->pnt(), aEndB->pnt()));
-    bool isReversed2 = aData->boolean(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->value();
-    anAng = std::shared_ptr<GeomAPI_Angle2d>(new GeomAPI_Angle2d(aLine1, isReversed1, aLine2, isReversed2));
+    bool isReversed2 = 
+      aData->boolean(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->value();
+    anAng = std::shared_ptr<GeomAPI_Angle2d>(
+      new GeomAPI_Angle2d(aLine1, isReversed1, aLine2, isReversed2));
   }
 
   gp_Pnt2d aFirstPoint = anAng->firstPoint()->impl<gp_Pnt2d>();
@@ -139,20 +147,23 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP
                                 const Standard_Integer theMode)
 {
   gp_Pnt aFirstPoint, aSecondPoint, aCenterPoint;
-  bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane, aFirstPoint, aSecondPoint, aCenterPoint);
+  bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane, 
+                                        aFirstPoint, aSecondPoint, aCenterPoint);
   if (aReadyToDisplay) {
     myFirstPoint = aFirstPoint;
     mySecondPoint = aSecondPoint;
     myCenterPoint = aCenterPoint;
 
     DataPtr aData = myConstraint->data();
-    AttributeDoublePtr anAttributeValue = aData->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
+    AttributeDoublePtr anAttributeValue = 
+      aData->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
     myValue.init(anAttributeValue);
 
     std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = 
                                 std::dynamic_pointer_cast<GeomDataAPI_Point2D>
                                 (aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-    std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = mySketcherPlane->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
+    std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = 
+      mySketcherPlane->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
     myFlyOutPoint = aFlyoutPnt->impl<gp_Pnt>();
   }
 
@@ -258,12 +269,5 @@ bool SketcherPrs_Angle::isAnglePlaneReversedToSketchPlane()
 
 double SketcherPrs_Angle::calculateDistanceToFlyoutPoint()
 {
-  //gp_Dir aBisector = gp_Dir((myFirstPoint.XYZ() + mySecondPoint.XYZ()) * 0.5 - myCenterPoint.XYZ());
-  //gp_XYZ aFlyDir = myFlyOutPoint.XYZ() - myCenterPoint.XYZ();
-
-  //double aDistance = aFlyDir.Dot(aBisector.XYZ());
-  //// make a positive distance in order to AIS angle presentation is not reversed
-  //aDistance = fabs(aDistance);
-  //return aDistance;
   return myFlyOutPoint.Distance(myCenterPoint);
 }
index 7749848e4dd1704fe948d62aed4260a8e5d33c21..de294a98c1676183a7ee2b145774f8701028a1d0 100644 (file)
@@ -36,7 +36,8 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_Angle)
 
-  /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
+  /// Returns true if the constraint feature arguments are correcly filled 
+  /// to build AIS presentation
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
   /// \return boolean result value
@@ -44,7 +45,8 @@ public:
                                const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 protected:
   /// Redefinition of virtual function
-  Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  Standard_EXPORT virtual void Compute(
+    const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
 
   /// Redefinition of virtual function
index 26a5e682c9c4f200a339410ed107b9e9b1974bc8..cfb233defe1ee5de533bbb17ca61a4cb832a53f0 100644 (file)
@@ -66,9 +66,10 @@ bool SketcherPrs_Coincident::readyToDisplay(ModelAPI_Feature* theConstraint,
 }
 
 
-void SketcherPrs_Coincident::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                                   const Handle(Prs3d_Presentation)& thePresentation, 
-                                   const Standard_Integer theMode)
+void SketcherPrs_Coincident::Compute(
+  const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Standard_Integer theMode)
 {
   gp_Pnt aPoint;
   bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane, aPoint);
index 9d6d799adcd971c9e728f49d292e78c7052a54f6..f6e7d4a36f6c8b62c8fb69040fd89724b99a9ea0 100644 (file)
@@ -39,11 +39,13 @@ public:
   Standard_EXPORT virtual void SetColor(const Quantity_NameOfColor aColor);
 
   /// Set state of the presentation, in case of conflicting state, the icon of the presentation is
-  /// visualized in error color. The state is stored in an internal field, so should be changed when
+  /// visualized in error color. 
+  /// The state is stored in an internal field, so should be changed when
   /// constraint become not conflicting
   /// \param theConflicting a state
   /// \param theColor a color for conflicting object
-  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting, const std::vector<int>& theColor);
+  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting, 
+                                                const std::vector<int>& theColor);
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
@@ -55,7 +57,8 @@ public:
   DEFINE_STANDARD_RTTI(SketcherPrs_Coincident)
 protected:
   /// Redefinition of virtual function
-  Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  Standard_EXPORT virtual void Compute(
+    const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
 
   /// Redefinition of virtual function
index 8b069825aca96ad221829f83d15276b23a7c5ffb..bd88e9289fff6e34f5609b8c04b14552e5cd48e5 100755 (executable)
@@ -33,8 +33,10 @@ bool SketcherPrs_Collinear::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 =
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
                     SketcherPrs_Tools::getShape(aObj2).get() != NULL;
@@ -47,8 +49,10 @@ bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Set points of the presentation
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
@@ -59,11 +63,13 @@ bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Collinear::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Collinear::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                      Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   // Draw constrained lines
index 5c9e3fbe6c81cc9102c1ad36d5a402aa25ee6935..30a1931063b391cb9eb4418b5deeed84115bfe1f 100755 (executable)
@@ -51,7 +51,8 @@ SketcherPrs_DimensionStyleListener::~SketcherPrs_DimensionStyleListener()
   aLoop->removeListener(this);
 }
 
-void SketcherPrs_DimensionStyleListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void SketcherPrs_DimensionStyleListener::processEvent(
+  const std::shared_ptr<Events_Message>& theMessage)
 {
   const Events_ID kParameterStyleEvent = SketcherPrs_ParameterStyleMessage::eventId();
   if (theMessage->eventID() == kParameterStyleEvent) {
@@ -90,7 +91,8 @@ void SketcherPrs_DimensionStyleListener::updateDimensions(AIS_Dimension* theDime
       aCustomValue = theTextValue.c_str();
     else {
       // format value string using "sprintf"
-      TCollection_AsciiString aFormatStr = theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
+      TCollection_AsciiString aFormatStr = 
+        theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
       char aFmtBuffer[256];
       sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
       aCustomValue = TCollection_ExtendedString (aFmtBuffer);
@@ -100,7 +102,8 @@ void SketcherPrs_DimensionStyleListener::updateDimensions(AIS_Dimension* theDime
   }
   else {
     // format value string using "sprintf"
-    TCollection_AsciiString aFormatStr = theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
+    TCollection_AsciiString aFormatStr =
+      theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
     char aFmtBuffer[256];
     sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
     aCustomValue = TCollection_ExtendedString (aFmtBuffer);
index 74ed7d4db3ea51a21d4706146cc75e9066a6071b..518774fa31b8a0e33615437f2ce724e17c5ec78d 100644 (file)
@@ -33,8 +33,10 @@ bool SketcherPrs_Equal::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
                     SketcherPrs_Tools::getShape(aObj2).get() != NULL;
@@ -47,8 +49,10 @@ bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Set points of the presentation
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
@@ -59,11 +63,13 @@ bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Equal::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Equal::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                  Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   // Draw first line
index 449c3c24ae7577ff0c55de30a4439727adea1a78..8c8af38abfd9bc0ac7812f70640a9abeb213d7de 100644 (file)
@@ -64,7 +64,8 @@ AISObjectPtr SketcherPrs_Factory::horisontalConstraint(ModelAPI_Feature* theCons
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_HVDirection) aPrs = new SketcherPrs_HVDirection(theConstraint, thePlane, true); 
+      Handle(SketcherPrs_HVDirection) aPrs = 
+        new SketcherPrs_HVDirection(theConstraint, thePlane, true);
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
   }
@@ -81,7 +82,8 @@ AISObjectPtr SketcherPrs_Factory::verticalConstraint(ModelAPI_Feature* theConstr
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_HVDirection) aPrs = new SketcherPrs_HVDirection(theConstraint, thePlane, false); 
+      Handle(SketcherPrs_HVDirection) aPrs = 
+        new SketcherPrs_HVDirection(theConstraint, thePlane, false);
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
   }
@@ -98,7 +100,8 @@ AISObjectPtr SketcherPrs_Factory::translateConstraint(ModelAPI_Feature* theConst
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_Transformation) aPrs = new SketcherPrs_Transformation(theConstraint, thePlane, true); 
+      Handle(SketcherPrs_Transformation) aPrs = 
+        new SketcherPrs_Transformation(theConstraint, thePlane, true); 
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
   }
@@ -115,7 +118,8 @@ AISObjectPtr SketcherPrs_Factory::rotateConstraint(ModelAPI_Feature* theConstrai
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_Transformation) aPrs = new SketcherPrs_Transformation(theConstraint, thePlane, false); 
+      Handle(SketcherPrs_Transformation) aPrs = 
+        new SketcherPrs_Transformation(theConstraint, thePlane, false); 
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
   }
index b0a7066186a84653eae58ff24a4c623ddc3bf943..33500e1c54c758179b68f558fba6a82136db08b1 100644 (file)
@@ -30,7 +30,8 @@ bool SketcherPrs_HVDirection::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                                const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
 {
   bool aReadyToDisplay = false;
-  ObjectPtr aObj = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj).get() != NULL;
   return aReadyToDisplay;
@@ -49,12 +50,14 @@ bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_HVDirection::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_HVDirection::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                        Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
   // Draw constrained object
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   addLine(aGroup, SketchPlugin_Constraint::ENTITY_A());
index 024d8962d3e75159532718d8913b0b24b909357f..267cc476ec17cf6a2ce394ff5e8101aa2916fdea 100644 (file)
@@ -35,7 +35,7 @@ IMPLEMENT_STANDARD_HANDLE(SketcherPrs_LengthDimension, AIS_LengthDimension);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension);
 
 SketcherPrs_LengthDimension::SketcherPrs_LengthDimension(ModelAPI_Feature* theConstraint,
-                                                         const std::shared_ptr<GeomAPI_Ax3>& thePlane)
+                                              const std::shared_ptr<GeomAPI_Ax3>& thePlane)
 : AIS_LengthDimension(MyDefStart, MyDefEnd, MyDefPln),
   myConstraint(theConstraint),
   mySketcherPlane(thePlane),
@@ -61,9 +61,10 @@ bool SketcherPrs_LengthDimension::IsReadyToDisplay(ModelAPI_Feature* theConstrai
   return readyToDisplay(theConstraint, thePlane, aPnt1, aPnt2);
 }
 
-void SketcherPrs_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                                          const Handle(Prs3d_Presentation)& thePresentation, 
-                                          const Standard_Integer theMode)
+void SketcherPrs_LengthDimension::Compute(
+  const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Standard_Integer theMode)
 {
   gp_Pnt aPnt1, aPnt2;
   bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane, aPnt1, aPnt2);
index f505e7fff4be7dbeccadf227c6bb91403c20321b..ef3087c76d31e0fcf3b5e2c37127b48c5b2392e4 100644 (file)
@@ -40,7 +40,8 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_LengthDimension)
 
-  /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
+  /// Returns true if the constraint feature arguments are correcly filled 
+  /// to build AIS presentation
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
   /// \return boolean result value
@@ -48,8 +49,10 @@ public:
                                const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 protected:
   /// Redefinition of virtual function
-  Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-    const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
+  Standard_EXPORT virtual void Compute(
+    const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+    const Handle(Prs3d_Presentation)& thePresentation, 
+    const Standard_Integer theMode = 0);
 
   /// Redefinition of virtual function
   Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
@@ -71,13 +74,15 @@ private:
   /// Listener to update dimension visualization style
   SketcherPrs_DimensionStyleListener* myStyleListener;
 
-  /// container of values obtained from the constraint, which are necessary to fill the presentation
+  /// container of values obtained from the constraint, which are necessary 
+  /// to fill the presentation
   gp_Pnt myFirstPoint; ///< the dimension first point for measured geometry
   gp_Pnt mySecondPoint; ///< the dimension first point for measured geometry
   gp_Pln myPlane; ///< the plane(plane of the sketch) for measured geometry
   double myDistance; ///< the flyout distance
 
-  SketcherPrs_DimensionStyleListener::DimensionValue myValue; /// the structure filled by constraint
+  /// the structure filled by constraint
+  SketcherPrs_DimensionStyleListener::DimensionValue myValue; 
 };
 
 #endif
\ No newline at end of file
index b3d22499470e5577a3a9656026cd1e865b58108c..8e2ed6816ba94c20ec4dd0f8aa4b47e81df488e9 100755 (executable)
@@ -30,8 +30,10 @@ bool SketcherPrs_Middle::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // one object is a feature Line, other object is a point result. We check shape of point result
   aReadyToDisplay = aObj1.get() && aObj2.get() &&
@@ -48,15 +50,18 @@ bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep) const
   ObjectPtr aPointObject;
 
   // find a line result to set middle symbol near it
-  AttributePtr anAttribute = SketcherPrs_Tools::getAttribute(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  AttributePtr anAttribute = 
+    SketcherPrs_Tools::getAttribute(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   if (!anAttribute.get()) {
-    ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+    ObjectPtr aObj = 
+      SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
     std::shared_ptr<GeomAPI_Shape> aShape = SketcherPrs_Tools::getShape(aObj);
     if (aShape.get() && aShape->isEdge())
       aPointObject = aObj;
   }
   if (!aPointObject.get()) {
-    ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+    ObjectPtr aObj = 
+      SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
     std::shared_ptr<GeomAPI_Shape> aShape = SketcherPrs_Tools::getShape(aObj);
     if (aShape.get() && aShape->isEdge())
       aPointObject = aObj;
@@ -72,15 +77,18 @@ bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Middle::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Middle::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                   Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   // Draw objects
-  ObjectPtr aObject = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObject = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   drawLine(thePrs, theColor, aObject);
 
   aObject = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
index 30bbc6ec33ceba0d29740ace179e984cf1bf37bf..a086d0f7b803bbaac9d3c6ab5c595b645790725f 100644 (file)
@@ -33,17 +33,20 @@ bool SketcherPrs_Mirror::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   bool aReadyToDisplay = false;
 
   // Get axis of mirror
-  ObjectPtr aAxisObj = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aAxisObj = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
   if (SketcherPrs_Tools::getShape(aAxisObj).get() == NULL)
     return aReadyToDisplay;
 
   std::shared_ptr<ModelAPI_Data> aData = theConstraint->data();
   // Get source objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = aData->reflist(SketchPlugin_Constraint::ENTITY_B());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return aReadyToDisplay;
   // Get mirrored objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = aData->reflist(SketchPlugin_Constraint::ENTITY_C());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_C());
   if (anAttrC.get() == NULL)
     return aReadyToDisplay;
 
@@ -63,13 +66,16 @@ bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
     return false;
 
   // Get axis of mirror
-  ObjectPtr aAxisObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aAxisObj = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
 
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
   // Get source objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = aData->reflist(SketchPlugin_Constraint::ENTITY_B());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   // Get mirrored objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = aData->reflist(SketchPlugin_Constraint::ENTITY_C());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_C());
 
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   int aNb = anAttrB->size();
@@ -98,13 +104,16 @@ bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Mirror::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Mirror::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+  Quantity_Color theColor) const
 {
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = aData->reflist(SketchPlugin_Constraint::ENTITY_B());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return;
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = aData->reflist(SketchPlugin_Constraint::ENTITY_C());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_C());
   if (anAttrC.get() == NULL)
     return;
 
index 431c396b0e963cf83bc01735b5e8eaf0e1c9f3cb..9b73b33854ce3f62a693215499268ecefd3792e0 100644 (file)
@@ -35,8 +35,10 @@ bool SketcherPrs_Parallel::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
                     SketcherPrs_Tools::getShape(aObj2).get() != NULL;
@@ -48,8 +50,10 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Compute position of symbols
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
@@ -61,11 +65,13 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Parallel::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Parallel::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+  Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   // Draw constrained lines
index 58a7cdec88a6c0ca8a9e7a5b502b2300be2b67f5..d9d280f99e5235b4b48ca8b4233e3522286ace01 100644 (file)
@@ -21,7 +21,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs);
 static Handle(Image_AlienPixMap) MyPixMap;
 
 SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint, 
-                                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+                                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
   // Create default array
@@ -35,8 +35,10 @@ bool SketcherPrs_Perpendicular::IsReadyToDisplay(ModelAPI_Feature* theConstraint
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
                     SketcherPrs_Tools::getShape(aObj2).get() != NULL;
@@ -48,8 +50,10 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Compute position of symbols
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
@@ -61,11 +65,13 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Perpendicular::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Perpendicular::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                          Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   // Draw constrained lines
index 22d9837129720d09cd36def4c13187900df73568..0261528f5895f8fde8b594fa566b87cb2befdd2c 100644 (file)
@@ -59,7 +59,8 @@ gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
   gp_Pnt aP; // Central point
   gp_Vec aVec1; // main vector
   if (aShape->isEdge()) {
-    std::shared_ptr<GeomAPI_Curve> aCurve = std::shared_ptr<GeomAPI_Curve>(new GeomAPI_Curve(aShape));
+    std::shared_ptr<GeomAPI_Curve> aCurve = 
+      std::shared_ptr<GeomAPI_Curve>(new GeomAPI_Curve(aShape));
     std::shared_ptr<GeomAPI_Pnt> aPnt1; // Start point of main vector
     std::shared_ptr<GeomAPI_Pnt> aPnt2; // End point of main vector
     if (aCurve->isLine()) {
@@ -86,7 +87,8 @@ gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
     aVec1 = gp_Vec(aPnt1->impl<gp_Pnt>(), aPnt2->impl<gp_Pnt>());
   } else {
     // This is a point
-    std::shared_ptr<GeomAPI_Vertex> aVertex = std::shared_ptr<GeomAPI_Vertex>(new GeomAPI_Vertex(aShape));
+    std::shared_ptr<GeomAPI_Vertex> aVertex = 
+      std::shared_ptr<GeomAPI_Vertex>(new GeomAPI_Vertex(aShape));
     std::shared_ptr<GeomAPI_Pnt> aPnt = aVertex->point();
     aP = aPnt->impl<gp_Pnt>();
 
index 4edb8778b638b07e02483d92ba2781a560109646..826ae8379e3372947540a594724a6ac0cb38a670 100644 (file)
@@ -104,7 +104,8 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
   std::shared_ptr<GeomAPI_Dir> aNormal = thePlane->normal();
 
   GeomAPI_Circ aCircle(aCenter, aNormal, aRadius);
-  std::shared_ptr<GeomAPI_Pnt> anAnchor = SketcherPrs_Tools::getAnchorPoint(theConstraint, thePlane);
+  std::shared_ptr<GeomAPI_Pnt> anAnchor = 
+    SketcherPrs_Tools::getAnchorPoint(theConstraint, thePlane);
 
   theCircle = aCircle.impl<gp_Circ>();
   theAnchorPoint = anAnchor->impl<gp_Pnt>();
@@ -114,9 +115,10 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-void SketcherPrs_Radius::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                                 const Handle(Prs3d_Presentation)& thePresentation, 
-                                 const Standard_Integer theMode)
+void SketcherPrs_Radius::Compute(
+  const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Standard_Integer theMode)
 {
   gp_Circ aCircle;
   gp_Pnt anAnchorPoint;
index ee3cbe929d656addba17d095c4b2710d1735c91e..6710652ce2fc21ad8eb0b5415ee88897e6cee7b9 100644 (file)
@@ -36,7 +36,8 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_Radius)
 
-  /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
+  /// Returns true if the constraint feature arguments are correcly filled 
+  /// to build AIS presentation
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
   /// \return boolean result value
@@ -54,7 +55,8 @@ private:
                              gp_Circ& theCircle, gp_Pnt& theAnchorPoint);
 protected:
   /// Redefinition of virtual function
-  Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  Standard_EXPORT virtual void Compute(
+    const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
 
   /// Redefinition of virtual function
index 082ab5cfc6bfde3476b3d6461ce1a7a623069b91..d2e993331f1bf79ac364849c2e29dfdb1a6aa629 100644 (file)
@@ -49,7 +49,8 @@ bool SketcherPrs_Rigid::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   bool aReadyToDisplay = false;
 
   std::shared_ptr<ModelAPI_Data> aData = theConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = aData->refattr(SketchPlugin_Constraint::ENTITY_A());
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+    aData->refattr(SketchPlugin_Constraint::ENTITY_A());
   AttributePtr aRefAttr = anAttr->attr();
   if (anAttr->isObject()) {
     // The constraint attached to an object
@@ -59,7 +60,7 @@ bool SketcherPrs_Rigid::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   } else {
     // The constraint attached to a point
     std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theConstraint,
-                                                                 SketchPlugin_Constraint::ENTITY_A());
+                                                   SketchPlugin_Constraint::ENTITY_A());
     aReadyToDisplay = aPnt.get() != NULL;
   }
   return aReadyToDisplay;
@@ -71,7 +72,8 @@ bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const
     return false;
 
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = aData->refattr(SketchPlugin_Constraint::ENTITY_A());
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+    aData->refattr(SketchPlugin_Constraint::ENTITY_A());
   AttributePtr aRefAttr = anAttr->attr();
   if (anAttr->isObject()) {
     // The constraint attached to an object
@@ -91,7 +93,8 @@ bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Rigid::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Rigid::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                  Quantity_Color theColor) const
 {
   ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
@@ -114,7 +117,8 @@ void SketcherPrs_Rigid::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quan
     return;
 
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   Handle(Prs3d_PointAspect) aPntAspect = new Prs3d_PointAspect(Aspect_TOM_PLUS, theColor, 1);
index 417a6a0c8b1ab21a68d2fda0b59b17695c5619c1..61c33fab80d3b361e4d5835095537ea1487cf1a2 100644 (file)
 IMPLEMENT_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity);
 
-SketcherPrs_SensitivePoint::SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& anOwner,
-                                                       int theId)
+SketcherPrs_SensitivePoint::SketcherPrs_SensitivePoint(
+  const Handle(SelectBasics_EntityOwner)& anOwner, int theId)
 :Select3D_SensitiveEntity(anOwner), myId(theId)
 {
   SetSensitivityFactor(12);
 }
 
-Standard_Boolean SketcherPrs_SensitivePoint::Matches (SelectBasics_SelectingVolumeManager& theMgr,
+Standard_Boolean SketcherPrs_SensitivePoint::Matches(SelectBasics_SelectingVolumeManager& theMgr,
                                                    SelectBasics_PickResult& thePickResult)
 {
   Standard_Real aDepth      = RealLast();
index 000df1a4fed08076817643170735018073764da8..ac9c93ba778c2e61ca36c9cb6d737af22e6404a3 100644 (file)
@@ -24,7 +24,8 @@ public:
   //! Constructs a sensitive point object defined by the
   //! \param OwnerId an Id of the Owner.
   //! \param theId and Id of its point
-  Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId, int theId);
+  Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId,
+                                             int theId);
   
   /// Returns number of sub-elements
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
@@ -35,8 +36,8 @@ public:
   //! Checks whether the point overlaps current selecting volume
   //! \param theMgr selection manager
   //! \param thePickResult returns pick result
-  Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
-                                                    SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
+  Standard_EXPORT virtual Standard_Boolean Matches(SelectBasics_SelectingVolumeManager& theMgr,
+                                     SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
 
   //! Returns the point used at the time of construction.
   Standard_EXPORT gp_Pnt Point() const;
index 5f551735422f9edec93bf358c2e54b06d7e97a39..2e2779c7b6963a8520656e3d55712b2a67e6cdeb 100644 (file)
@@ -140,7 +140,8 @@ public:
       if (aDataType == GL_NONE) {
         continue;
       } else if (anAttrib.Id == Graphic3d_TOA_POS) {
-        OpenGl_VertexBuffer::bindAttribute (theGlCtx, Graphic3d_TOA_POS, aNbComp, aDataType, Stride, anOffset);
+        OpenGl_VertexBuffer::bindAttribute(theGlCtx, Graphic3d_TOA_POS, aNbComp,
+                                           aDataType, Stride, anOffset);
         break;
       }
 
@@ -165,7 +166,8 @@ public:
       if (aDataType == GL_NONE)
         continue;
 
-      OpenGl_VertexBuffer::bindAttribute (theGlCtx, anAttrib.Id, aNbComp, aDataType, Stride, anOffset);
+      OpenGl_VertexBuffer::bindAttribute(theGlCtx, anAttrib.Id, aNbComp, 
+                                         aDataType, Stride, anOffset);
       anOffset += Graphic3d_Attribute::Stride (anAttrib.DataType);
     }
   }
@@ -233,7 +235,9 @@ OpenGl_Element* SymbolPrsCallBack(const CALL_DEF_USERDRAW * theUserDraw)
 {
   Handle(SketcherPrs_SymbolPrs) anIObj = (SketcherPrs_SymbolPrs*)theUserDraw->Data;
   if (anIObj.IsNull()) {
-    std::cout << "VUserDrawCallback error: null object passed, the custom scene element will not be rendered" << std::endl;
+    std::cout << 
+      "VUserDrawCallback error: null object passed, the custom scene element will not be rendered"
+      << std::endl;
   }
   return new SketcherPrs_Element(anIObj);
 }
@@ -311,7 +315,8 @@ void SketcherPrs_SymbolPrs::prepareAspect()
   }
 }
 
-void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup, std::string theAttrName) const
+void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup, 
+                                    std::string theAttrName) const
 {
   ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, theAttrName);
   std::shared_ptr<GeomAPI_Shape> aLine = SketcherPrs_Tools::getShape(aObj);
@@ -329,7 +334,7 @@ void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup, std
   theGroup->AddPrimitiveArray(aLines);
 }
 
-void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, 
+void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
                                            const SelectMgr_SequenceOfOwner& theOwners)
 {
 
@@ -342,9 +347,10 @@ void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationMana
   thePM->Highlight(this);
 }
 
-void SketcherPrs_SymbolPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, 
-                                                 const Quantity_NameOfColor theColor, 
-                                                 const Handle(SelectMgr_EntityOwner)& theOwner)
+void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
+  const Handle(PrsMgr_PresentationManager3d)& thePM, 
+  const Quantity_NameOfColor theColor, 
+  const Handle(SelectMgr_EntityOwner)& theOwner)
 {
   thePM->Color(this, theColor);
 
@@ -356,15 +362,17 @@ void SketcherPrs_SymbolPrs::HilightOwnerWithColor(const Handle(PrsMgr_Presentati
     thePM->AddToImmediateList(aHilightPrs);
 }
 
-void SketcherPrs_SymbolPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                                   const Handle(Prs3d_Presentation)& thePresentation, 
-                                   const Standard_Integer theMode)
+void SketcherPrs_SymbolPrs::Compute(
+  const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Standard_Integer theMode)
 {
   // Create an icon
   prepareAspect();
 
   Handle(AIS_InteractiveContext) aCtx = GetContext();
-  Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast(aCtx->CurrentViewer()->Driver());
+  Handle(OpenGl_GraphicDriver) aDriver = 
+    Handle(OpenGl_GraphicDriver)::DownCast(aCtx->CurrentViewer()->Driver());
   if (!aDriver.IsNull()) {
     // register the custom element factory function
     aDriver->UserDrawCallback() = SymbolPrsCallBack;
@@ -430,8 +438,8 @@ void SketcherPrs_SymbolPrs::SetConflictingConstraint(const bool& theConflicting,
   if (theConflicting)
   {
     if (!myAspect.IsNull())
-      myAspect->SetColor (Quantity_Color (theColor[0] / 255., theColor[1] / 255., theColor[2] / 255.,
-                          Quantity_TOC_RGB));
+      myAspect->SetColor (Quantity_Color (theColor[0] / 255., theColor[1] / 255., 
+                          theColor[2] / 255., Quantity_TOC_RGB));
     myIsConflicting = true;
   }
   else
@@ -447,7 +455,8 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
   // this method is a combination of OCCT OpenGL functions. The main purpose is to have
   // equal distance from the source object to symbol indpendently of zoom.
   // It is base on OCCT 6.9.1 and might need changes when using later OCCT versions.
-  // The specific SHAPER modifications are marked by ShaperModification:start/end, other is OCCT code
+  // The specific SHAPER modifications are marked by ShaperModification:start/end, 
+  // other is OCCT code
 
   // do not update presentation for invalid or already removed objects: the presentation
   // should be removed soon
@@ -472,7 +481,8 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
   }
 
   // Update drawing attributes
-  if (!myVboAttribs->init(aCtx, 0, aAttribs->NbElements, aAttribs->Data(), GL_NONE, aAttribs->Stride)) {
+  if (!myVboAttribs->init(aCtx, 0, aAttribs->NbElements, 
+                          aAttribs->Data(), GL_NONE, aAttribs->Stride)) {
     myVboAttribs->Release (aCtx.operator->());
     myVboAttribs.Nullify();
     return;
@@ -484,14 +494,17 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
       
   if (!aSpriteNorm.IsNull() && !aSpriteNorm->IsDisplayList()) {
     // ShaperModification:start : filling the presentation with color if there is a conflict
-    const bool toHilight = (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT) != 0 || myIsConflicting;
+    const bool toHilight = 
+      (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT) != 0 || myIsConflicting;
     // ShaperModification:end
 
-    const Handle(OpenGl_PointSprite)& aSprite = (toHilight && anAspectMarker->SpriteHighlightRes(aCtx)->IsValid())
-                                              ? anAspectMarker->SpriteHighlightRes(aCtx)
+    const Handle(OpenGl_PointSprite)& aSprite = 
+      (toHilight && anAspectMarker->SpriteHighlightRes(aCtx)->IsValid())? 
+                                              anAspectMarker->SpriteHighlightRes(aCtx)
                                               : aSpriteNorm;
     theWorkspace->EnableTexture (aSprite);
-    aCtx->ShaderManager()->BindProgram(anAspectMarker, aSprite, Standard_False, Standard_False, anAspectMarker->ShaderProgramRes(aCtx));
+    aCtx->ShaderManager()->BindProgram(anAspectMarker, aSprite, Standard_False, 
+                                       Standard_False, anAspectMarker->ShaderProgramRes(aCtx));
     const TEL_COLOUR* aLineColor  =  &anAspectMarker->Color();
     if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
       aLineColor = theWorkspace->HighlightColor;
@@ -553,11 +566,13 @@ void SketcherPrs_SymbolPrs::drawShape(const std::shared_ptr<GeomAPI_Shape>& theS
       std::shared_ptr<GeomAPI_Curve>(new GeomAPI_Curve(theShape));
     if (aCurve->isLine()) {
       // The shape is line
-      GeomAdaptor_Curve aCurv(aCurve->impl<Handle(Geom_Curve)>(), aCurve->startParam(), aCurve->endParam());
+      GeomAdaptor_Curve 
+        aCurv(aCurve->impl<Handle(Geom_Curve)>(), aCurve->startParam(), aCurve->endParam());
       StdPrs_Curve::Add(thePrs, aCurv, myDrawer);
     } else {
       // The shape is circle or arc
-      GeomAdaptor_Curve aAdaptor(aCurve->impl<Handle(Geom_Curve)>(), aCurve->startParam(), aCurve->endParam());
+      GeomAdaptor_Curve 
+        aAdaptor(aCurve->impl<Handle(Geom_Curve)>(), aCurve->startParam(), aCurve->endParam());
       StdPrs_DeflectionCurve::Add(thePrs,aAdaptor,myDrawer);
     }
   } else if (theShape->isVertex()) {
@@ -570,8 +585,9 @@ void SketcherPrs_SymbolPrs::drawShape(const std::shared_ptr<GeomAPI_Shape>& theS
   }
 }
 
-void SketcherPrs_SymbolPrs::drawListOfShapes(const std::shared_ptr<ModelAPI_AttributeRefList>& theListAttr, 
-                                             const Handle(Prs3d_Presentation)& thePrs) const
+void SketcherPrs_SymbolPrs::drawListOfShapes(
+  const std::shared_ptr<ModelAPI_AttributeRefList>& theListAttr, 
+  const Handle(Prs3d_Presentation)& thePrs) const
 {
   int aNb = theListAttr->size();
   if (aNb == 0)
index 458f860a74cb34fc97c5ca8a6cbe46aea4b4f80e..54b2bd290527bb567a3392572556b38569661f20 100644 (file)
@@ -45,13 +45,15 @@ public:
   virtual ~SketcherPrs_SymbolPrs();
 
   //! Method which draws selected owners ( for fast presentation draw )
-  Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, 
+  Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
                                                const SelectMgr_SequenceOfOwner& theOwners);
   
   //! Method which hilight an owner belonging to
   //! this selectable object  ( for fast presentation draw )
-  Standard_EXPORT virtual void HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, 
-                                                     const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner);
+  Standard_EXPORT virtual void HilightOwnerWithColor(
+    const Handle(PrsMgr_PresentationManager3d)& thePM,
+    const Quantity_NameOfColor theColor, 
+    const Handle(SelectMgr_EntityOwner)& theOwner);
 
   /// Returns sketcher plane
   Standard_EXPORT std::shared_ptr<GeomAPI_Ax3> plane() const { return myPlane; }
@@ -63,11 +65,12 @@ public:
   const Handle(Graphic3d_ArrayOfPoints)& pointsArray() const { return myPntArray; }
 
   /// Set state of the presentation, in case of conflicting state, the icon of the presentation is
-  /// visualized in error color. The state is stored in an internal field, so should be changed when
-  /// constraint become not conflicting
+  /// visualized in error color. The state is stored in an internal field, so should be changed
+  /// when constraint become not conflicting
   /// \param theConflicting a state
   /// \param theColor a color for conflicting object
-  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting, const std::vector<int>& theColor);
+  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting, 
+                                                const std::vector<int>& theColor);
 
   /// Render of the presentation
   /// \param theWorkspace is OpenGl workspace
@@ -85,7 +88,8 @@ public:
 
 protected:
   /// Redefinition of virtual function
-  Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+  Standard_EXPORT virtual void Compute(
+    const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
 
   /// Redefinition of virtual function
index 09fa6810969a7673009619641eac5509701e2d34..a857c3955351f0859c07fda47af5c8c0e8cb315b 100644 (file)
@@ -38,8 +38,10 @@ bool SketcherPrs_Tangent::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
                     SketcherPrs_Tools::getShape(aObj2).get() != NULL;
@@ -52,8 +54,10 @@ bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj1 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  ObjectPtr aObj2 = 
+    SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Compute points coordinates
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
@@ -64,11 +68,13 @@ bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Tangent::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Tangent::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                    Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
+  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+    new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
index b8e37cc53219fad4b3248a423e77942ea8077958..8335807013ac95fc9186879c4f0bf8e504c77536 100644 (file)
@@ -69,7 +69,8 @@ ObjectPtr getResult(ModelAPI_Feature* theFeature, const std::string& theAttrName
 std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject)
 {
   ResultConstructionPtr aRes = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
-  if (aRes.get() != NULL && aRes->data()->isValid()) {/// essential check as it is called in openGl thread
+  if (aRes.get() != NULL && aRes->data()->isValid()) {
+    /// essential check as it is called in openGl thread
     return aRes->shape();
   }
   return std::shared_ptr<GeomAPI_Shape>();
@@ -245,7 +246,8 @@ double getFlyoutDistance(const ModelAPI_Feature* theConstraint)
 {
   std::shared_ptr<GeomDataAPI_Point2D> aFlyoutPoint =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
-      const_cast<ModelAPI_Feature*>(theConstraint)->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
+      const_cast<ModelAPI_Feature*>(
+      theConstraint)->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   // for not initialized values return zero distance to avoid Presentation crash
   if (!aFlyoutPoint->isInitialized())
     return 0;
@@ -308,7 +310,8 @@ Handle(Prs3d_DimensionAspect) createDimensionAspect()
   return anAspect;
 }
 
-void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, double theDimValue, double theTextSize)
+void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, 
+                  double theDimValue, double theTextSize)
 {
   double anArrowLength = theDimAspect->ArrowAspect()->Length();
    // This is not realy correct way to get viewer scale.
@@ -317,7 +320,8 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, double theDimValue
   if(theTextSize > ((theDimValue - 3 * SketcherPrs_Tools::getArrowSize()) * aViewerScale)) {
     theDimAspect->SetTextHorizontalPosition(Prs3d_DTHP_Left);
     theDimAspect->SetArrowOrientation(Prs3d_DAO_External);
-    theDimAspect->SetExtensionSize((theTextSize / aViewerScale + SketcherPrs_Tools::getArrowSize()) / 2.0);
+    theDimAspect->SetExtensionSize(
+      (theTextSize / aViewerScale + SketcherPrs_Tools::getArrowSize()) / 2.0);
   } else {
     theDimAspect->SetTextHorizontalPosition(Prs3d_DTHP_Center);
     theDimAspect->SetArrowOrientation(Prs3d_DAO_Internal);
@@ -329,7 +333,8 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, double theDimValue
 
 void sendEmptyPresentationError(ModelAPI_Feature* theFeature, const std::string theError)
 {
-  Events_InfoMessage("SketcherPrs_Tools", "An empty AIS presentation: SketcherPrs_LengthDimension").send();
+  Events_InfoMessage("SketcherPrs_Tools", 
+    "An empty AIS presentation: SketcherPrs_LengthDimension").send();
   static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
   std::shared_ptr<ModelAPI_Object> aConstraintPtr(theFeature);
   ModelAPI_EventCreator::get()->sendUpdated(aConstraintPtr, anEvent);
index 97c196c50d10878dc499754f988f4b285d3be0e4..ed6fd0bf06ff96c9b78a517b7bd68c6f3a97e3a2 100644 (file)
@@ -25,7 +25,8 @@ class Handle_Prs3d_DimensionAspect;
 
 //#define MyTextHeight 20
 
-/// Message that style of visualization of parameter is changed. It will be shown as expression or value
+/// Message that style of visualization of parameter is changed.
+/// It will be shown as expression or value
 class SketcherPrs_ParameterStyleMessage : public Events_Message
 {
 public:
@@ -131,8 +132,8 @@ namespace SketcherPrs_Tools {
   /// \param theAttribute an attribute name
   /// \param thePlane a projection plane (sketcher plane)
   SKETCHERPRS_EXPORT std::shared_ptr<GeomDataAPI_Point2D> getFeaturePoint(DataPtr theData,
-                                                       const std::string& theAttribute,
-                                                       const std::shared_ptr<GeomAPI_Ax3>& thePlane);
+                                               const std::string& theAttribute,
+                                               const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   /// Returns value of dimension arrows size
   SKETCHERPRS_EXPORT double getArrowSize();
index e4a4899ffef79ba0ba1ca34292bd270ac2d32994..1058aeb8f8d2c57781ef25a22072b589f7764ca7 100644 (file)
@@ -42,7 +42,8 @@ bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstrain
 
   std::shared_ptr<ModelAPI_Data> aData = theConstraint->data();
   // Get transformated objects list
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = aData->reflist(SketchPlugin_Constraint::ENTITY_B());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return aReadyToDisplay;
 
@@ -58,11 +59,13 @@ bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstrain
     AttributePoint2DPtr aEnd = GeomDataAPI_Point2D::getPoint2D(aData,
                                             SketchPlugin_MultiTranslation::END_POINT_ID());
 
-    aReadyToDisplay = aStart.get() && aEnd.get() && aStart->isInitialized() && aEnd->isInitialized();
+    aReadyToDisplay = 
+      aStart.get() && aEnd.get() && aStart->isInitialized() && aEnd->isInitialized();
   }
   else if (theConstraint->getKind() == SketchPlugin_MultiRotation::ID()) {
     // if it is rotation
-    AttributePoint2DPtr aCenter = GeomDataAPI_Point2D::getPoint2D(aData, SketchPlugin_MultiRotation::CENTER_ID());
+    AttributePoint2DPtr aCenter = 
+      GeomDataAPI_Point2D::getPoint2D(aData, SketchPlugin_MultiRotation::CENTER_ID());
     aReadyToDisplay = aCenter.get() && aCenter->isInitialized();
   }
 #endif
@@ -76,7 +79,8 @@ bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const
 
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
   // Get transformated objects list
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = aData->reflist(SketchPlugin_Constraint::ENTITY_B());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB =
+    aData->reflist(SketchPlugin_Constraint::ENTITY_B());
 
   int aNbB = anAttrB->size();
   if (aNbB == 0)
@@ -105,18 +109,17 @@ bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Transformation::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const
+void SketcherPrs_Transformation::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+                                           Quantity_Color theColor) const
 {
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = aData->reflist(SketchPlugin_Constraint::ENTITY_B());
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+    aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return;
 
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  //Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
-  //aGroup->SetPrimitivesAspect(aLineAspect);
-
   // drawListOfShapes uses myDrawer for attributes definition
   Handle(Prs3d_LineAspect) aLnAspect = new Prs3d_LineAspect(theColor, Aspect_TOL_SOLID, 1);
   myDrawer->SetLineAspect(aLnAspect);
@@ -142,7 +145,8 @@ void SketcherPrs_Transformation::drawLines(const Handle(Prs3d_Presentation)& the
     }
   } else if (myConstraint->getKind() == SketchPlugin_MultiRotation::ID()) {
     // if it is rotation
-    AttributePoint2DPtr aCenter = GeomDataAPI_Point2D::getPoint2D(aData, SketchPlugin_MultiRotation::CENTER_ID());
+    AttributePoint2DPtr aCenter =
+      GeomDataAPI_Point2D::getPoint2D(aData, SketchPlugin_MultiRotation::CENTER_ID());
     if (aCenter.get() && aCenter->isInitialized()) {
       // Show center of rotation
       std::shared_ptr<GeomAPI_Pnt> aPnt = myPlane->to3D(aCenter->x(), aCenter->y());