-// Copyright: Matra-Datavision 1994
-// File: IGESConvGeom.cxx
-// Created: Thu Sep 1 16:00:17 1994
-// Author: Christian CAILLET
-// <cky>
+// Created on: 1994-09-01
+// Created by: Christian CAILLET
+// Copyright (c) 1994-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// 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.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
// modif du 31/01/97 : mjm
// on commence par les SplineCurves.
// modif du 17/03/97 : mjm
// SplineSurfaces.
//%13 pdn 12.02.99: USA60293 avoid applying transformation twice
-#include <IGESConvGeom.ixx>
-
-#include <IGESData_ToolLocation.hxx>
-
#include <BSplCLib.hxx>
-
#include <BSplSLib.hxx>
-
+#include <Geom2d_BSplineCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_BSplineSurface.hxx>
+#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <gp_GTrsf.hxx>
#include <gp_Trsf.hxx>
-#include <GeomConvert_CompCurveToBSplineCurve.hxx>
+#include <IGESConvGeom.hxx>
+#include <IGESData_ToolLocation.hxx>
+#include <IGESGeom_SplineCurve.hxx>
+#include <IGESGeom_SplineSurface.hxx>
#include <PLib.hxx>
-
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_HArray2OfPnt.hxx>
-
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
-
-
//=======================================================================
//function : IGESConvGeom::SplineCurveFromIGES
//purpose :
XPoly = st->XPolynomial(USeg, VSeg);
YPoly = st->YPolynomial(USeg, VSeg);
ZPoly = st->ZPolynomial(USeg, VSeg);
- Standard_Real ParamU, ParamV;
ParamU = 1.;
for (i=Coef.LowerRow(); i<=Coef.UpperRow(); i++) {
ParamV = 1.;
PLib::CoefficientsPoles(Coef,PLib::NoWeights2(),BzPole,PLib::NoWeights2());
// C0 check and correction for poles lying on isoparametrics U=0 & V=0
- Standard_Integer iBs = BsPole.LowerRow() + (USeg-1)*DegreeU;
- Standard_Integer jBs = BsPole.LowerCol();
+ Standard_Integer iBsPole = BsPole.LowerRow() + (USeg-1)*DegreeU;
+ Standard_Integer jBsPole = BsPole.LowerCol();
iBz = BzPole.LowerRow();
for (jBz=BzPole.LowerCol(); jBz<=BzPole.UpperCol(); jBz++) {
- if (!BzPole.Value(iBz,jBz).IsEqual(BsPole.Value(iBs,jBs), epsgeom)) {
+ if (!BzPole.Value(iBz,jBz).IsEqual(BsPole.Value(iBsPole,jBsPole), epsgeom)) {
wasC0=Standard_False;
gp_Pnt MidPoint;
Standard_Real XCoord =
- 0.5 * (BzPole.Value(iBz,jBz).X() + BsPole.Value(iBs,jBs).X());
+ 0.5 * (BzPole.Value(iBz,jBz).X() + BsPole.Value(iBsPole,jBsPole).X());
Standard_Real YCoord =
- 0.5 * (BzPole.Value(iBz,jBz).Y() + BsPole.Value(iBs,jBs).Y());
+ 0.5 * (BzPole.Value(iBz,jBz).Y() + BsPole.Value(iBsPole,jBsPole).Y());
Standard_Real ZCoord =
- 0.5 * (BzPole.Value(iBz,jBz).Z() + BsPole.Value(iBs,jBs).Z());
+ 0.5 * (BzPole.Value(iBz,jBz).Z() + BsPole.Value(iBsPole,jBsPole).Z());
MidPoint.SetCoord(XCoord, YCoord, ZCoord);
- BsPole.SetValue(iBs, jBs++, MidPoint);
+ BsPole.SetValue(iBsPole, jBsPole++, MidPoint);
}
else {
- BsPole.SetValue(iBs, jBs++, BzPole.Value(iBz,jBz));
+ BsPole.SetValue(iBsPole, jBsPole++, BzPole.Value(iBz,jBz));
}
}
// Other poles (no check about C0) :
- iBs++;
- jBs = BsPole.LowerCol();
+ iBsPole++;
+ jBsPole = BsPole.LowerCol();
for (iBz=BzPole.LowerRow()+1; iBz<=BzPole.UpperRow(); iBz++) {
for (jBz=BzPole.LowerCol(); jBz<=BzPole.UpperCol(); jBz++)
- BsPole.SetValue(iBs, jBs++, BzPole.Value(iBz,jBz));
- iBs++;
- jBs = BsPole.LowerCol();
+ BsPole.SetValue(iBsPole, jBsPole++, BzPole.Value(iBz,jBz));
+ iBsPole++;
+ jBsPole = BsPole.LowerCol();
}
}
XPoly = st->XPolynomial(USeg, VSeg);
YPoly = st->YPolynomial(USeg, VSeg);
ZPoly = st->ZPolynomial(USeg, VSeg);
- Standard_Real ParamU, ParamV;
ParamU = 1.;
for (i=Coef.LowerRow(); i<=Coef.UpperRow(); i++) {
ParamV = 1.;
XPoly = st->XPolynomial(USeg, VSeg);
YPoly = st->YPolynomial(USeg, VSeg);
ZPoly = st->ZPolynomial(USeg, VSeg);
- Standard_Real ParamU, ParamV;
ParamU = 1.;
for (i=Coef.LowerRow(); i<=Coef.UpperRow(); i++) {
ParamV = 1.;
{
if (continuity < 1) return continuity;
Standard_Boolean isC1 = Standard_True, isC2 = Standard_True;
- Standard_Integer i,j;
-
- i = res->LastUKnotIndex(); //knots.Upper();
- j = res->FirstUKnotIndex(); //knots.Lower();
Standard_Integer DegreeU = res->UDegree();
Standard_Boolean isModified;
do {
isModified = Standard_False;
- for (i = res->FirstUKnotIndex()+1; i < res->LastUKnotIndex(); i++)
+ for (Standard_Integer i = res->FirstUKnotIndex()+1; i < res->LastUKnotIndex(); i++)
if(DegreeU - res->UMultiplicity(i) < continuity) {
if (continuity >= 2) {
if (!res->RemoveUKnot(i, DegreeU-2, epsgeom)) {
Standard_Integer DegreeV = res->VDegree();
do {
isModified = Standard_False;
- for (i = res->FirstVKnotIndex()+1; i < res->LastVKnotIndex(); i++)
+ for (Standard_Integer i = res->FirstVKnotIndex()+1; i < res->LastVKnotIndex(); i++)
if(DegreeV - res->VMultiplicity(i) < continuity) {
if (continuity >= 2) {
if (!res->RemoveVKnot(i, DegreeV-2, epsgeom)) {