mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0023934: Compiler warnings in MS VC++ 10
Elimination of compiler warnings - ExprIntrp: generated file ExprIntrp.tab.c and related WOK scripts removed from the sources - ExprIntrp, StepFile: added missing declarations and casts; warnings caused by Flex and Bison code suppressed for MSVC compuler by #pragma - OSD: dummy #includes added to files containing no code for Windows, to avoid warning on empty file - PLib: piece of code contained in PLib_ChangeDim.gxx included explicitly in cxx and cleaned - Other places: some casts added to avoid warnings
This commit is contained in:
parent
498ce76bde
commit
105aae761e
@ -62,11 +62,7 @@ void ApproxInt_ImpPrmSvSurfaces::Pnt(const Standard_Real u1,
|
|||||||
Standard_Real tu2=u2;
|
Standard_Real tu2=u2;
|
||||||
Standard_Real tv1=v1;
|
Standard_Real tv1=v1;
|
||||||
Standard_Real tv2=v2;
|
Standard_Real tv2=v2;
|
||||||
#ifdef DEB
|
|
||||||
Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2);
|
|
||||||
#else
|
|
||||||
this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2);
|
this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2);
|
||||||
#endif
|
|
||||||
P=MyPnt;
|
P=MyPnt;
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
@ -223,11 +223,7 @@ void ApproxInt_PrmPrmSvSurfaces::Pnt(const Standard_Real u1,
|
|||||||
Standard_Real tu2=u2;
|
Standard_Real tu2=u2;
|
||||||
Standard_Real tv1=v1;
|
Standard_Real tv1=v1;
|
||||||
Standard_Real tv2=v2;
|
Standard_Real tv2=v2;
|
||||||
#ifdef DEB
|
|
||||||
Standard_Boolean t=this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2);
|
|
||||||
#else
|
|
||||||
this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2);
|
this->Compute(tu1,tv1,tu2,tv2,aP,aT,aTS1,aTS2);
|
||||||
#endif
|
|
||||||
P=MyPnt;
|
P=MyPnt;
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
@ -113,7 +113,7 @@ Standard_PCharacter pstring;
|
|||||||
estring.SetValue(i,c);
|
estring.SetValue(i,c);
|
||||||
} else if( (c > Standard_ExtCharacter(0x0020)) &&
|
} else if( (c > Standard_ExtCharacter(0x0020)) &&
|
||||||
(c <= Standard_ExtCharacter(0x007F)) ) {
|
(c <= Standard_ExtCharacter(0x007F)) ) {
|
||||||
c += Standard_ExtCharacter(0xFEE0);
|
c += Standard_ExtCharacter((unsigned short)0xFEE0);
|
||||||
estring.SetValue(i,c);
|
estring.SetValue(i,c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ struct BSplCLib_DataContainer
|
|||||||
{
|
{
|
||||||
BSplCLib_DataContainer(Standard_Integer Degree)
|
BSplCLib_DataContainer(Standard_Integer Degree)
|
||||||
{
|
{
|
||||||
|
(void)Degree; // avoid compiler warning
|
||||||
Standard_OutOfRange_Raise_if (Degree > BSplCLib::MaxDegree() ||
|
Standard_OutOfRange_Raise_if (Degree > BSplCLib::MaxDegree() ||
|
||||||
BSplCLib::MaxDegree() > 25,
|
BSplCLib::MaxDegree() > 25,
|
||||||
"BSplCLib: bspline degree is greater than maximum supported");
|
"BSplCLib: bspline degree is greater than maximum supported");
|
||||||
|
@ -38,6 +38,7 @@ struct BSplCLib_DataContainer
|
|||||||
{
|
{
|
||||||
BSplCLib_DataContainer(Standard_Integer Degree)
|
BSplCLib_DataContainer(Standard_Integer Degree)
|
||||||
{
|
{
|
||||||
|
(void)Degree; // avoid compiler warning
|
||||||
Standard_OutOfRange_Raise_if (Degree > BSplCLib::MaxDegree() ||
|
Standard_OutOfRange_Raise_if (Degree > BSplCLib::MaxDegree() ||
|
||||||
BSplCLib::MaxDegree() > 25,
|
BSplCLib::MaxDegree() > 25,
|
||||||
"BSplCLib: bspline degree is greater than maximum supported");
|
"BSplCLib: bspline degree is greater than maximum supported");
|
||||||
|
@ -53,6 +53,7 @@ struct BSplSLib_DataContainer
|
|||||||
{
|
{
|
||||||
BSplSLib_DataContainer (Standard_Integer UDegree, Standard_Integer VDegree)
|
BSplSLib_DataContainer (Standard_Integer UDegree, Standard_Integer VDegree)
|
||||||
{
|
{
|
||||||
|
(void)UDegree; (void)VDegree; // just to avoid compiler warning in Release mode
|
||||||
Standard_OutOfRange_Raise_if (UDegree > BSplCLib::MaxDegree() ||
|
Standard_OutOfRange_Raise_if (UDegree > BSplCLib::MaxDegree() ||
|
||||||
VDegree > BSplCLib::MaxDegree() || BSplCLib::MaxDegree() > 25,
|
VDegree > BSplCLib::MaxDegree() || BSplCLib::MaxDegree() > 25,
|
||||||
"BSplSLib: bspline degree is greater than maximum supported");
|
"BSplSLib: bspline degree is greater than maximum supported");
|
||||||
|
@ -265,7 +265,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read
|
|||||||
aDocumentPos = anIS.tellg();
|
aDocumentPos = anIS.tellg();
|
||||||
anIS.seekg((streampos) aShapeSectionPos);
|
anIS.seekg((streampos) aShapeSectionPos);
|
||||||
|
|
||||||
CheckShapeSection((streampos)aShapeSectionPos, anIS);
|
CheckShapeSection(aShapeSectionPos, anIS);
|
||||||
// Read Shapes
|
// Read Shapes
|
||||||
BinLDrivers_DocumentSection aCurSection;
|
BinLDrivers_DocumentSection aCurSection;
|
||||||
ReadShapeSection (aCurSection, anIS, Standard_False);
|
ReadShapeSection (aCurSection, anIS, Standard_False);
|
||||||
@ -497,7 +497,7 @@ void BinLDrivers_DocumentRetrievalDriver::CheckShapeSection(
|
|||||||
{
|
{
|
||||||
if(!IS.eof()) {
|
if(!IS.eof()) {
|
||||||
#if defined(WNT) || defined(HAVE_IOSTREAM)
|
#if defined(WNT) || defined(HAVE_IOSTREAM)
|
||||||
const Storage_Position endPos = IS.rdbuf()->pubseekoff(0L, std::ios_base::end, std::ios_base::in);
|
const std::streamoff endPos = IS.rdbuf()->pubseekoff(0L, std::ios_base::end, std::ios_base::in);
|
||||||
#else
|
#else
|
||||||
const Storage_Position endPos = IS.rdbuf()->seekoff(0L, unsafe_ios::end, unsafe_ios::in);
|
const Storage_Position endPos = IS.rdbuf()->seekoff(0L, unsafe_ios::end, unsafe_ios::in);
|
||||||
#endif
|
#endif
|
||||||
|
@ -298,7 +298,7 @@ void BinMNaming_NamedShapeDriver::ReadShapeSection (Standard_IStream& theIS)
|
|||||||
{
|
{
|
||||||
// check section title string; note that some versions of OCCT (up to 6.3.1)
|
// check section title string; note that some versions of OCCT (up to 6.3.1)
|
||||||
// might avoid writing shape section if it is empty
|
// might avoid writing shape section if it is empty
|
||||||
Standard_Size aPos = theIS.tellg();
|
std::streamoff aPos = theIS.tellg();
|
||||||
TCollection_AsciiString aSectionTitle;
|
TCollection_AsciiString aSectionTitle;
|
||||||
theIS >> aSectionTitle;
|
theIS >> aSectionTitle;
|
||||||
if(aSectionTitle.Length() > 0 && aSectionTitle == SHAPESET) {
|
if(aSectionTitle.Length() > 0 && aSectionTitle == SHAPESET) {
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
%option yywrap
|
%option yywrap
|
||||||
%{
|
%{
|
||||||
#include <ExprIntrp.tab.h>
|
#include <ExprIntrp.tab.h>
|
||||||
|
|
||||||
#define YY_SKIP_YYWRAP
|
#define YY_SKIP_YYWRAP
|
||||||
|
|
||||||
static YY_BUFFER_STATE ExprIntrp_bufstring;
|
static YY_BUFFER_STATE ExprIntrp_bufstring;
|
||||||
@ -29,6 +30,8 @@ static YY_BUFFER_STATE ExprIntrp_bufstring;
|
|||||||
void ExprIntrp_SetResult();
|
void ExprIntrp_SetResult();
|
||||||
void ExprIntrp_SetDegree();
|
void ExprIntrp_SetDegree();
|
||||||
|
|
||||||
|
int ExprIntrlex (void);
|
||||||
|
|
||||||
void ExprIntrp_start_string(char* str)
|
void ExprIntrp_start_string(char* str)
|
||||||
{
|
{
|
||||||
ExprIntrp_bufstring = ExprIntrp_scan_string(str);
|
ExprIntrp_bufstring = ExprIntrp_scan_string(str);
|
||||||
@ -45,6 +48,11 @@ int yywrap()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disable MSVC warnings in flex code
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4131 4244 4273 4127)
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
%%
|
%%
|
||||||
" " {;}
|
" " {;}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -63,6 +63,15 @@ extern void ExprIntrp_Sumator();
|
|||||||
extern void ExprIntrp_VariableIdentifier();
|
extern void ExprIntrp_VariableIdentifier();
|
||||||
extern void ExprIntrp_Productor();
|
extern void ExprIntrp_Productor();
|
||||||
extern void ExprIntrp_EndOfEqual();
|
extern void ExprIntrp_EndOfEqual();
|
||||||
|
|
||||||
|
extern void ExprIntrperror(char* msg);
|
||||||
|
extern int ExprIntrplex(void);
|
||||||
|
|
||||||
|
// disable MSVC warnings in bison code
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4131 4244)
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%token SUMOP MINUSOP DIVIDEOP EXPOP MULTOP PARENTHESIS BRACKET ENDPARENTHESIS ENDBRACKET VALUE IDENTIFIER COMMA DIFFERENTIAL DERIVATE DERIVKEY ASSIGNOP DEASSIGNKEY EQUALOP RELSEPARATOR CONSTKEY SUMKEY PRODKEY
|
%token SUMOP MINUSOP DIVIDEOP EXPOP MULTOP PARENTHESIS BRACKET ENDPARENTHESIS ENDBRACKET VALUE IDENTIFIER COMMA DIFFERENTIAL DERIVATE DERIVKEY ASSIGNOP DEASSIGNKEY EQUALOP RELSEPARATOR CONSTKEY SUMKEY PRODKEY
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
# Copyright (c) 1999-2012 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.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
proc ExprIntrp_Replace:AdmFileType {} {
|
|
||||||
return "dbadmfile";
|
|
||||||
}
|
|
||||||
|
|
||||||
proc ExprIntrp_Replace:OutputDirTypeName {} {
|
|
||||||
return "dbtmpfile";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
proc ExprIntrp_Replace:HandleInputFile { ID } {
|
|
||||||
|
|
||||||
scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
|
|
||||||
|
|
||||||
switch $name {
|
|
||||||
ExprIntrp.tab.c {return 1;}
|
|
||||||
default {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
proc ExprIntrp_Replace:Execute { unit args } {
|
|
||||||
|
|
||||||
msgprint -i -c "ExprIntrp_Replace::Execute" "Copying of ExprIntrp includes $unit $args "
|
|
||||||
|
|
||||||
global tcl_interactive
|
|
||||||
|
|
||||||
set tcl_interactive 1
|
|
||||||
package require Wokutils
|
|
||||||
|
|
||||||
|
|
||||||
if { [wokparam -e %Station $unit] != "wnt" } {
|
|
||||||
set copycmd "cp -p "
|
|
||||||
set replstr "/"
|
|
||||||
} else {
|
|
||||||
set copycmd "cmd /c copy"
|
|
||||||
set replstr "\\\\\\\\"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
set sourcename ExprIntrp.tab.c
|
|
||||||
set name ExprIntrp.tab.c
|
|
||||||
|
|
||||||
set source [woklocate -p ExprIntrp:source:$sourcename [wokinfo -N $unit]]
|
|
||||||
set vistarget [woklocate -p ExprIntrp:privinclude [wokinfo -N $unit]]$name
|
|
||||||
# set target [wokinfo -p ExprIntrp:privinclude:$name [wokinfo -N $unit]]
|
|
||||||
msgprint -i -c "$source "
|
|
||||||
regsub -all "/" " $source $vistarget" $replstr TheArgs
|
|
||||||
|
|
||||||
msgprint -i -c "ExprIntrp_Replace::Execute" "Copy $source to $vistarget"
|
|
||||||
if { [file exist $vistarget] && [wokparam -e %Station ] != "wnt" } {
|
|
||||||
eval exec "chmod u+w $vistarget"
|
|
||||||
}
|
|
||||||
eval exec "$copycmd $TheArgs"
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
-- Created on: 2000-06-29
|
|
||||||
-- Created by: Atelier CAS2000
|
|
||||||
-- Copyright (c) 2000-2012 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.
|
|
||||||
--
|
|
||||||
-- 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.
|
|
||||||
--
|
|
||||||
-- 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.
|
|
||||||
|
|
||||||
|
|
||||||
@ifnotdefined ( %ExprIntrp_WOKSteps_EDL) then
|
|
||||||
@set %ExprIntrp_WOKSteps_EDL = "";
|
|
||||||
|
|
||||||
--- Insert your stuff Here
|
|
||||||
|
|
||||||
@set %CASCADESamplesJni_WOKSteps_EDL = "";
|
|
||||||
@string %WOKSteps_XcppGroup += "xcpp.repl";
|
|
||||||
@set %WOKSteps_xcpp_repl = "*ExprIntrp_Replace(xcpp.header)";
|
|
||||||
|
|
||||||
@endif;
|
|
@ -39,7 +39,7 @@ extern "C" void ExprIntrp_SetResult()
|
|||||||
|
|
||||||
extern "C" void ExprIntrp_SetDegree()
|
extern "C" void ExprIntrp_SetDegree()
|
||||||
{
|
{
|
||||||
ExprIntrp_degree = strlen(ExprIntrptext);
|
ExprIntrp_degree = (int)strlen(ExprIntrptext);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ExprIntrp_GetDegree()
|
int ExprIntrp_GetDegree()
|
||||||
@ -50,5 +50,5 @@ int ExprIntrp_GetDegree()
|
|||||||
int ExprIntrp_GetResult(char *s)
|
int ExprIntrp_GetResult(char *s)
|
||||||
{
|
{
|
||||||
strcpy(s,ExprIntrp_curres);
|
strcpy(s,ExprIntrp_curres);
|
||||||
return strlen(ExprIntrp_curres);
|
return (int)strlen(ExprIntrp_curres);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
ExprIntrp_CMPLRS.edl
|
ExprIntrp_CMPLRS.edl
|
||||||
ExprIntrp_WOKSteps.edl
|
|
||||||
ExprIntrp.lex
|
ExprIntrp.lex
|
||||||
ExprIntrp.yacc
|
ExprIntrp.yacc
|
||||||
ExprIntrp_yaccanal.hxx
|
ExprIntrp_yaccanal.hxx
|
||||||
ExprIntrp_yaccintrf.cxx
|
ExprIntrp_yaccintrf.cxx
|
||||||
ExprIntrp_yaccintrf.hxx
|
ExprIntrp_yaccintrf.hxx
|
||||||
ExprIntrp_yacclex.cxx
|
ExprIntrp_yacclex.cxx
|
||||||
ExprIntrp_Replace.tcl
|
|
||||||
ExprIntrp.tab.c
|
|
||||||
|
@ -30,14 +30,6 @@ Extrema_GLocateExtCC::Extrema_GLocateExtCC (const Curve1& C1,
|
|||||||
const Standard_Real U0,
|
const Standard_Real U0,
|
||||||
const Standard_Real V0)
|
const Standard_Real V0)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef DEB
|
|
||||||
GeomAbs_CurveType type1 = Tool1::GetType(C1);
|
|
||||||
GeomAbs_CurveType type2 = Tool2::GetType(C2);
|
|
||||||
#else
|
|
||||||
Tool1::GetType(C1);
|
|
||||||
Tool2::GetType(C2);
|
|
||||||
#endif
|
|
||||||
Standard_Real TolU = C1.Resolution(Precision::Confusion());
|
Standard_Real TolU = C1.Resolution(Precision::Confusion());
|
||||||
Standard_Real TolV = C2.Resolution(Precision::Confusion());
|
Standard_Real TolV = C2.Resolution(Precision::Confusion());
|
||||||
Extrema_POnCurv P1, P2;
|
Extrema_POnCurv P1, P2;
|
||||||
|
@ -37,13 +37,6 @@ Extrema_GLocateExtCC2d::Extrema_GLocateExtCC2d (const Curve1& C1,
|
|||||||
const Standard_Real U0,
|
const Standard_Real U0,
|
||||||
const Standard_Real V0)
|
const Standard_Real V0)
|
||||||
{
|
{
|
||||||
#ifdef DEB
|
|
||||||
GeomAbs_CurveType type1 = Tool1::GetType(C1);
|
|
||||||
GeomAbs_CurveType type2 = Tool2::GetType(C2);
|
|
||||||
#else
|
|
||||||
Tool1::GetType(C1);
|
|
||||||
Tool2::GetType(C2);
|
|
||||||
#endif
|
|
||||||
Standard_Real TolU = Tool1::Resolution(C1, Precision::Confusion());
|
Standard_Real TolU = Tool1::Resolution(C1, Precision::Confusion());
|
||||||
Standard_Real TolV = Tool2::Resolution(C2, Precision::Confusion());
|
Standard_Real TolV = Tool2::Resolution(C2, Precision::Confusion());
|
||||||
Extrema_POnCurv2d P1, P2;
|
Extrema_POnCurv2d P1, P2;
|
||||||
|
@ -113,11 +113,6 @@ void Extrema_GLocateExtPC::Perform(const ThePoint& P,
|
|||||||
const Standard_Real U0)
|
const Standard_Real U0)
|
||||||
{
|
{
|
||||||
Standard_Integer i, i1, i2, inter;
|
Standard_Integer i, i1, i2, inter;
|
||||||
#ifdef DEB
|
|
||||||
Standard_Real Tol = TheCurveTool::Resolution(*((TheCurve*)myC), Precision::Confusion());
|
|
||||||
#else
|
|
||||||
TheCurveTool::Resolution(*((TheCurve*)myC), Precision::Confusion());
|
|
||||||
#endif
|
|
||||||
Standard_Real Par, valU, valU2 = RealLast(),
|
Standard_Real Par, valU, valU2 = RealLast(),
|
||||||
local_u0 ;
|
local_u0 ;
|
||||||
Standard_Real myintuinf=0, myintusup=0;
|
Standard_Real myintuinf=0, myintusup=0;
|
||||||
|
@ -225,8 +225,7 @@ void Geom2dAPI_InterCurveCurve::Segment (const Standard_Integer Index,
|
|||||||
Handle(Geom2d_Curve)&) const
|
Handle(Geom2d_Curve)&) const
|
||||||
{
|
{
|
||||||
Standard_NotImplemented::Raise(" ");
|
Standard_NotImplemented::Raise(" ");
|
||||||
|
(void)Index; // avoid compiler warning in Release mode
|
||||||
Standard_OutOfRange_Raise_if(Index < 0 || Index > NbSegments(),
|
Standard_OutOfRange_Raise_if(Index < 0 || Index > NbSegments(),
|
||||||
"Geom2dAPI_InterCurveCurve::Segment");
|
"Geom2dAPI_InterCurveCurve::Segment");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -986,8 +986,8 @@ void Intf_InterferencePolygonPolyhedron::Intersect
|
|||||||
//-- Si cette distance est inferieure a Tolerance, on cree un SP.
|
//-- Si cette distance est inferieure a Tolerance, on cree un SP.
|
||||||
//--
|
//--
|
||||||
//-- printf("\nIntf_InterferencePolygPolyh : dBegTri=%g dEndTri=%g Tolerance=%g\n",dBegTri,dEndTri,Tolerance);
|
//-- printf("\nIntf_InterferencePolygPolyh : dBegTri=%g dEndTri=%g Tolerance=%g\n",dBegTri,dEndTri,Tolerance);
|
||||||
if(1 || (Abs(dBegTri) <= Tolerance)
|
// if(Abs(dBegTri) <= Tolerance || Abs(dEndTri) <= Tolerance)
|
||||||
|| (Abs(dEndTri) <= Tolerance)) {
|
{
|
||||||
gp_Vec VecPol(BegO,EndO);
|
gp_Vec VecPol(BegO,EndO);
|
||||||
Standard_Real NVecPol = VecPol.Magnitude();
|
Standard_Real NVecPol = VecPol.Magnitude();
|
||||||
gp_Dir DirPol(VecPol);
|
gp_Dir DirPol(VecPol);
|
||||||
@ -1268,8 +1268,8 @@ void Intf_InterferencePolygonPolyhedron::Intersect (const gp_Pnt& BegO,
|
|||||||
//-- Si cette distance est inferieure a Tolerance, on cree un SP.
|
//-- Si cette distance est inferieure a Tolerance, on cree un SP.
|
||||||
//--
|
//--
|
||||||
//-- printf("\nIntf_InterferencePolygPolyh : dBegTri=%g dEndTri=%g Tolerance=%g\n",dBegTri,dEndTri,Tolerance);
|
//-- printf("\nIntf_InterferencePolygPolyh : dBegTri=%g dEndTri=%g Tolerance=%g\n",dBegTri,dEndTri,Tolerance);
|
||||||
if(1 || (Abs(dBegTri) <= Tolerance)
|
// if (Abs(dBegTri) <= Tolerance || Abs(dEndTri) <= Tolerance)
|
||||||
|| (Abs(dEndTri) <= Tolerance)) {
|
{
|
||||||
gp_Vec VecPol(BegO,EndO);
|
gp_Vec VecPol(BegO,EndO);
|
||||||
Standard_Real NVecPol = VecPol.Magnitude();
|
Standard_Real NVecPol = VecPol.Magnitude();
|
||||||
gp_Dir DirPol(VecPol);
|
gp_Dir DirPol(VecPol);
|
||||||
|
@ -145,7 +145,7 @@ LDOM_XmlReader::RecordType LDOM_XmlReader::ReadRecord
|
|||||||
else {
|
else {
|
||||||
myIStream.read (&myBuffer[aBytesRest],
|
myIStream.read (&myBuffer[aBytesRest],
|
||||||
XML_BUFFER_SIZE - aBytesRest);
|
XML_BUFFER_SIZE - aBytesRest);
|
||||||
aNBytes = myIStream.gcount();
|
aNBytes = (Standard_Size)myIStream.gcount();
|
||||||
}
|
}
|
||||||
if (aNBytes == 0)
|
if (aNBytes == 0)
|
||||||
myEOF = Standard_True; // END-OF-FILE
|
myEOF = Standard_True; // END-OF-FILE
|
||||||
|
@ -215,6 +215,7 @@ void LProp_CLProps::Tangent (Dir& D)
|
|||||||
Standard_Real LProp_CLProps::Curvature ()
|
Standard_Real LProp_CLProps::Curvature ()
|
||||||
{
|
{
|
||||||
Standard_Boolean isDefined = IsTangentDefined();
|
Standard_Boolean isDefined = IsTangentDefined();
|
||||||
|
(void)isDefined; // trick to avoid compiler warning on variable unised in Release mode; note that IsTangentDefined() must be called always
|
||||||
LProp_NotDefined_Raise_if(!isDefined,
|
LProp_NotDefined_Raise_if(!isDefined,
|
||||||
"LProp_CLProps::CurvatureNotDefined()");
|
"LProp_CLProps::CurvatureNotDefined()");
|
||||||
|
|
||||||
|
@ -549,4 +549,9 @@ write_mailbox(int *boxid, char *box_name, char *message, int length)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
// to avoid compiler warning on empty file
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -317,4 +317,9 @@ osd_alarm_(int sec,RETSIGTYPE (*_alarm)())
|
|||||||
|
|
||||||
#endif /* __hpux */
|
#endif /* __hpux */
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
// to avoid compiler warning on empty file
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
#endif /* WNT */
|
#endif /* WNT */
|
||||||
|
@ -119,4 +119,9 @@ int remove_sharedmemory(int *shmid, char *section_name)
|
|||||||
if (status < 0) return 0;
|
if (status < 0) return 0;
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
// to avoid compiler warning on empty file
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,9 +85,11 @@ OSD_MAllocHook::CollectBySize* OSD_MAllocHook::GetCollectBySize()
|
|||||||
|
|
||||||
static long getRequestNum(void* pvData, long lRequest, size_t& theSize)
|
static long getRequestNum(void* pvData, long lRequest, size_t& theSize)
|
||||||
{
|
{
|
||||||
|
#if _MSC_VER == 1500 /* VS 2008 */
|
||||||
|
#ifdef _DEBUG /* in Release, _CrtIsValidHeapPointer is always 1 */
|
||||||
if (_CrtIsValidHeapPointer(pvData))
|
if (_CrtIsValidHeapPointer(pvData))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#if _MSC_VER == 1500 // VS 2008
|
|
||||||
#define nNoMansLandSize 4
|
#define nNoMansLandSize 4
|
||||||
// the header struct is taken from crt/src/dbgint.h
|
// the header struct is taken from crt/src/dbgint.h
|
||||||
struct _CrtMemBlockHeader
|
struct _CrtMemBlockHeader
|
||||||
@ -105,8 +107,10 @@ static long getRequestNum(void* pvData, long lRequest, size_t& theSize)
|
|||||||
_CrtMemBlockHeader* aHeader = ((_CrtMemBlockHeader*)pvData)-1;
|
_CrtMemBlockHeader* aHeader = ((_CrtMemBlockHeader*)pvData)-1;
|
||||||
theSize = aHeader->nDataSize;
|
theSize = aHeader->nDataSize;
|
||||||
return aHeader->lRequest;
|
return aHeader->lRequest;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)pvData; (void)theSize; // avoid compiler warning on unused arg
|
||||||
|
#endif
|
||||||
return lRequest;
|
return lRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@ Standard_Boolean OpenGl_GraphicDriver::Export (const Standard_CString theFileNam
|
|||||||
const Graphic3d_CView& theView,
|
const Graphic3d_CView& theView,
|
||||||
const Aspect_CLayer2d& theLayerUnder,
|
const Aspect_CLayer2d& theLayerUnder,
|
||||||
const Aspect_CLayer2d& theLayerOver,
|
const Aspect_CLayer2d& theLayerOver,
|
||||||
const Standard_Real thePrecision,
|
const Standard_Real /*thePrecision*/,
|
||||||
const Standard_Address theProgressBarFunc,
|
const Standard_Address /*theProgressBarFunc*/,
|
||||||
const Standard_Address theProgressObject)
|
const Standard_Address /*theProgressObject*/)
|
||||||
{
|
{
|
||||||
// gl2psBeginPage() will call OpenGL functions
|
// gl2psBeginPage() will call OpenGL functions
|
||||||
// so we should activate correct GL context before redraw scene call
|
// so we should activate correct GL context before redraw scene call
|
||||||
|
@ -133,7 +133,7 @@ namespace
|
|||||||
// Standard GL2PS's alignment isn't used, because it doesn't work correctly
|
// Standard GL2PS's alignment isn't used, because it doesn't work correctly
|
||||||
// for all formats, therefore alignment is calculated manually relative
|
// for all formats, therefore alignment is calculated manually relative
|
||||||
// to the bottom-left corner, which corresponds to the GL2PS_TEXT_BL value
|
// to the bottom-left corner, which corresponds to the GL2PS_TEXT_BL value
|
||||||
gl2psTextOpt (theText.ToCString(), aPsFont, theHeight, GL2PS_TEXT_BL, theAspect.Angle());
|
gl2psTextOpt (theText.ToCString(), aPsFont, (GLshort)theHeight, GL2PS_TEXT_BL, theAspect.Angle());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ static bool imageStretchDC(HDC theDstDC, FipHandle theImage, int theOffsetX,
|
|||||||
theHeight, 0, 0, widthPx, heightPx, aDataPtr,
|
theHeight, 0, 0, widthPx, heightPx, aDataPtr,
|
||||||
aBitmapData, DIB_RGB_COLORS, SRCCOPY);
|
aBitmapData, DIB_RGB_COLORS, SRCCOPY);
|
||||||
|
|
||||||
if (aPassed != heightPx)
|
if ((unsigned)aPassed != heightPx)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
PLib_ChangeDim.gxx
|
|
||||||
PLib_JacobiPolynomial_0.hxx
|
PLib_JacobiPolynomial_0.hxx
|
||||||
PLib_CMPLRS.edl
|
PLib_CMPLRS.edl
|
||||||
|
@ -29,31 +29,185 @@
|
|||||||
#include <Standard_ConstructionError.hxx>
|
#include <Standard_ConstructionError.hxx>
|
||||||
#include <GeomAbs_Shape.hxx>
|
#include <GeomAbs_Shape.hxx>
|
||||||
|
|
||||||
|
#include <math_Gauss.hxx>
|
||||||
|
#include <math.hxx>
|
||||||
|
|
||||||
// To convert points array into Real ..
|
// To convert points array into Real ..
|
||||||
// *********************************
|
// *********************************
|
||||||
|
|
||||||
#define Dimension_gen 2
|
//=======================================================================
|
||||||
#define Array1OfPoints TColgp_Array1OfPnt2d
|
//function : SetPoles
|
||||||
#define Point gp_Pnt2d
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
#include <PLib_ChangeDim.gxx>
|
void PLib::SetPoles(const TColgp_Array1OfPnt2d& Poles,
|
||||||
|
TColStd_Array1OfReal& FP)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
#undef Dimension_gen
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
#undef Array1OfPoints
|
const gp_Pnt2d& P = Poles(i);
|
||||||
#undef Point
|
FP(j) = P.Coord(1); j++;
|
||||||
|
FP(j) = P.Coord(2); j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define Dimension_gen 3
|
//=======================================================================
|
||||||
#define Array1OfPoints TColgp_Array1OfPnt
|
//function : SetPoles
|
||||||
#define Point gp_Pnt
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
#include <PLib_ChangeDim.gxx>
|
void PLib::SetPoles(const TColgp_Array1OfPnt2d& Poles,
|
||||||
|
const TColStd_Array1OfReal& Weights,
|
||||||
|
TColStd_Array1OfReal& FP)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
#undef Dimension_gen
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
#undef Array1OfPoints
|
Standard_Real w = Weights(i);
|
||||||
#undef Point
|
const gp_Pnt2d& P = Poles(i);
|
||||||
|
FP(j) = P.Coord(1) * w; j++;
|
||||||
|
FP(j) = P.Coord(2) * w; j++;
|
||||||
|
FP(j) = w; j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include <math_Gauss.hxx>
|
//=======================================================================
|
||||||
#include <math.hxx>
|
//function : GetPoles
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||||
|
TColgp_Array1OfPnt2d& Poles)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
|
gp_Pnt2d& P = Poles(i);
|
||||||
|
P.SetCoord(1,FP(j)); j++;
|
||||||
|
P.SetCoord(2,FP(j)); j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetPoles
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||||
|
TColgp_Array1OfPnt2d& Poles,
|
||||||
|
TColStd_Array1OfReal& Weights)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
|
Standard_Real w = FP(j + 2);
|
||||||
|
Weights(i) = w;
|
||||||
|
gp_Pnt2d& P = Poles(i);
|
||||||
|
P.SetCoord(1,FP(j) / w); j++;
|
||||||
|
P.SetCoord(2,FP(j) / w); j++;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : SetPoles
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void PLib::SetPoles(const TColgp_Array1OfPnt& Poles,
|
||||||
|
TColStd_Array1OfReal& FP)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
|
const gp_Pnt& P = Poles(i);
|
||||||
|
FP(j) = P.Coord(1); j++;
|
||||||
|
FP(j) = P.Coord(2); j++;
|
||||||
|
FP(j) = P.Coord(3); j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : SetPoles
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void PLib::SetPoles(const TColgp_Array1OfPnt& Poles,
|
||||||
|
const TColStd_Array1OfReal& Weights,
|
||||||
|
TColStd_Array1OfReal& FP)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
|
Standard_Real w = Weights(i);
|
||||||
|
const gp_Pnt& P = Poles(i);
|
||||||
|
FP(j) = P.Coord(1) * w; j++;
|
||||||
|
FP(j) = P.Coord(2) * w; j++;
|
||||||
|
FP(j) = P.Coord(3) * w; j++;
|
||||||
|
FP(j) = w; j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetPoles
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||||
|
TColgp_Array1OfPnt& Poles)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
|
gp_Pnt& P = Poles(i);
|
||||||
|
P.SetCoord(1,FP(j)); j++;
|
||||||
|
P.SetCoord(2,FP(j)); j++;
|
||||||
|
P.SetCoord(3,FP(j)); j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetPoles
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
||||||
|
TColgp_Array1OfPnt& Poles,
|
||||||
|
TColStd_Array1OfReal& Weights)
|
||||||
|
{
|
||||||
|
Standard_Integer j = FP .Lower();
|
||||||
|
Standard_Integer PLower = Poles.Lower();
|
||||||
|
Standard_Integer PUpper = Poles.Upper();
|
||||||
|
|
||||||
|
for (Standard_Integer i = PLower; i <= PUpper; i++) {
|
||||||
|
Standard_Real w = FP(j + 3);
|
||||||
|
Weights(i) = w;
|
||||||
|
gp_Pnt& P = Poles(i);
|
||||||
|
P.SetCoord(1,FP(j) / w); j++;
|
||||||
|
P.SetCoord(2,FP(j) / w); j++;
|
||||||
|
P.SetCoord(3,FP(j) / w); j++;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// specialized allocator
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
class BinomAllocator
|
class BinomAllocator
|
||||||
{
|
{
|
||||||
@ -120,8 +274,6 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
// we do not call BSplCLib here to avoid Cyclic dependency detection by WOK
|
// we do not call BSplCLib here to avoid Cyclic dependency detection by WOK
|
||||||
//static BinomAllocator THE_BINOM (BSplCLib::MaxDegree() + 1);
|
//static BinomAllocator THE_BINOM (BSplCLib::MaxDegree() + 1);
|
||||||
static BinomAllocator THE_BINOM (25 + 1);
|
static BinomAllocator THE_BINOM (25 + 1);
|
||||||
|
@ -1,160 +0,0 @@
|
|||||||
// Created on: 1995-09-01
|
|
||||||
// Created by: Laurent BOURESCHE
|
|
||||||
// Copyright (c) 1995-1999 Matra Datavision
|
|
||||||
// Copyright (c) 1999-2012 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.
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
|
|
||||||
#define No_Standard_RangeError
|
|
||||||
#define No_Standard_OutOfRange
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : SetPoles
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
void PLib::SetPoles(const Array1OfPoints& Poles,
|
|
||||||
TColStd_Array1OfReal& FP)
|
|
||||||
{
|
|
||||||
Standard_Integer i;
|
|
||||||
Standard_Integer j = FP .Lower();
|
|
||||||
Standard_Integer PLower = Poles.Lower();
|
|
||||||
Standard_Integer PUpper = Poles.Upper();
|
|
||||||
if (Dimension_gen == 3) {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
const Point& P = Poles(i);
|
|
||||||
FP(j) = P.Coord(1); j++;
|
|
||||||
FP(j) = P.Coord(2); j++;
|
|
||||||
FP(j) = P.Coord(3); j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
const Point& P = Poles(i);
|
|
||||||
FP(j) = P.Coord(1); j++;
|
|
||||||
FP(j) = P.Coord(2); j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : SetPoles
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
void PLib::SetPoles(const Array1OfPoints& Poles,
|
|
||||||
const TColStd_Array1OfReal& Weights,
|
|
||||||
TColStd_Array1OfReal& FP)
|
|
||||||
{
|
|
||||||
Standard_Real w;
|
|
||||||
Standard_Integer i;
|
|
||||||
Standard_Integer j = FP .Lower();
|
|
||||||
Standard_Integer PLower = Poles.Lower();
|
|
||||||
Standard_Integer PUpper = Poles.Upper();
|
|
||||||
if (Dimension_gen == 3) {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
w = Weights(i);
|
|
||||||
const Point& P = Poles(i);
|
|
||||||
FP(j) = P.Coord(1) * w; j++;
|
|
||||||
FP(j) = P.Coord(2) * w; j++;
|
|
||||||
FP(j) = P.Coord(3) * w; j++;
|
|
||||||
FP(j) = w; j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
w = Weights(i);
|
|
||||||
const Point& P = Poles(i);
|
|
||||||
FP(j) = P.Coord(1) * w; j++;
|
|
||||||
FP(j) = P.Coord(2) * w; j++;
|
|
||||||
FP(j) = w; j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : GetPoles
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
|
||||||
Array1OfPoints& Poles)
|
|
||||||
{
|
|
||||||
Standard_Integer i;
|
|
||||||
Standard_Integer j = FP .Lower();
|
|
||||||
Standard_Integer PLower = Poles.Lower();
|
|
||||||
Standard_Integer PUpper = Poles.Upper();
|
|
||||||
if (Dimension_gen == 3) {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
Point& P = Poles(i);
|
|
||||||
P.SetCoord(1,FP(j)); j++;
|
|
||||||
P.SetCoord(2,FP(j)); j++;
|
|
||||||
P.SetCoord(3,FP(j)); j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
Point& P = Poles(i);
|
|
||||||
P.SetCoord(1,FP(j)); j++;
|
|
||||||
P.SetCoord(2,FP(j)); j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : GetPoles
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
void PLib::GetPoles(const TColStd_Array1OfReal& FP,
|
|
||||||
Array1OfPoints& Poles,
|
|
||||||
TColStd_Array1OfReal& Weights)
|
|
||||||
{
|
|
||||||
Standard_Real w;
|
|
||||||
Standard_Integer i;
|
|
||||||
Standard_Integer j = FP .Lower();
|
|
||||||
Standard_Integer PLower = Poles.Lower();
|
|
||||||
Standard_Integer PUpper = Poles.Upper();
|
|
||||||
if (Dimension_gen == 3) {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
Weights(i) = w = FP(j + 3);
|
|
||||||
Point& P = Poles(i);
|
|
||||||
P.SetCoord(1,FP(j) / w); j++;
|
|
||||||
P.SetCoord(2,FP(j) / w); j++;
|
|
||||||
P.SetCoord(3,FP(j) / w); j++;
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (i = PLower; i <= PUpper; i++) {
|
|
||||||
Weights(i) = w = FP(j + 2);
|
|
||||||
Point& P = Poles(i);
|
|
||||||
P.SetCoord(1,FP(j) / w); j++;
|
|
||||||
P.SetCoord(2,FP(j) / w); j++;
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -59,7 +59,9 @@ static Standard_Integer QANColStdAllocator1(Draw_Interpretor& di, Standard_Integ
|
|||||||
|
|
||||||
elem_type aDummy;
|
elem_type aDummy;
|
||||||
allocator_type::reference aRef = aDummy;
|
allocator_type::reference aRef = aDummy;
|
||||||
|
(void)aRef; // avoid compiler warning on unused
|
||||||
allocator_type::const_reference aConstRef = aDummy;
|
allocator_type::const_reference aConstRef = aDummy;
|
||||||
|
(void)aConstRef; // avoid compiler warning on unused
|
||||||
if ( sizeof (allocator_type::size_type) == sizeof (size_t) ) {
|
if ( sizeof (allocator_type::size_type) == sizeof (size_t) ) {
|
||||||
di << "size_type : OK\n";
|
di << "size_type : OK\n";
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,9 +93,11 @@ void rec_settext(char* s)
|
|||||||
char* rec_newtext(char* r)
|
char* rec_newtext(char* r)
|
||||||
/* routine utilitaire creant une chaine dynamique a partir d'un char[] */
|
/* routine utilitaire creant une chaine dynamique a partir d'un char[] */
|
||||||
{
|
{
|
||||||
char* savrestext; char* s0;
|
char* savrestext;
|
||||||
|
char* s0;
|
||||||
savrestext = restext;
|
savrestext = restext;
|
||||||
rec_restext(r,strlen(r)); s0 = restext;
|
rec_restext(r,(int)strlen(r));
|
||||||
|
s0 = restext;
|
||||||
restext = savrestext;
|
restext = savrestext;
|
||||||
return (s0);
|
return (s0);
|
||||||
}
|
}
|
||||||
@ -396,7 +398,9 @@ void rec_print(struct rec* unrec)
|
|||||||
if (modeprint < 2) return ;
|
if (modeprint < 2) return ;
|
||||||
curarg = unrec->first ;
|
curarg = unrec->first ;
|
||||||
while (curarg != NULL) {
|
while (curarg != NULL) {
|
||||||
numa ++; argl = strlen(curarg->val) + 18; numl += argl;
|
numa ++;
|
||||||
|
argl = (int)strlen(curarg->val) + 18;
|
||||||
|
numl += argl;
|
||||||
if (numl > 132) { printf("\n"); numl = argl; }
|
if (numl > 132) { printf("\n"); numl = argl; }
|
||||||
printf (" - Arg.%d[%c%c] : %s",
|
printf (" - Arg.%d[%c%c] : %s",
|
||||||
numa,argtype1[curarg->type],argtype2[curarg->type],curarg->val);
|
numa,argtype1[curarg->type],argtype2[curarg->type],curarg->val);
|
||||||
|
@ -45,6 +45,11 @@ void rec_typarg(int argtype);
|
|||||||
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
||||||
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
||||||
|
|
||||||
|
// disable MSVC warnings in flex code
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4131 4244 4273 4267 4127)
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
%%
|
%%
|
||||||
" " {;}
|
" " {;}
|
||||||
|
@ -54,6 +54,12 @@
|
|||||||
#define alloca malloc
|
#define alloca malloc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// disable MSVC warnings in flex code
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4244 4131)
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
%%
|
%%
|
||||||
/* N.B. : les commentaires sont filtres par LEX */
|
/* N.B. : les commentaires sont filtres par LEX */
|
||||||
|
@ -139,7 +139,7 @@ TCollection_ExtendedString::TCollection_ExtendedString
|
|||||||
{
|
{
|
||||||
if (astring) {
|
if (astring) {
|
||||||
if(!isMultiByte) {
|
if(!isMultiByte) {
|
||||||
mylength = strlen( astring );
|
mylength = (int)strlen( astring );
|
||||||
mystring = Allocate((mylength+1)*2);
|
mystring = Allocate((mylength+1)*2);
|
||||||
for (int i = 0 ; i < mylength ; i++)
|
for (int i = 0 ; i < mylength ; i++)
|
||||||
mystring[i] = ToExtCharacter(astring[i]);
|
mystring[i] = ToExtCharacter(astring[i]);
|
||||||
@ -235,7 +235,7 @@ TCollection_ExtendedString::TCollection_ExtendedString
|
|||||||
union {int bid ;
|
union {int bid ;
|
||||||
char t [13];} CHN ;
|
char t [13];} CHN ;
|
||||||
Sprintf(&CHN.t[0],"%d",aValue);
|
Sprintf(&CHN.t[0],"%d",aValue);
|
||||||
mylength = strlen(CHN.t);
|
mylength = (int)strlen(CHN.t);
|
||||||
mystring = Allocate((mylength+1)*2);
|
mystring = Allocate((mylength+1)*2);
|
||||||
for (int i = 0 ; i < mylength ; i++) mystring[i] = ToExtCharacter(CHN.t[i]);
|
for (int i = 0 ; i < mylength ; i++) mystring[i] = ToExtCharacter(CHN.t[i]);
|
||||||
mystring[mylength] = '\0';
|
mystring[mylength] = '\0';
|
||||||
@ -250,7 +250,7 @@ TCollection_ExtendedString::TCollection_ExtendedString
|
|||||||
union {int bid ;
|
union {int bid ;
|
||||||
char t [50];} CHN ;
|
char t [50];} CHN ;
|
||||||
Sprintf(&CHN.t[0],"%g",aValue);
|
Sprintf(&CHN.t[0],"%g",aValue);
|
||||||
mylength = strlen( CHN.t );
|
mylength = (int)strlen( CHN.t );
|
||||||
mystring = Allocate((mylength+1)*2);
|
mystring = Allocate((mylength+1)*2);
|
||||||
for (int i = 0 ; i < mylength ; i++) mystring[i] = ToExtCharacter(CHN.t[i]);
|
for (int i = 0 ; i < mylength ; i++) mystring[i] = ToExtCharacter(CHN.t[i]);
|
||||||
mystring[mylength] = '\0';
|
mystring[mylength] = '\0';
|
||||||
|
@ -353,15 +353,11 @@ void TopOpeBRepDS_Curve::ChangeIsWalk(const Standard_Boolean B)
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
|
#ifdef DEB
|
||||||
Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
|
Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
|
||||||
const Standard_Integer index,
|
const Standard_Integer index,
|
||||||
#ifdef DEB
|
|
||||||
const Standard_Boolean compact)const
|
const Standard_Boolean compact)const
|
||||||
#else
|
|
||||||
const Standard_Boolean)const
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#ifdef DEB
|
|
||||||
OS<<"Curve : "; if (index != 0) OS<<index<<" ";
|
OS<<"Curve : "; if (index != 0) OS<<index<<" ";
|
||||||
if (!Curve().IsNull()) {
|
if (!Curve().IsNull()) {
|
||||||
TopOpeBRepDS_Dumper::Print(Curve(),OS,compact);
|
TopOpeBRepDS_Dumper::Print(Curve(),OS,compact);
|
||||||
@ -386,10 +382,17 @@ Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
|
|||||||
if (!I2.IsNull()) DSCI(I2)->DumpPCurve(OS,compact);
|
if (!I2.IsNull()) DSCI(I2)->DumpPCurve(OS,compact);
|
||||||
else OS<<" is null";
|
else OS<<" is null";
|
||||||
OS<<endl;
|
OS<<endl;
|
||||||
#endif
|
|
||||||
|
|
||||||
return OS;
|
return OS;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
|
||||||
|
const Standard_Integer,
|
||||||
|
const Standard_Boolean)const
|
||||||
|
{
|
||||||
|
return OS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -50,7 +50,7 @@ Standard_EXPORT TopTools_IndexedMapOfOrientedShape STATIC_PURGE_mapeds;
|
|||||||
static void FUN_RaiseError()
|
static void FUN_RaiseError()
|
||||||
{
|
{
|
||||||
#ifdef DEB
|
#ifdef DEB
|
||||||
Standard_Boolean trc = TopOpeBRepTool_GettraceCORRISO();
|
// Standard_Boolean trc = TopOpeBRepTool_GettraceCORRISO();
|
||||||
FUN_REINIT();
|
FUN_REINIT();
|
||||||
// if (trc) cout <<"*********failure in CORRISO***********\n";
|
// if (trc) cout <<"*********failure in CORRISO***********\n";
|
||||||
#endif
|
#endif
|
||||||
@ -156,6 +156,7 @@ Standard_Boolean TopOpeBRepTool_CORRISO::Init(const TopoDS_Shape& S)
|
|||||||
const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
|
const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
|
||||||
#ifdef DEB
|
#ifdef DEB
|
||||||
Standard_Integer iE = STATIC_PURGE_mapeds.Add(E);
|
Standard_Integer iE = STATIC_PURGE_mapeds.Add(E);
|
||||||
|
(void)iE; // avoid warning
|
||||||
#ifdef DRAW
|
#ifdef DRAW
|
||||||
if (trc) {TCollection_AsciiString aa = TCollection_AsciiString("e"); FUN_tool_draw(aa,E,iE);}
|
if (trc) {TCollection_AsciiString aa = TCollection_AsciiString("e"); FUN_tool_draw(aa,E,iE);}
|
||||||
#endif
|
#endif
|
||||||
@ -180,6 +181,7 @@ Standard_Boolean TopOpeBRepTool_CORRISO::Init(const TopoDS_Shape& S)
|
|||||||
const TopoDS_Vertex& v = TopoDS::Vertex(exv.Current());
|
const TopoDS_Vertex& v = TopoDS::Vertex(exv.Current());
|
||||||
#ifdef DEB
|
#ifdef DEB
|
||||||
Standard_Integer iE = STATIC_PURGE_mapeds.Add(E);
|
Standard_Integer iE = STATIC_PURGE_mapeds.Add(E);
|
||||||
|
(void)iE; // avoid warning
|
||||||
#ifdef DRAW
|
#ifdef DRAW
|
||||||
if (trc) {TCollection_AsciiString bb = TCollection_AsciiString("v"); FUN_tool_draw(bb,v,iv);}
|
if (trc) {TCollection_AsciiString bb = TCollection_AsciiString("v"); FUN_tool_draw(bb,v,iv);}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user