IS_HOLLOW,
IS_HATCH,
IS_SOLID,
- IS_HIDDENLINE
+ IS_HIDDENLINE,
+ IS_POINT
end InteriorStyle;
---Purpose: Definition of interior types for primitive
-- faces.
-- IS_HATCH display hatched with a hatch style.
-- IS_SOLID display the interior entirely filled.
-- IS_HIDDENLINE display in hidden lines removed.
+ -- IS_POINT display only vertices.
--
---Category: Enumerations
aUP1=aUPeriod+aDelta;
//
if (u2 > aUP2) {
- for(k=1; 1; ++k) {
+ k=1;
+ do {
aUx=u2-k*aUPeriod;
- if (aUx < aUP1) {
- iCnt=k;
- break;
- }
- }
+ iCnt = k++;
+ } while (aUx >= aUP1);
}
else if (u2 < -aUP2) {
- for(k=1; 1; ++k) {
+ k=1;
+ do {
aUx=u2+k*aUPeriod;
- if (aUx > -aUP1) {
- iCnt=k+1;
- break;
- }
- }
+ iCnt = (k++) + 1;
+ } while (aUx <= -aUP1);
}
du = ( mincond ) ? aUPeriod : -aUPeriod;
du=iCnt*du;
FirstVertex = wexp.CurrentVertex();
} else {
Standard_Boolean isSameCurve = Standard_False;
- Standard_Real NewFpar, NewLpar;
+ Standard_Real NewFpar = RealFirst(), NewLpar = RealLast();
GeomAdaptor_Curve GAprevcurve(CurveSeq.Last());
if (aCurve == CurveSeq.Last()) {
#ifdef DRAW
#include <DBRep.hxx>
#endif
-#ifdef DEB
+#ifdef DEBUG_ALGO
Standard_Boolean AffichLoop = Standard_False;
Standard_Integer NbLoops = 0;
Standard_Integer NbWires = 1;
}
if (OnStart && OnEnd) {
if (!VB[0].IsSame(VB[1])) {
-#ifdef DEB
+#ifdef DEBUG_ALGO
if (AffichLoop)
cout <<"Two different vertices on the closing vertex"<<endl;
#endif
{
TopTools_ListIteratorOfListOfShape itl;
NE.Nullify();
-#ifdef DEB
+#ifdef DEBUG_ALGO
if (AffichLoop) {
if ( LE.Extent() > 2) {
cout <<"vertex on more than 2 edges in a face."<<endl;
TopoDS_Vertex V1,V2;
Standard_Boolean YaCouture = Standard_False;
-#ifdef DEB
+#ifdef DEBUG_ALGO
if (AffichLoop) {
cout <<"NewLoop"<<endl;
- Standard_Integer NbEdges = 1;
NbLoops++;
#ifdef DRAW
sprintf(name,"FLoop_%d",NbLoops);
DBRep::Set(name,myFace);
+ Standard_Integer NbEdges = 1;
#endif
for (Mapit.Initialize(myVerOnEdges); Mapit.More(); Mapit.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(Mapit.Key());
if (VF.IsSame(CV) && SamePnt2d(VF,EF,CE,myFace))
myNewWires.Append (NW);
-#ifdef DEB
+#ifdef DEBUG_ALGO
else {
cout <<"BRepAlgo_Loop: Open Wire"<<endl;
if (AffichLoop)
//function : IsDistanceIn3DTolerance
//purpose :
//=======================================================================
+static
Standard_Boolean IsDistanceIn2DTolerance (const BRepAdaptor_Surface& aFaceSurface,
const gp_Pnt2d& thePnt,
const gp_Pnt2d& thePntRef,
const Standard_Real aTol3d,
+#ifdef DEB
const Standard_Boolean PrintWarnings = Standard_True)
- {
+#else
+ const Standard_Boolean = Standard_True)
+#endif
+{
Standard_Real dumax = 0.01 * (aFaceSurface.LastUParameter() - aFaceSurface.FirstUParameter());
Standard_Real dvmax = 0.01 * (aFaceSurface.LastVParameter() - aFaceSurface.FirstVParameter());
Standard_Real dumin = Abs(thePnt.X() - thePntRef.X());
} //-- for(;;) { ... }
- return 0;
}
// Modified by skv - Thu Sep 4 12:30:14 2003 OCC578 Begin
//const BOPTools_VVInterference& aVV = aVVs(vvit);
const BOPDS_InterfVV& aVV = aVVs(vvit);
- if(((vindex1 == aVV.Index1()) && (vindex2 = aVV.Index2())) ||
- ((vindex1 == aVV.Index2()) && (vindex2 = aVV.Index1()))) {
+ if(((vindex1 == aVV.Index1()) && (vindex2 == aVV.Index2())) ||
+ ((vindex1 == aVV.Index2()) && (vindex2 == aVV.Index1()))) {
if(!aVV.HasIndexNew()) {
continue;
//=======================================================================
void BRepMesh_Delaun::cleanupMesh()
{
- while ( Standard_True )
+ for(;;)
{
BRepMesh_MapOfIntegerInteger aLoopEdges( 10, myMeshData->Allocator() );
NCollection_Map<Standard_Integer> aDelTriangles;
//function : UseEdge
//purpose : Modify mesh to use the edge. Return True if done
//=======================================================================
-Standard_Boolean BRepMesh_Delaun::UseEdge( const Standard_Integer theIndex )
+Standard_Boolean BRepMesh_Delaun::UseEdge( const Standard_Integer /*theIndex*/ )
{
/*
const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( theIndex );
{
return aArea;
}
-
- Standard_Integer aEndIndex = (theEndIndex > aPolyLen) ?
- aPolyLen : theEndIndex;
-
Standard_Integer aCurEdgeInfo = thePolygon( theStartIndex );
Standard_Integer aCurEdgeId = Abs( aCurEdgeInfo );
const BRepMesh_Edge* aCurEdge = &GetEdge( aCurEdgeId );
return;
Standard_Real f[3],l[3];
- Standard_Real MilTol2 = 1000*Tol*Tol;
Standard_Real TolDub = 1.e-7;
Standard_Integer i;
cout << "out of limit"<<endl;
cout<<"aT2 = "<<aT2<<", f[2] = "<<f[2]<<", l[2] = "<<l[2]<<endl;
}
+ Standard_Real MilTol2 = 1000*Tol*Tol;
if (P1.SquareDistance(P) > MilTol2 || P2.SquareDistance(P) > MilTol2 || P1.Distance(P2) > 2.*Tol)
{
cout << "Inter2d : Solution rejected "<<endl;
return;
Standard_Real f[3],l[3];
- Standard_Real MilTol2 = 1000*Tol*Tol;
Standard_Real TolDub = 1.e-7;
Standard_Integer i;
cout << "out of limit"<<endl;
cout<<"aT2 = "<<aT2<<", f[2] = "<<f[2]<<", l[2] = "<<l[2]<<endl;
}
+ Standard_Real MilTol2 = 1000*Tol*Tol;
if (P1.SquareDistance(P) > MilTol2 || P2.SquareDistance(P) > MilTol2 || P1.Distance(P2) > 2.*Tol)
{
cout << "Inter2d : Solution rejected"<<endl;
#endif
#ifdef DEB
#include <OSD_Chronometer.hxx>
-
+//#define DEB_VERB
Standard_Boolean AffichInt2d = Standard_False;
Standard_Boolean AffichOffC = Standard_False;
Standard_Boolean ChronBuild = Standard_False;
const TopTools_ListOfShape& LofOF = myAsDes->Ascendant(ROE);
if (LofOF.Extent() != 2) {
-#ifdef DEB
- if ( Standard_False)
- cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl;
+#ifdef DEB_VERB
+ cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl;
#endif
continue;
}
return Standard_True;
}
}
- Curve2d = C2d;
- return Standard_True;
}
//=======================================================================
VDegree > BSplCLib::MaxDegree() || BSplCLib::MaxDegree() > 25,
"BSplSLib: bspline degree is greater than maximum supported");
}
-
Standard_Real poles[4*(25+1)*(25+1)];
Standard_Real knots1[2*25];
Standard_Real knots2[2*25];
#include <BinDrivers_DocumentRetrievalDriver.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID BinStorageDriver ("03a56835-8269-11d5-aab2-0050044b1af1");
static Standard_GUID BinRetrievalDriver("03a56836-8269-11d5-aab2-0050044b1af1");
{
return BinLDrivers::StorageVersion();
}
+
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
PLUGIN(BinDrivers)
#include <BinLDrivers_DocumentRetrievalDriver.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID BinLStorageDriver ("13a56835-8269-11d5-aab2-0050044b1af1");
static Standard_GUID BinLRetrievalDriver("13a56836-8269-11d5-aab2-0050044b1af1");
#define CURRENT_DOCUMENT_VERSION 7
TCollection_AsciiString aVersionStr (CURRENT_DOCUMENT_VERSION);
return aVersionStr;
}
+
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
PLUGIN(BinLDrivers)
#include <BinTObjDrivers_XYZDriver.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID BinStorageDriver ("f78ff4a2-a779-11d5-aab4-0050044b1af1");
static Standard_GUID BinRetrievalDriver("f78ff4a3-a779-11d5-aab4-0050044b1af1");
aDriverTable -> AddDriver (new BinTObjDrivers_IntSparseArrayDriver (aMsgDrv));
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
PLUGIN(BinTObjDrivers)
#include <BinDrivers.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID BinXCAFStorageDriver ("a78ff496-a779-11d5-aab4-0050044b1af1");
static Standard_GUID BinXCAFRetrievalDriver("a78ff497-a779-11d5-aab4-0050044b1af1");
-
//=======================================================================
//function :
//purpose :
return aTable;
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
PLUGIN(BinXCAFDrivers)
//purpose : DDisplay (DOC,entry, not_update)
//=======================================================================
-static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor& di,
+static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor&,
Standard_Integer nb,
const char** arg)
{
static DWORD WINAPI readStdinThreadFunc(VOID)
{
if (!Draw_IsConsoleSubsystem) return 1;
-
for(;;) {
while (console_semaphore != WAIT_CONSOLE_COMMAND)
Sleep(100);
- //if (gets(console_command))
- if (fgets(console_command,COMMAND_SIZE,stdin))
+ if (fgets(console_command,COMMAND_SIZE,stdin))
{
console_semaphore = HAS_CONSOLE_COMMAND;
}
-
}
- return 0;
}
/*--------------------------------------------------------*\
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
#endif
PLUGIN(FWOSDriver)
//purpose :
//=======================================================================
-void Geom2dAPI_InterCurveCurve::Segment
- (const Standard_Integer Index,
- Handle(Geom2d_Curve)& //Curve1
- ) const
+void Geom2dAPI_InterCurveCurve::Segment (const Standard_Integer Index,
+ Handle(Geom2d_Curve)&) const
{
Standard_NotImplemented::Raise(" ");
static Standard_Boolean Affich = Standard_False;
static Standard_Integer NbSECTIONS = 0;
#endif
-
+//#define GF_DEB
//=======================================================================
//function : GeomFill_SweepSectionGenerator
//purpose :
gp_Vec(PPath,P1));
Angle = ElCLib::CircleParameter(Axis,P2);
}
-#ifdef DEB
+#ifdef GF_DEB
if (Standard_False) {
gp_Vec dummyD1 = myAdpPath->DN(U,1);
gp_Vec dummyTg = Axis.Direction();
myImageAlpha->InitZero (Image_PixMap::ImgGray, myImage->Width(), myImage->Height());
myImageAlpha->SetTopDown (Standard_False);
Quantity_Parameter anAlpha;
- for (Standard_Integer aRowIter = 0; aRowIter < myImage->Height(); aRowIter++)
+ for (Standard_Size aRowIter = 0; aRowIter < myImage->Height(); aRowIter++)
{
Standard_Byte* anImageRow = myImageAlpha->ChangeRow (aRowIter);
- for (Standard_Integer aColumnIter = 0; aColumnIter < myImage->Width(); aColumnIter++)
+ for (Standard_Size aColumnIter = 0; aColumnIter < myImage->Width(); aColumnIter++)
{
myImage->PixelColor (aColumnIter, aRowIter, anAlpha);
anImageRow[aColumnIter] = Standard_Byte (255.0 * anAlpha);
//purpose :
//=======================================================================
-Standard_Boolean
-HLRBRep_Data::OrientOutLine (const Standard_Integer I,
- HLRBRep_FaceData& FD)
+
+#ifdef DEB
+Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_FaceData& FD)
+#else
+Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer, HLRBRep_FaceData& FD)
+#endif
{
const Handle(HLRAlgo_WiresBlock)& wb = FD.Wires();
Standard_Integer nw = wb->NbWires();
//=======================================================================
inline Standard_Boolean
-HLRBRep_Data::EdgeOfTheHidingFace (const Standard_Integer E,
+HLRBRep_Data::EdgeOfTheHidingFace (const Standard_Integer,
const HLRBRep_EdgeData& ED) const
{ return ED.HideCount() == myHideCount-1; }
{ return 3; }
// modified by NIZHNY-MKK Tue Nov 1 18:49:28 2005
-inline void HLRBRep_LineTool::SamplePars (const gp_Lin& C,
+inline void HLRBRep_LineTool::SamplePars (const gp_Lin&,
const Standard_Real U0,
const Standard_Real U1,
- const Standard_Real Defl,
- const Standard_Integer NbMin,
+ const Standard_Real,
+ const Standard_Integer,
Handle(TColStd_HArray1OfReal)& Pars) {
Pars = new TColStd_HArray1OfReal(1, 3);
//=======================================================================
void
+#ifdef DEB
HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer iTri,
+#else
+HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
+#endif
const Standard_Address Tri1Indices,
const Standard_Address Nod1Indices,
const Standard_Address Nod1RValues,
static Standard_Boolean IntLineRisesFromRegularity(const TopoDS_Edge& anIntLine,
const TopoDS_Edge& anEdge,
- const TopoDS_Face& aFace,
+ const TopoDS_Face&,
const TopTools_ListOfShape& aList)
{
TopoDS_Vertex Ver [2];
void iges_newparam(int typarg,int longval, char *parval);
void iges_newpart(int numsec);
-void iges_curpart(int numsec,int dnum);
+void iges_curpart(int dnum);
void iges_addparam(int longval, char* parval);
#define ArgVide 0
/* Utilitaire decodant un nombre en format fixe dans une ligne
Il part de "depuis" inclus (debut ligne = 0) et prend "tant" caracteres
Valeur lue en retour de fonction */
-static int IGES_decode(ligne,depuis,tant)
-char* ligne; int depuis, tant;
+static int IGES_decode (char* ligne, int depuis, int tant)
{
int val = 0; int i;
int depart = depuis+tant-1;
}
/* Recopie d'une chaine de caracteres de longueur fixe (close par \0) */
-void IGES_copstr(ligne,depuis,tant,dans)
-char *ligne; int depuis, tant; char* dans;
+void IGES_copstr(char *ligne, int depuis, int tant, char* dans)
{
int i;
for (i = 0; i < tant; i ++) { dans[i] = ligne[depuis+i]; }
}
/* Analyse section D */
-void iges_Dsect (Dstat,numsec,ligne)
-int *Dstat,numsec; char* ligne;
+void iges_Dsect (int *Dstat, int numsec, char* ligne)
{
struct dirpart *curp;
if (*Dstat == 0) {
/* Lecture section P : preanalyse
Extraction du numero D et troncature a 64 caracteres */
-void iges_Psect(Pstat,numsec,ligne)
-int *Pstat; int numsec; char ligne[80];
+void iges_Psect (int numsec, char ligne[80])
{
int dnum;
dnum = atoi(&ligne[65]);
ligne[64] = '\0';
- iges_curpart(numsec,dnum);
+ iges_curpart(dnum);
#ifdef VERIFPRINT
printf("Entite P:%d ->D:%d,soit %s\n",numsec,dnum,ligne);
+#else
+ (void)numsec; // just to avoid warning
#endif
}
/* + definitions des types de parametres en tete */
-void iges_param(Pstat,ligne,c_separ,c_fin,lonlin)
-int *Pstat; char c_separ,c_fin, *ligne; int lonlin;
+void iges_param (int *Pstat, char *ligne, char c_separ, char c_fin, int lonlin)
{
int i,i0,j; char param[80]; char unpar;
if (*Pstat == 0) reste = 0;
void iges_newparam(int typarg,int longval, char *parval);
void iges_param(int *Pstat,char *ligne,char c_separ,char c_fin,int lonlin);
void iges_Dsect (int *Dstat,int numsec,char* ligne);
-void iges_Psect(int *Pstat,int numsec,char ligne[80]);
+void iges_Psect(int numsec,char ligne[80]);
static char sects [] = " SGDPT ";
-int igesread(nomfic,lesect,modefnes)
-char* nomfic; int lesect[6]; int modefnes;
+int igesread (char* nomfic, int lesect[6], int modefnes)
{
/* MGE 16/06/98 */
}
if (i == 3) iges_Dsect(&Dstat,numsec,ligne); /* Directory (Dsect) */
if (i == 4) { /* Parametres (Psect) */
- iges_Psect(&Pstat,numsec,ligne);
+ iges_Psect(numsec,ligne);
for (;;) {
iges_param(&Pstat,ligne,c_separ,c_fin,64);
if (Pstat != 2) break;
void iges_newparam(int typarg,int longval, char *parval);
void iges_param(int *Pstat,char *ligne,char c_separ,char c_fin,int lonlin);
void iges_Dsect (int *Dstat,int numsec,char* ligne);
- void iges_Psect(int *Pstat,int numsec,char ligne[80]);
+ void iges_Psect(int numsec,char ligne[80]);
/* MGE 20/07/98 */
void IGESFile_Check2 (int mode,char * code, int num, char * str);
/* Utilitaire : Reservation de caracteres
Remplace suite de mini-malloc par gestion de page */
-char* iges_newchar(newtext,lentext)
-char* newtext; int lentext;
+char* iges_newchar (char* newtext, int lentext)
{
int i, lnt;
if ((lnt = onecarpage->used) > Maxcar-lentext-1) { /* allouer nouvelle page */
/* Definition et Selection d'un nouveau dirpart */
-void iges_newpart(numsec)
-int numsec;
+void iges_newpart(int numsec)
{
if (curpage->used >= Maxparts) {
struct dirpage* newpage;
/* Selection du dirpart dnum, correspond a numsec en Psect */
-void iges_curpart(numsec,dnum)
-int numsec,dnum;
+void iges_curpart (int dnum)
{
if (curp == NULL) return;
if (dnum == curp->numpart) return;
/* (manque la gestion d'un Hollerith sur plusieurs lignes) */
/* longval : longueur de parval, incluant le zero final */
-void iges_newparam(typarg,longval,parval)
-int typarg,longval; char *parval;
+void iges_newparam (int typarg, int longval, char *parval)
{
char *newval;
if (curlist == NULL) return; /* non defini : abandon */
}
/* Complement du parametre courant (cf Hollerith sur +ieurs lignes) */
-void iges_addparam(longval,parval)
-int longval; char* parval;
+void iges_addparam (int longval, char* parval)
{
char *newval, *oldval; int i,long0;
if (longval <= 0) return;
/* Relecture : Initialiation */
/* entites relues par suite de lirpart + {lirparam}
lirparam initiaux : pour relire le demarrage (start section) */
-void iges_stats(nbpart, nbparam)
-int* nbpart; int* nbparam;
+void iges_stats (int* nbpart, int* nbparam)
{
curpage = firstpage; curnumpart = 0;
curlist = starts;
*nbparam = nbparams;
}
-/* Lecture d'une part : retour = n0 section, 0 si fin */
-int iges_lirpart
- (tabval, res1,res2,nom,num, nbparam)
-
-int* *tabval; /* tableau recepteur des entiers (reserver 17 valeurs) */
-char* *res1; char* *res2; char* *nom; char* *num; /* char : transmis a part */
-int *nbparam;
+/* Lecture d'une part : retour = n0 section, 0 si fin */
+/* \par tabval tableau recepteur des entiers (reserver 17 valeurs) */
+/* \par res1 res2 nom num char : transmis a part */
+int iges_lirpart (int* *tabval, char* *res1, char* *res2, char* *nom, char* *num, int *nbparam)
{
if (curpage == NULL) return 0;
curp = &(curpage->parts[curnumpart]);
}
/* Lecture parametre + passage au suivant */
-int iges_lirparam(typarg,parval) /* renvoie 0 si fin de liste, 1 sinon */
-int *typarg; char* *parval;
+int iges_lirparam (int *typarg, char* *parval) /* renvoie 0 si fin de liste, 1 sinon */
{
if (curparam == NULL) return 0;
*typarg = curparam->typarg;
/* Fin pour ce fichier : liberer la place */
/* mode = 0 : tout; 1 : parametres; 2 : caracteres */
-void iges_finfile(mode)
-int mode;
+void iges_finfile (int mode)
{
struct dirpage* oldpage;
if (mode == 0 || mode == 2) { free (starts); free (header); }
#include <IGESToBRep_ToolContainer.hxx>
#include <Message_ProgressSentry.hxx>
-// mjm le 10/10/96 on force la continuity a 0 en attendant de pouvoir
-// travailler sur wire en non plus edge.
-
-
//=======================================================================
//function : IGESToBRep_BRepEntity
//purpose :
TopoDS_Face F;
Handle(IGESData_IGESEntity) surf = start->Surface();
Standard_Integer nbloops = start->NbLoops();
- Standard_Boolean hasouterloop = start->HasOuterLoop();
IGESToBRep_TopoSurface TS(*this);
// surface
// function : InitTrash
// purpose :
// =======================================================================
+#ifdef HAVE_FREEIMAGE
bool Image_AlienPixMap::InitTrash (ImgFormat thePixelFormat,
const Standard_Size theSizeX,
const Standard_Size theSizeY,
- const Standard_Size theSizeRowBytes)
+ const Standard_Size /*theSizeRowBytes*/)
{
Clear();
-#ifdef HAVE_FREEIMAGE
FREE_IMAGE_TYPE aFormatFI = convertToFreeFormat (thePixelFormat);
int aBitsPerPixel = (int )Image_PixMap::SizePixelBytes (thePixelFormat) * 8;
if (aFormatFI == FIT_UNKNOWN)
// assign image after wrapper initialization (virtual Clear() called inside)
myLibImage = anImage;
return true;
+}
#else
+bool Image_AlienPixMap::InitTrash (ImgFormat thePixelFormat,
+ const Standard_Size theSizeX,
+ const Standard_Size theSizeY,
+ const Standard_Size theSizeRowBytes)
+{
return Image_PixMap::InitTrash (thePixelFormat, theSizeX, theSizeY, theSizeRowBytes);
-#endif
}
+#endif
// =======================================================================
// function : InitCopy
#include <TColStd_HArray1OfReal.hxx>
#include <Adaptor3d_TopolTool.hxx>
#include <ElCLib.hxx>
-
+//#define ICS_DEB
static
void EstLimForInfExtr(const gp_Lin& Line,
const TheSurface& surface,
done = Standard_True;
Standard_Integer NbUOnS = TheSurfaceTool::NbUIntervals(surface,GeomAbs_C2);
Standard_Integer NbVOnS = TheSurfaceTool::NbVIntervals(surface,GeomAbs_C2);
+#ifdef ICS_DEB
Standard_Integer NbOnC = TheCurveTool::NbIntervals(curve,GeomAbs_C2);
+#endif
Standard_Real U0,U1,V0,V1;
if(NbUOnS > 1) {
if( (VTX0.IsOnDomS1() == Standard_False)
&& (VTX0.IsOnDomS2() == Standard_False)) {
svtx.Remove(nbvtx);
-#ifndef DEB
- if((signed)lapt == nbvtx) {
-#else
- if(lapt == nbvtx) {
-#endif
- indl--;
+ if(lapt) {
+ indl--;
}
}
}
{
gp_Vec Tgt;
gp_Pnt ptref;
-#ifndef DEB
- Co.Apex();
-#else
- gp_Pnt apex(Co.Apex());
- //Standard_Real param;
- Standard_Real paramapex = ElCLib::LineParameter(Co.Axis(),apex);
-#endif
for (i=1; i<=NbSol; i++) {
gp_Circ cirsol = inter.Circle(i);
gp_Pnt ptvalid, ptf, ptl;
gp_Vec tgvalid;
-#ifdef DEB
- Standard_Real paramapex =
-#endif
- ElCLib::LineParameter(Co.Axis(),
- Co.Apex());
Standard_Real first,last,para;
Standard_Boolean tgfound,firstp,lastp,kept;
Standard_Integer kount;
if (!SolAgain.IsDone()) {Standard_Failure::Raise();}
- Standard_Integer Nbp_again = SolAgain.NbPoints();
Standard_Integer Nbi_again = SolAgain.NbIntervals();
if (Nbi_again > 0)
//function : IsRegularity
//purpose :
//=======================================================================
-Standard_Boolean IsRegularity(const TheArc& A,
+Standard_Boolean IsRegularity(const TheArc&,
const Handle(TheTopolTool)& aDomain)
{
Standard_Address anEAddress=aDomain->Edge();
float ViewScaleY;
float ViewScaleZ;
- int IsCustomMatrix;
float ModelViewMatrix[4][4];
+ unsigned IsCustomMatrix;
+
} CALL_DEF_VIEWORIENTATION;
float um, vm, uM, vM;
} WindowLimit;
- int IsCustomMatrix;
float ProjectionMatrix[4][4];
+ unsigned IsCustomMatrix;
+
} CALL_DEF_VIEWMAPPING;
/* REPERAGE */
//---------------------------------------------------
// boucle 2 Tant qu il y a des bisectrices a effacer.
//---------------------------------------------------
- while(Standard_True) {
+ for(;;) {
NbIterBis++;
noofbisectorstoremove = 0;
// <bisectortwotoremove(i).
//---------------------------------------------------------------
- while(Standard_True){
+ for(;;){
#ifdef DEBUG_Mat
atool.Dump(bisectortoremove->BisectorNumber(),0);
case 5 : return TopAbs_WIRE;
case 6 : return TopAbs_EDGE;
case 7 : return TopAbs_VERTEX;
- default :
- return TopAbs_SHAPE;
+ default : return TopAbs_SHAPE;
}
- return TopAbs_SHAPE;
}
//=======================================================================
case 5 : return TopAbs_WIRE;
case 6 : return TopAbs_EDGE;
case 7 : return TopAbs_VERTEX;
- default :
- return TopAbs_SHAPE;
+ default : return TopAbs_SHAPE;
}
- return TopAbs_SHAPE;
}
//=======================================================================
void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup,
const Standard_Integer theNoInsert,
- const Standard_Integer theMarkWidth,
- const Standard_Integer theMarkHeight,
- const Handle(TColStd_HArray1OfByte)& theTexture)
+ const Standard_Integer /*theMarkWidth*/,
+ const Standard_Integer /*theMarkHeight*/,
+ const Handle(TColStd_HArray1OfByte)& /*theTexture*/)
{
if (!theCGroup.ContextMarker.IsDef)
{
glDisable (GL_POLYGON_STIPPLE);
break;
}
- case 5: //szvgl - no corresponding enumeration item Aspect_IS_POINT // = 5
+ case Aspect_IS_POINT: //szvgl - no corresponding enumeration item Aspect_IS_POINT // = 5
{
glPolygonMode(GL_FRONT_AND_BACK,GL_POINT);
break;
RS_AlreadyRetrieved,
RS_UnknownDocument,
RS_WrongResource,
+ RS_ReaderException,
RS_NoModel
end ReaderStatus;
//function : OCC11758
//purpose :
//=======================================================================
-static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, const char** argv)
+static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, const char**)
{
if (n != 1) return 1;
}
// --- External Mapping Case Recognition ---
-
-Standard_Integer RWHeaderSection_ReadWriteModule::CaseStep
- (const TColStd_SequenceOfAsciiString& types) const
+#ifdef DEB
+Standard_Integer RWHeaderSection_ReadWriteModule::CaseStep (const TColStd_SequenceOfAsciiString& types) const
{
-
Standard_Integer NbComp = types.Length();
-#ifdef DEB
if (NbComp < 2) {
cout << "Plex Instance illegal " << endl;
}
-#endif
return 0;
}
-
+#else
+Standard_Integer RWHeaderSection_ReadWriteModule::CaseStep (const TColStd_SequenceOfAsciiString&) const
+{ return 0; }
+#endif
// --- External Mapping Recognition ---
// Purpose: Use it in DEB mode to dump your shapes
// ============================================================================
+#ifdef DEB
static void DumpWhatIs(const TopoDS_Shape& S) {
TopTools_MapOfShape aMapOfShape;
nbVertexes++;
}
}
- #ifdef DEB
+
cout << "//What is?// NB COMPOUNDS: " << nbCompounds << endl;
cout << "//What is?// NB SOLIDS: " << nbSolids << endl;
cout << "//What is?// NB SHELLS: " << nbShells << endl;
cout << "//What is?// NB WIRES: " << nbWires << endl;
cout << "//What is?// NB EDGES: " << nbEdges << endl;
cout << "//What is?// NB VERTEXES: " << nbVertexes << endl;
- #endif
}
+#endif
namespace {
// Set global var to inform outer methods that current representation item is non-manifold.
// Purpose: Use it in DEB mode to dump your shapes
// ============================================================================
+#ifdef DEB
static void DumpWhatIs(const TopoDS_Shape& S) {
TopTools_MapOfShape aMapOfShape;
nbVertexes++;
}
}
- #ifdef DEB
+
cout << "//What is?// NB SOLIDS: " << nbSolids << endl;
cout << "//What is?// NB SHELLS: " << nbShells << endl;
cout << "//What is?// OPEN SHELLS: " << nbOpenShells << endl;
cout << "//What is?// NB WIRES: " << nbWires << endl;
cout << "//What is?// NB EDGES: " << nbEdges << endl;
cout << "//What is?// NB VERTEXES: " << nbVertexes << endl;
- #endif
}
+#endif
//=======================================================================
// Function : IsManifoldShape
PAGE_READWRITE,
DWORD(AlignedSize / 0x80000000),
DWORD(AlignedSize % 0x80000000), NULL);
- HANDLE * aMBlock = NULL;
+ HANDLE * aMBlock = (hMap && GetLastError() != ERROR_ALREADY_EXISTS ?
+ (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0) : NULL);
// check for error and try allocating address space
- if ( ! hMap || GetLastError() == ERROR_ALREADY_EXISTS ||
- ! ((aMBlock = (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0))) )
+ if ( ! aMBlock )
{
// close handle if allocated
if ( hMap )
#include <Standard_GUID.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID StdStorageDriver ("ad696000-5b34-11d1-b5ba-00a0c9064368");
static Standard_GUID StdRetrievalDriver ("ad696001-5b34-11d1-b5ba-00a0c9064368");
static Standard_GUID StdSchemaID ("ad696002-5b34-11d1-b5ba-00a0c9064368");
return t;
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
+
// Declare entry point PLUGINFACTORY
PLUGIN(StdDrivers)
#include <Standard_GUID.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID StdLStorageDriver ("bd696000-5b34-11d1-b5ba-00a0c9064368");
static Standard_GUID StdLRetrievalDriver ("bd696001-5b34-11d1-b5ba-00a0c9064368");
static Standard_GUID StdLSchemaID ("bd696002-5b34-11d1-b5ba-00a0c9064368");
return t;
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
+
// Declare entry point PLUGINFACTORY
PLUGIN(StdLDrivers)
static char txt_cart_p[] = "CARTESIAN_POINT";
-void rec_restext(newtext,lentext) /* destine a etre appele de l'exterieur */
-char* newtext; int lentext;
+void rec_restext(char* newtext, int lentext) /* destine a etre appele de l'exterieur */
{
char *res, *text;
if(strcmp(newtext,txt_cart_p)==0) {
*res = '\0' ;
}
-void rec_gettext(r)
-char* *r ;
-{ *r = restext; }
+void rec_gettext(char* *r)
/* Le resultat retourne (pointeur) est destine a etre inclus dans un struct */
+{ *r = restext; }
-void rec_settext(s)
-char* s ; /* substituer le texte courant par un autre deja alloue */
+void rec_settext(char* s)
+/* substituer le texte courant par un autre deja alloue */
{ restext = s ; }
-char* rec_newtext(r)
+char* rec_newtext(char* r)
/* routine utilitaire creant une chaine dynamique a partir d'un char[] */
-char* r ;
{
char* savrestext; char* s0;
savrestext = restext;
/* Trace pour controle */
-void recfile_modeprint(mode)
-int mode ;
+void recfile_modeprint(int mode)
{ modeprint = mode; }
static int lastno;
/* GESTION DES RECORDS */
/* ENREGISTRER UN RECORD (deja pret) */
-void static rec_new(newrec)
-struct rec* newrec ; /* nouveau record a enregistrer */
+void static rec_new(struct rec* newrec)
+/* nouveau record a enregistrer */
{
nbrec ++ ;
if ( firstrec == NULL ) firstrec = newrec ;
}
/* type du dernier argument lu */
-void rec_typarg(argtype)
-int argtype ;
+void rec_typarg(int argtype)
{ typarg = argtype; }
/* ENREGISTRER UNE ENTITE (record courant) */
/* Affichage du contenu d'un record */
-void rec_print(unrec)
-struct rec* unrec ;
+void rec_print(struct rec* unrec)
{
int numa = 0; int numl = 0; int argl = 0;
if (unrec == NULL) { printf ("Non defini\n") ; return; }
La liberation de la memoire est faite par lir_file_fin, en une fois
*/
-void lir_file_nbr(nbh,nbr,nbp)
-int* nbh; int* nbr; int* nbp;
+void lir_file_nbr(int* nbh, int* nbr, int* nbp)
/* initialise le traitement et retourne la taille du directory et du header */
{
currec = firstrec ;
*nbh = nbhead; *nbr = nbrec; *nbp = nbpar;
}
-void lir_file_fin(mode)
-int mode;
+void lir_file_fin(int mode)
/* fin du traitement : regroupe les liberations de memoire en une phase */
/* mode = 1 : rec+arg. 2 : carpage; 3 : 1+2 */
{
}
}
-int lir_file_rec(ident,type,nbarg)
+int lir_file_rec(char* *ident, char* *type, int *nbarg)
/* retourne les parametres du record courant
retour de fonction ; 1 si ok, 0 si liste epuisee */
-char* *ident ; char* *type ; int *nbarg ;
{
if (currec == NULL) return (0) ;
/* rec_check(2) ; */
/* rec_check(2) ; */
}
-int lir_file_arg(type,val)
-int* type ; char* *val ;
+int lir_file_arg(int* type, char* *val)
/* lit l'argument courant (au debut le 1er), fait le menage, prepare suivant
retourne 1 si ok, 0 si c'est fini
attention, suppose que nbarg > 0 ... (bref, pas de protection) */
/* Affiche ce qui ne va pas, mais aussi accede a tout : ainsi, les adresses
verolees aparaissent au grand jour du dbx */
-void rec_check(mode)
-int mode ; /* =1 pas de controle nbrec (en cours d'enregistrement) */
+void rec_check(int mode)
+/* mode=1 pas de controle nbrec (en cours d'enregistrement) */
{
struct rec* lerec ; struct unarg* larg ; int nr,na ;
lerec = firstrec ;
Standard_Integer degree = index - (byte_index << 3) - myLower;
Standard_Integer byte_value = DegreeOf2(degree);
- if (value == ((myValues->Value(byte_index) & byte_value) > 0))
+ if ((value != 0) == ((myValues->Value(byte_index) & byte_value) > 0))
return;
Backup();
//purpose :
//=======================================================================
void TDataStd_ReferenceArray::SetInternalArray (const Handle(TDataStd_HLabelArray1)& values,
- const Standard_Boolean isCheckItem)
+ const Standard_Boolean)
{
// myArray = values;
Standard_Integer aLower = values->Lower();
myIsError = Standard_False;
TCollection_ExtendedString aPath ((const Standard_CString)theSourceFile);
- PCDM_ReaderStatus aStatus = (PCDM_ReaderStatus) -1;
+ PCDM_ReaderStatus aStatus = PCDM_RS_ReaderException;
{
try
{
case PCDM_RS_DriverFailure:
ErrorMessage (Message_Msg("TObj_Appl_RDriverFailure") << aPath);
break;
- case -1:
+ case PCDM_RS_ReaderException:
ErrorMessage (Message_Msg("TObj_Appl_RException") << aPath);
break;
default:
Standard_Integer TestTopOpe_BOOP::Prepare(const char* ns1,const char* ns2)
{
- Standard_Integer err = 0;
- if ((err = LoadShapes(ns1,ns2))) return err; // 0
- if ((err = LoadnewDS())) return err; // 100
- if ((err = DSF_Insert())) return err; // 100<,<200
- if ((err = LoadnewHB())) return err; // 200
- if ((err = Builder_Perform())) return err; // 200<,<300
- return 0;
+ Standard_Integer anErrorCode = 0;
+ anErrorCode = LoadShapes(ns1,ns2); // mylastPREP is 0
+ if (anErrorCode)
+ return anErrorCode;
+
+ anErrorCode = LoadnewDS(); // mylastPREP is 100
+ if (anErrorCode)
+ return anErrorCode;
+
+ anErrorCode = DSF_Insert(); // mylastPREP is (100,200)
+ if (anErrorCode)
+ return anErrorCode;
+
+ anErrorCode = LoadnewHB(); // mylastPREP is 200
+ if (anErrorCode)
+ return anErrorCode;
+
+ anErrorCode = Builder_Perform(); // mylastPREP is (200,300)
+ return anErrorCode;
}
Standard_Integer TestTopOpe_BOOP::LoadShapes(const char* ns1, const char* ns2)
Standard_Integer TestTopOpe_BOOP::DSF_Insert()
{
-// Standard_Integer err = 0;
TopOpeBRep_DSFiller DSF;
DSF_Insert(DSF);
mylastPREP = 190;
Standard_Integer TestTopOpe_BOOP::LoadnewHB()
{
-// Standard_Integer err = 0;
TopOpeBRepTool_GeomTool GT;
Standard_Boolean c2d = myVarsTopo.GetC2D();
GT.Define(myVarsTopo.GetOCT(),Standard_True,c2d, c2d);
Standard_Integer TestTopOpe_BOOP::Builder_Perform()
{
-// Standard_Integer err = 0;
myHB->Perform(myHDS,myS1,myS2);
#ifdef DEB
if ( TopOpeBRepTool_GettraceKRO() ) PrintKRO_PREPA();
} // TOPO
// ----------------------------------------------------------------------
+#ifdef DEB
Standard_Integer BOOPCHK(Draw_Interpretor& ,Standard_Integer na,const char** a)
{
if (!strcmp(a[0],"tchk")) {
-#ifdef DEB
// Standard_IMPORT extern Standard_Integer TopOpeBRepTool_BOOOPE_CHECK_DEB;
Standard_IMPORT Standard_Integer TopOpeBRepTool_BOOOPE_CHECK_DEB;
if ( na >= 2 ) TopOpeBRepTool_BOOOPE_CHECK_DEB = (Draw::Atoi(a[1])) ? 1 : 0;
-#endif
return 0;
}
return 0;
}
+#else
+Standard_Integer BOOPCHK(Draw_Interpretor& ,Standard_Integer,const char**) {return 0;}
+#endif
// ----------------------------------------------------
Standard_Integer TOPOSETCOMMANDS(TestTopOpe_BOOP& PT,Standard_Integer na,const char** a, Draw_Interpretor& di)
return 0;
}
#endif
-
+#ifdef DEB
//----------------------------------------------------------------------------
Standard_Integer InitContextTopOpeKernel (TestTopOpeTools_Trace& T)
//----------------------------------------------------------------------------
{
-#ifdef DEB
if (T.Add("nosew",(tf_value)TopOpeBRepTool_SetcontextNOSEW)) return 1;
if (T.Add("nopnc",(tf_value)TopOpeBRepDS_SetcontextNOPNC)) return 1;
if (T.Add("nosg",(tf_value)TopOpeBRepBuild_SetcontextNOSG)) return 1;
if (T.Add("nopfi",(tf_value)TopOpeBRepDS_SetcontextNOPFI)) return 1;
if (T.Add("mktonreg",(tf_value)TopOpeBRepDS_SetcontextMKTONREG)) return 1;
if (T.Add("nogap",(tf_value)TopOpeBRepDS_SetcontextNOGAP)) return 1;
-#endif
+
return 0;
}
+#else
+Standard_Integer InitContextTopOpeKernel (TestTopOpeTools_Trace&) { return 0;}
+#endif
Standard_EXPORT Standard_Integer TestTopOpeTools_SetFlags
(TestTopOpeTools_Trace& theFlags, Standard_Integer mute, Standard_Integer n , const char** a)
// a1 = flag (for example tbs) <a2> = value, if omitted flag becomes True
//=========================================================================
-Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer n , const char** a)
+
+#ifdef DEB
+Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer n ,const char** a)
+#else
+Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer,const char**)
+#endif
{
Standard_Integer ok = Standard_True;
#ifdef DEB
// a1 = flag (for example tbs) <a2> = value, if omitted flag becomes True
//=========================================================================
-Standard_Integer TestTopOpeTools_SetContext(Draw_Interpretor&, Standard_Integer n , const char** a)
+#ifdef DEB
+Standard_Integer TestTopOpeTools_SetContext(Draw_Interpretor&, Standard_Integer n ,const char** a)
{
Standard_Integer ok = Standard_True;
-#ifdef DEB
InitContextTopOpeKernel(theContext);
Standard_Integer mute = 0; if (!strcasecmp(a[0],"ctxmute")) mute = 1;
ok = TestTopOpeTools_SetFlags(theContext,mute,n,a);
-#endif
return ok;
}
+#else
+Standard_Integer TestTopOpeTools_SetContext(Draw_Interpretor&, Standard_Integer,const char**)
+{ return Standard_True;}
+#endif
Standard_Integer dstrace(Draw_Interpretor& di, Standard_Integer n , const char** a) {
const char ** pa = NULL; TCollection_AsciiString a1;
//======================================================================
void TopClass_Classifier3d::Reset(const gp_Lin& L,
- const Standard_Real Param,
+ const Standard_Real,
const Standard_Real Tol) {
myLin = L;
myParam = RealLast();
#include <IntCurveSurface_TransitionOnCurve.hxx>
void TopClass_Classifier3d::Compare(const TopoDS_Face& Face,
- const TopAbs_Orientation Orientation) {
+ const TopAbs_Orientation) {
if(!isSet) {
cout<<" Call to TopClass_Classifier3d::Compare without a Reset ! ";
return;
Handle(TopOpeBRepDS_Interference)& iloi = loi.First();
TopOpeBRepDS_Transition& TU = iloi->ChangeTransition();
Standard_Integer ifb = TU.IndexBefore();
- Standard_Integer ifa = TU.IndexAfter();
const TopoDS_Face& fb = TopoDS::Face(myPDS->Shape(ifb));
#ifdef DEB
+ Standard_Integer ifa = TU.IndexAfter();
if (ifb != ifa) {cout<<"TopOpeBRep_EdgesFiller : ifb != ifa on E"<<EIX<<" NYI"<<endl;}
#endif
// attached to the edge (stored in the DS).
//=======================================================================
static Standard_Boolean FUN_findTF(const TopOpeBRepDS_PDataStructure pDS,
- const Standard_Integer iE, const Standard_Integer iF, const Standard_Integer iOOF,
+ const Standard_Integer iE, const Standard_Integer, const Standard_Integer iOOF,
TopOpeBRepDS_Transition& TF)
{
Standard_Real factor = 0.5;
//----------------------------------------------------------------------
#ifdef DEB
- Standard_Boolean trcd = Standard_False;
#ifdef DRAW
+ Standard_Boolean trcd = Standard_False;
if (trcd) FUN_DrawMap(myDataforDegenEd);
#endif
#endif
//function : Dump
//purpose :
//=======================================================================
+#ifdef DEB
void TopOpeBRep_Point2d::Dump(const Standard_Integer E1index,const Standard_Integer E2index) const
{
-#ifdef DEB
Standard_Real par1 = Parameter(1);
Standard_Real par2 = Parameter(2);
cout<<" PV(2) : "<<P3D.X()<<" "<<P3D.Y()<<" "<<P3D.Z();
}
cout<<endl;
-#endif
}
+#else
+void TopOpeBRep_Point2d::Dump(const Standard_Integer,const Standard_Integer) const {}
+#endif
gp_Pnt pmil = BC.Value(parmil);
#ifdef DEB
+#ifdef DRAW
Standard_Boolean trc = TopOpeBRep_GettraceBIPS();
- #ifdef DRAW
- if (trc) {TCollection_AsciiString aa("pmil"); FUN_brep_draw(aa,pmil);}
- #endif
+ if (trc) {TCollection_AsciiString aa("pmil"); FUN_brep_draw(aa,pmil);}
+#endif
#endif
TopAbs_State st = FSC_StatePonFace (pmil,F,*myPShapeClassifier);
return st;
//purpose :
//=======================================================================
+#ifdef DEB
void TopOpeBRep_ShapeIntersector::DumpCurrent(const Standard_Integer K) const
{
-#ifdef DEB
if ( myFFDone ) {
if ( K == 1 ) myFaceScanner.DumpCurrent(cout);
else if ( K == 2 ) myFaceExplorer.DumpCurrent(cout);
if ( K == 1 ) myEdgeScanner.DumpCurrent(cout);
else if ( K == 2 ) myEdgeExplorer.DumpCurrent(cout);
}
-#endif
}
+#else
+void TopOpeBRep_ShapeIntersector::DumpCurrent(const Standard_Integer) const {}
+#endif
//=======================================================================
//function : Index
//purpose :
//=======================================================================
+#ifdef DEB
Standard_Integer TopOpeBRep_ShapeIntersector::Index
(const Standard_Integer K)const
{
Standard_Integer i = 0;
-#ifdef DEB
+
if ( myFFDone ) {
if ( K == 1 ) i = myFaceScanner.Index();
else if ( K == 2 ) i = myFaceExplorer.Index();
if ( K == 1 ) i = myEdgeScanner.Index();
else if ( K == 2 ) i = myEdgeExplorer.Index();
}
-#endif
return i;
}
+#else
+Standard_Integer TopOpeBRep_ShapeIntersector::Index (const Standard_Integer)const
+{
+ return 0;
+}
+#endif
//=======================================================================
//purpose :
//=======================================================================
+#ifdef DEB
void TopOpeBRep_ShapeIntersector2d::DumpCurrent(const Standard_Integer K) const
{
-#ifdef DEB
if ( myFFDone ) {
if ( K == 1 ) myFaceScanner.DumpCurrent(cout);
else if ( K == 2 ) myFaceExplorer.DumpCurrent(cout);
if ( K == 1 ) myEdgeScanner.DumpCurrent(cout);
else if ( K == 2 ) myEdgeExplorer.DumpCurrent(cout);
}
+#else
+void TopOpeBRep_ShapeIntersector2d::DumpCurrent(const Standard_Integer) const
+{
#endif
}
//purpose :
//=======================================================================
+#ifdef DEB
Standard_Integer TopOpeBRep_ShapeIntersector2d::Index
(const Standard_Integer K)const
{
Standard_Integer i = 0;
-#ifdef DEB
+
if ( myFFDone ) {
if ( K == 1 ) i = myFaceScanner.Index();
else if ( K == 2 ) i = myFaceExplorer.Index();
if ( K == 1 ) i = myEdgeScanner.Index();
else if ( K == 2 ) i = myEdgeExplorer.Index();
}
-#endif
+
return i;
}
+#else
+Standard_Integer TopOpeBRep_ShapeIntersector2d::Index (const Standard_Integer)const { return 0;}
+#endif
//=======================================================================
//function : Dump
//purpose :
//=======================================================================
+#ifdef DEB
Standard_OStream& TopOpeBRep_VPointInter::Dump(const TopoDS_Face& FF1,const TopoDS_Face& FF2,Standard_OStream& OS) const
{
-#ifdef DEB
const TopoDS_Face& F1 = TopoDS::Face(FF1);
const TopoDS_Face& F2 = TopoDS::Face(FF2);
OS<<"VP "<<myIndex<<" on "<<myShapeIndex<<" :";
Dump(1,F1,OS);
Dump(2,F2,OS);
}
-
+#else
+Standard_OStream& TopOpeBRep_VPointInter::Dump(const TopoDS_Face&,const TopoDS_Face&,Standard_OStream& OS) const
+{
#endif
return OS;
Standard_Integer absindex = VP.ShapeIndex();
Standard_Integer OOabsindex = (absindex == 1) ? 2 : 1;
- Standard_Boolean OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
+ Standard_Integer OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
Standard_Boolean on2edges = (absindex == 3) || (Lrest && (rkErest == OOabsindex));
TopoDS_Shape edge = (rkErest == ShapeIndex)? Erest : VP.Edge(ShapeIndex);
else hasOOedge = (VP.State(OOShapeIndex) == TopAbs_ON);
if ( hasOOedge ) {
TopoDS_Shape OOedge;
-#ifndef DEB
- if (on2edges) OOedge = ((signed) rkErest == (signed) OOShapeIndex)? Erest : VP.Edge(OOShapeIndex);
-#else
+
if (on2edges) OOedge = (rkErest == OOShapeIndex)? Erest : VP.Edge(OOShapeIndex);
-#endif
else OOedge = VP.EdgeON(OOShapeIndex);
+
Standard_Real OOpar = 0.;
-#ifndef DEB
- if (on2edges) OOpar = ((signed) rkErest == (signed) OOShapeIndex)? parErest : VP.EdgeParameter(OOShapeIndex);
-#else
+
if (on2edges) OOpar = (rkErest == OOShapeIndex)? parErest : VP.EdgeParameter(OOShapeIndex);
-#endif
else OOpar = VP.EdgeONParameter(OOShapeIndex);
+
Standard_Real tolOOe = FUN_tool_maxtol(OOedge);
Standard_Real OOtolp = Precision::Parametric(tolOOe);
if (BDS.HasShape(OOedge)) {
//purpose :
//=======================================================================
+#ifdef DEB
void TopOpeBRepBuild_Area1dBuilder::DumpList(const TopOpeBRepBuild_ListOfLoop& LOL)
{
-#ifdef DEB
Standard_Integer iLOL;
TopOpeBRepBuild_ListIteratorOfListOfLoop itLOL;
for (iLOL = 0, itLOL.Initialize(LOL); itLOL.More(); iLOL++, itLOL.Next()) {
const Handle(TopOpeBRepBuild_Loop)& L = itLOL.Value();
L->Dump();cout<<endl;
}
+#else
+void TopOpeBRepBuild_Area1dBuilder::DumpList(const TopOpeBRepBuild_ListOfLoop&)
+{
#endif
}
void TopOpeBRepBuild_Area1dBuilder::ADD_Loop_TO_LISTOFLoop
(const Handle(TopOpeBRepBuild_Loop)& L,
TopOpeBRepBuild_ListOfLoop& LOL,
- const Standard_Address ss) const
-{
+ const Standard_Address
#ifdef DEB
- char* s = (char*)ss;
+ ss
#endif
-
+ ) const
+{
LOL.Append(L);
#ifdef DEB
if (TopOpeBRepBuild_GettraceAREA()) {
cout<<"--------------------- add area loop to area : ";
L->Dump(); cout<<endl;
- if (s != NULL) cout<<s<<endl;
+ if (ss != NULL) cout<<(char*)ss<<endl;
DumpList(LOL);
cout<<"---------------------"<<endl;
}
void TopOpeBRepBuild_Area1dBuilder::REM_Loop_FROM_LISTOFLoop
(TopOpeBRepBuild_ListIteratorOfListOfLoop& ITA,
TopOpeBRepBuild_ListOfLoop& A,
+#ifdef DEB
const Standard_Address ss) const
{
-#ifdef DEB
char* s = (char*)ss;
+#else
+const Standard_Address) const
+{
#endif
#ifdef DEB
void TopOpeBRepBuild_Area1dBuilder::ADD_LISTOFLoop_TO_LISTOFLoop
(TopOpeBRepBuild_ListOfLoop& A1,
TopOpeBRepBuild_ListOfLoop& A2,
+ #ifdef DEB
const Standard_Address ss,
const Standard_Address ss1,
const Standard_Address ss2) const
+#else
+ const Standard_Address,
+ const Standard_Address,
+ const Standard_Address) const
+#endif
{
#ifdef DEB
char* s = (char*)ss;
TopOpeBRepBuild_WireEdgeClassifier WEC(F,BB);
TopOpeBRepBuild_LoopSet& LS = myLoopSet;
myFaceAreaBuilder.InitFaceAreaBuilder(LS,WEC,ForceClass);
-
- // Standard_Boolean hascnxsta = WES.HasConnexStartElement();
- // if ( hascnxsta ) {
- // myMOSI.Clear();
- // InitFace();
- // for (;MoreFace();NextFace()) {
- // InitWire();
- // for (;MoreWire();NextWire()) {
- // Standard_Boolean isold = IsOldWire();if (isold) continue;
- // InitEdge();
- // for(;MoreEdge();NextEdge()) {
- // const TopoDS_Shape& E = Edge();
- // Standard_Boolean issta = WES.IsStartElement(E);
- // Standard_Boolean nsta = WES.NStartElement(E);Standard_Boolean iscnx = (nsta == 2);
- // if (!issta || !iscnx ) continue;
- // Standard_Boolean isb = myMOSI.IsBound(E);
- // if (!isb) myMOSI.Bind(E,0);
- // Standard_Integer nmosi = myMOSI(E);
- // nmosi++;
- // myMOSI(E) = nmosi;
- // }
- // }
- // }
- // } // hascnxsta
-
}
//---------------------------------------------------------------
ChangeStartShapes(me:in out) returns ListOfShape from TopTools;
---C++: return &
- IsStartElement(me;S:Shape) returns Boolean;
- IsElement(me;S:Shape) returns Boolean;
- IsShape(me;S:Shape) returns Boolean;
-
- NStartElement(me;S:Shape) returns Integer;
- NElement(me;S:Shape) returns Integer;
- NShape(me;S:Shape) returns Integer;
-
FindNeighbours(me:in out) is virtual;
---Purpose: Build the list of neighbour shapes of myCurrentShape
-- (neighbour shapes and myCurrentShapes are of type t)
return myStartShapes;
}
-//=======================================================================
-//function : IsStartElement
-//purpose :
-//=======================================================================
-Standard_Boolean TopOpeBRepBuild_ShapeSet::IsStartElement(const TopoDS_Shape& S) const
-{
- Standard_Boolean b = Standard_False;
-#ifdef DEB
- b = myOMSS.Contains(S);
-#endif
- return b;
-}
-
-//=======================================================================
-//function : IsElement
-//purpose :
-//=======================================================================
-Standard_Boolean TopOpeBRepBuild_ShapeSet::IsElement(const TopoDS_Shape& S) const
-{
- Standard_Boolean b = Standard_False;
-#ifdef DEB
- b = myOMES.Contains(S);
-#endif
- return b;
-}
-
-//=======================================================================
-//function : IsShape
-//purpose :
-//=======================================================================
-Standard_Boolean TopOpeBRepBuild_ShapeSet::IsShape(const TopoDS_Shape& S) const
-{
- Standard_Boolean b = Standard_False;
-#ifdef DEB
- b = myOMSH.Contains(S);
-#endif
- return b;
-}
-
-//=======================================================================
-//function : NStartElement
-//purpose :
-//=======================================================================
-Standard_Integer TopOpeBRepBuild_ShapeSet::NStartElement(const TopoDS_Shape& S) const
-{
- Standard_Integer n = 0;
-#ifdef DEB
- Standard_Boolean b = Standard_False;
- b = IsStartElement(S);
- if (b) n++;
- b = IsStartElement(S.Oriented(TopAbs::Complement(S.Orientation())));
- if (b) n++;
-#endif
- return n;
-}
-
-//=======================================================================
-//function : NElement
-//purpose :
-//=======================================================================
-Standard_Integer TopOpeBRepBuild_ShapeSet::NElement(const TopoDS_Shape& S) const
-{
- Standard_Integer n = 0;
-#ifdef DEB
- Standard_Boolean b = Standard_False;
- b = IsElement(S); if (b) n++;
- b = IsElement(S.Oriented(TopAbs::Complement(S.Orientation())));
- if (b) n++;
-#endif
- return n;
-}
-
-//=======================================================================
-//function : IsShape
-//purpose :
-//=======================================================================
-Standard_Integer TopOpeBRepBuild_ShapeSet::NShape(const TopoDS_Shape& S) const
-{
- Standard_Integer n = 0;
-#ifdef DEB
- Standard_Boolean b = Standard_False;
- b = IsShape(S);
- if (b) n++;
- b = IsShape(S.Oriented(TopAbs::Complement(S.Orientation())));
- if (b) n++;
-#endif
- return n;
-}
-
//=======================================================================
//function : FindNeighbours
//purpose :
//function : DumpCheck
//purpose :
//=======================================================================
-void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream& OS,const TCollection_AsciiString& str,const TopoDS_Shape& S,const Standard_Boolean chk) const
+
+#ifdef DEB
+void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream& OS,
+ const TCollection_AsciiString& str,
+ const TopoDS_Shape& S,
+ const Standard_Boolean chk
+#else
+void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream&,
+ const TCollection_AsciiString&,
+ const TopoDS_Shape&,
+ const Standard_Boolean
+#endif
+ ) const
{
if (!myCheckShape) return;
//=======================================================================
TopOpeBRepBuild_ShellFaceSet::TopOpeBRepBuild_ShellFaceSet
+#ifdef DEB
(const TopoDS_Shape& S,const Standard_Address A) : // DEB
+#else
+(const TopoDS_Shape& S,const Standard_Address) : // DEB
+#endif
TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
{
mySolid = TopoDS::Solid(S);
-- Initialize iterator of neighbour edges to edge myCurrentShape
MakeNeighboursList(me: in out;E,V:Shape) returns ListOfShape from TopTools is redefined;
---C++: return const &
- HasConnexStartElement(me) returns Boolean; -- desactivated
- -- private
VertexConnectsEdges(me;V,E1,E2:Shape;O1,O2:out Orientation from TopAbs)
returns Boolean is private;
---Purpose:
} // MakeNeighoursList
-//=======================================================================
-//function : HasConnexStartElement
-//purpose :
-//=======================================================================
-Standard_Boolean TopOpeBRepBuild_WireEdgeSet::HasConnexStartElement() const
-{
-#ifdef DEB
- Standard_ProgramError::Raise("WireEdgeSet::HasConnexStartElement management disactivated");
-#endif
-
- Standard_Boolean b = Standard_False;
-
-// Standard_Integer n = myOMSS.Extent();
-// for(Standard_Integer i=1;i<=n;i++) {
-// const TopoDS_Shape& S = myOMSS.FindKey(i);
-// Standard_Integer ns = NStartElement(S);
-// b = (ns == 2);
-// if (b) break;
-// }
-
- return b;
-}
-
//=======================================================================
//function : VertexConnectsEdges
//purpose :
// S is used for trace only
//=======================================================================
void TopOpeBRepBuild_Builder::GKeepShapes
-(const TopoDS_Shape& S,const TopTools_ListOfShape& LSclass,const TopAbs_State TB,const TopTools_ListOfShape& Lin,TopTools_ListOfShape& Lou)
+#ifdef DEB
+(const TopoDS_Shape& S,
+#else
+(const TopoDS_Shape&,
+#endif
+ const TopTools_ListOfShape& LSclass,const TopAbs_State TB,const TopTools_ListOfShape& Lin,TopTools_ListOfShape& Lou)
{
#ifdef DEB
Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);
//purpose :
//=======================================================================
-Standard_OStream& TopOpeBRepDS_Curve::Dump(Standard_OStream& OS,
- const Standard_Integer index,
- const Standard_Boolean compact)const
+Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
+ const Standard_Integer index,
+#ifdef DEB
+ const Standard_Boolean compact)const
+#else
+ const Standard_Boolean)const
+#endif
{
#ifdef DEB
OS<<"Curve : "; if (index != 0) OS<<index<<" ";
//function : Dump
//purpose :
//=======================================================================
-
+#ifdef DEB
Standard_OStream& TopOpeBRepDS_Interference::Dump
(Standard_OStream& OS,
const TCollection_AsciiString& s1,
const TCollection_AsciiString& s2) const
{
-#ifdef DEB
OS<<s1;
Dump(OS);
OS<<s2;
OS.flush();
-#endif
return OS;
}
+#else
+Standard_OStream& TopOpeBRepDS_Interference::Dump
+(Standard_OStream& OS,
+ const TCollection_AsciiString&,
+ const TCollection_AsciiString&) const
+{ return OS; }
+#endif
Standard_OStream& TopOpeBRepDS_SurfaceCurveInterference::DumpPCurve
(Standard_OStream& OS,
- const Standard_Boolean compact)const
+#ifdef DEB
+ const Standard_Boolean compact
+#else
+ const Standard_Boolean
+#endif
+ )const
{
#ifdef DEB
Dump(OS); OS<<endl;
//function : DumpB
//purpose :
//=======================================================================
-void TopOpeBRepTool_HBoxTool::DumpB (const Bnd_Box& B)
-{
+void TopOpeBRepTool_HBoxTool::DumpB
#ifdef DEB
+(const Bnd_Box& B)
+{
if (B.IsVoid()) cout<<"# IsVoid";
else if (B.IsWhole()) cout<<"# IsWhole";
else {
cout<<"bounding "<<x<<" "<<y<<" "<<z<<" "<<X<<" "<<Y<<" "<<Z;
cout.flush();
}
-#endif
}
+#else
+(const Bnd_Box& )
+{
+}
+#endif
+
//function : VMarkersTest
//purpose : Draws an array of markers for testing purposes.
//=======================================================================
-static Standard_Integer VMarkersTest (Draw_Interpretor& theDI,
+static Standard_Integer VMarkersTest (Draw_Interpretor&,
Standard_Integer theArgNb,
const char** theArgVec)
{
// Get connection string
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
TCollection_AsciiString aDisplayName(theDisplayName);
- if (aDisplayName.IsEmpty())
+ if (!aDisplayName.IsEmpty())
SetDisplayConnection (new Aspect_DisplayConnection ());
else
SetDisplayConnection (new Aspect_DisplayConnection (aDisplayName));
-
#else
+ (void)theDisplayName; // avoid warning on unused argument
SetDisplayConnection (new Aspect_DisplayConnection ());
#endif
aGraphicDriver = new OpenGl_GraphicDriver();
MyCView.Orientation.ViewScaleZ = float (Z);
CustomIsModified =
- MyCView.Orientation.IsCustomMatrix != MyViewOrientation.IsCustomMatrix();
+ (MyCView.Orientation.IsCustomMatrix != MyViewOrientation.IsCustomMatrix());
MyCView.Orientation.IsCustomMatrix = MyViewOrientation.IsCustomMatrix();
if ( MyViewOrientation.IsCustomMatrix() ) {
Standard_Integer i, j;
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID XSStorageDriver ("ed8793f8-3142-11d4-b9b5-0060b0ee281b");
static Standard_GUID XSRetrievalDriver("ed8793f9-3142-11d4-b9b5-0060b0ee281b");
static Standard_GUID XCAFSchemaID ("ed8793fa-3142-11d4-b9b5-0060b0ee281b");
return StdDrivers::Factory (aGUID);
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
+
PLUGIN(XCAFDrivers)
//function : testDoc
//purpose : Method to test destruction of document
//=======================================================================
-static Standard_Integer testDoc (Draw_Interpretor& di,
+static Standard_Integer testDoc (Draw_Interpretor&,
Standard_Integer argc,
const char ** argv)
{
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID XmlStorageDriver ("03a56820-8269-11d5-aab2-0050044b1af1");
static Standard_GUID XmlRetrievalDriver("03a56822-8269-11d5-aab2-0050044b1af1");
return aTable;
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
+
// Declare entry point PLUGINFACTORY
PLUGIN(XmlDrivers)
#include <time.h>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID XmlLStorageDriver ("13a56820-8269-11d5-aab2-0050044b1af1");
static Standard_GUID XmlLRetrievalDriver("13a56822-8269-11d5-aab2-0050044b1af1");
#define CURRENT_DOCUMENT_VERSION 7
return aVersionStr;
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
+
// Declare entry point PLUGINFACTORY
PLUGIN(XmlLDrivers)
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID XmlStorageDriver ("f78ff4a0-a779-11d5-aab4-0050044b1af1");
static Standard_GUID XmlRetrievalDriver("f78ff4a1-a779-11d5-aab4-0050044b1af1");
aDriverTable -> AddDriver (new XmlTObjDrivers_IntSparseArrayDriver(anMsgDrv));
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
+
PLUGIN(XmlTObjDrivers)
#include <XmlDrivers.hxx>
#include <Plugin_Macro.hxx>
-// avoid warnings on 'extern "C"' functions returning C++ classes
-#ifdef WNT
-#pragma warning(4:4190)
-#endif
-
static Standard_GUID XSStorageDriver ("f78ff496-a779-11d5-aab4-0050044b1af1");
static Standard_GUID XSRetrievalDriver("f78ff497-a779-11d5-aab4-0050044b1af1");
return XmlDrivers::Factory (aGUID);
}
+#ifdef _MSC_VER
+#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */
+#endif
PLUGIN(XmlXCAFDrivers)