0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / ShapeCustom / ShapeCustom_DirectModification.cxx
old mode 100755 (executable)
new mode 100644 (file)
index f3f7dc2..93f569b
@@ -1,19 +1,15 @@
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 //:l8 abv 15.01.99: CTS22022: writing correct pcurves for indirect tori
 //:p5 abv 26.02.99: PRO18207: force copying of edge if any its pcurve is to be replaced
 //S4181 pdn 20.04.99 Modification of indirect rectangular trimming surfaces and taking
 // locations into account
 //szv 03.01.01 PositiveCones merged in
-#include <ShapeCustom_DirectModification.ixx>
 
-#include <gp_Mat.hxx>
+#include <BRep_Builder.hxx>
+#include <BRep_GCurve.hxx>
+#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
+#include <BRep_TEdge.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepTools.hxx>
+#include <Geom2d_Curve.hxx>
 #include <Geom_ConicalSurface.hxx>
+#include <Geom_Curve.hxx>
 #include <Geom_ElementarySurface.hxx>
 #include <Geom_RectangularTrimmedSurface.hxx>
-
+#include <Geom_Surface.hxx>
+#include <gp_Mat.hxx>
+#include <gp_Pnt.hxx>
+#include <Message_Msg.hxx>
 #include <Precision.hxx>
+#include <ShapeCustom_DirectModification.hxx>
+#include <Standard_Type.hxx>
+#include <TopLoc_Location.hxx>
 #include <TopoDS.hxx>
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-#include <BRep_TEdge.hxx>
-#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
-#include <BRep_GCurve.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Vertex.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(ShapeCustom_DirectModification,ShapeCustom_Modification)
 
 //=======================================================================
 //function : ShapeCustom_DirectModification
 //purpose  : 
 //=======================================================================
-
 ShapeCustom_DirectModification::ShapeCustom_DirectModification()
 {
 }
@@ -63,7 +69,7 @@ static Standard_Integer IsIndirectSurface (Handle(Geom_Surface) &S,
     Standard_Boolean neg = t.IsNegative();
     Standard_Boolean det = ( t.VectorialPart().Determinant() < 0.0 );
     Standard_Boolean dir = ES->Position().Direct();
-    if ( (Standard_Boolean)( neg != det ) == dir ) result = 1;
+    if ((neg != det) == dir) result = 1;
     Handle(Geom_ConicalSurface) CS = Handle(Geom_ConicalSurface)::DownCast(ES);
     if (!CS.IsNull()) {
       // does the cone have negative semiangle ?
@@ -115,6 +121,8 @@ Standard_Boolean ShapeCustom_DirectModification::NewSurface (const TopoDS_Face&
     default: return Standard_False;
   }
 
+  SendMsg( F, Message_Msg("DirectModification.NewSurface.MSG0"));
+
   Tol = BRep_Tool::Tolerance(F);
 
   return Standard_True;