// Created on: 1997-01-24
// Created by: Laurent BOURESCHE
// Copyright (c) 1997-1999 Matra Datavision
-// 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.
-
-
-#include <stdio.h>
-
-#include <BRepBlend_SurfRstLineBuilder.ixx>
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+
+#include <Adaptor2d_HCurve2d.hxx>
+#include <Adaptor3d_HSurface.hxx>
+#include <Adaptor3d_HVertex.hxx>
+#include <Adaptor3d_TopolTool.hxx>
+#include <Blend_FuncInv.hxx>
+#include <Blend_Point.hxx>
+#include <Blend_SurfCurvFuncInv.hxx>
+#include <Blend_SurfPointFuncInv.hxx>
+#include <Blend_SurfRstFunction.hxx>
#include <BRepBlend_BlendTool.hxx>
-#include <TopAbs.hxx>
-#include <IntSurf.hxx>
-#include <math_FunctionSetRoot.hxx>
-#include <gp_Pnt2d.hxx>
+#include <BRepBlend_Extremity.hxx>
+#include <BRepBlend_Line.hxx>
+#include <BRepBlend_SurfRstLineBuilder.hxx>
#include <gp_Pnt.hxx>
-#include <gp_Vec2d.hxx>
+#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
+#include <gp_Vec2d.hxx>
+#include <IntSurf.hxx>
+#include <IntSurf_Transition.hxx>
+#include <math_FunctionSetRoot.hxx>
+#include <TopAbs.hxx>
-#ifdef DEB
+#include <stdio.h>
+#ifdef OCCT_DEBUG
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#endif
static Standard_Integer IndexOfSection = 0;
extern Standard_Boolean Blend_GettraceDRAWSECT();
-#ifdef DEB_BBPP_N_TRDERIV
+#ifdef OCCT_DEBUG_BBPP_N_TRDERIV
// for debug : visualisation of the section
static Standard_Boolean BBPP(const Standard_Real param,
Blend_SurfRstFunction& Func,
if (State!=Blend_OK) {
return;
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (Blend_GettraceDRAWSECT()){
Drawsect(param,Func);
}
Blend_SurfCurvFuncInv& FinvC,
const Standard_Real Pmin)
{
- if (!done) {StdFail_NotDone::Raise();}
+ if (!done) {throw StdFail_NotDone();}
if (iscomplete) {return Standard_True;}
if (sens >0.) {
previousP = line->Point(1);
while (!Arrive) {
Standard_Boolean bonpoint = 1;
-#ifdef DEB_BBPP_N_TRDERIV
+#ifdef OCCT_DEBUG_BBPP_N_TRDERIV
//debdebdebdebdebdeb
Func.Set(param);
rsnld.Perform(Func,parinit,infbound,supbound);
}
else{
// Failed reframing. Leave with PointsConfondus
-#if DEB
+#ifdef OCCT_DEBUG
cout<<"SurfRstLineBuilder : failed reframing"<<endl;
#endif
State = Blend_SamePoints;
switch (State) {
case Blend_OK :
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (Blend_GettraceDRAWSECT()){
Drawsect(param,Func);
}
Arrive = Standard_True;
if (line->NbPoints()>=2) {
// Indicate that one stops during the processing
-#if DEB
+#ifdef OCCT_DEBUG
cout<<"SurfRstLineBuilder : No advancement in the processing"<<endl;
#endif
}
case Blend_StepTooSmall :
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (Blend_GettraceDRAWSECT()){
Drawsect(param,Func);
}
case Blend_OnRst1 :
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (Blend_GettraceDRAWSECT()){
Drawsect(param,Func);
}
case Blend_OnRst2 :
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (Blend_GettraceDRAWSECT()){
Drawsect(param,Func);
}
case Blend_OnRst12 :
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (Blend_GettraceDRAWSECT()){
Drawsect(param,Func);
}
case Blend_SamePoints :
{
// Stop
-#if DEB
+#ifdef OCCT_DEBUG
cout << "SurfRstLineBuilder Points mixed in the processing" << endl;
#endif
previousP.ParametersOnS(U,V);
rsnld.Perform(FinvC,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#ifdef OCCT_DEBUG
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif
}
Solinv(3) = pmin;
- math_FunctionSetRoot rsnld(FinvC,toler,30);
- rsnld.Perform(FinvC,Solinv,infb,supb);
+ math_FunctionSetRoot aRsnld(FinvC,toler,30);
+ aRsnld.Perform(FinvC,Solinv,infb,supb);
- if (!rsnld.IsDone()) {
-#if DEB
+ if (!aRsnld.IsDone()) {
+#ifdef OCCT_DEBUG
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif
}
else {
// It is necessary to check the value of the function
- rsnld.Root(Solinv);
+ aRsnld.Root(Solinv);
recadre = FinvC.IsSolution(Solinv,tolesp);
}
}
math_FunctionSetRoot rsnld(Finv,toler,30);
rsnld.Perform(Finv,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#ifdef OCCT_DEBUG
cout << "SurfRstLineBuilder :RSNLD not done "<< endl;
#endif
return Standard_False;
math_FunctionSetRoot rsnld(FinvP,toler,30);
rsnld.Perform(FinvP,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#ifdef OCCT_DEBUG
cout << "SurfRstLineBuilder :RSNLD not done "<< endl;
#endif
return Standard_False;