void BOPAlgo_Builder::BuildSplitFaces()
{
Standard_Boolean bHasFaceInfo, bIsClosed, bIsDegenerated, bToReverse;
- Standard_Integer i, j, aNbS, aNbPBIn, aNbPBOn, aNbPBSc, aNbAV, nSp;
+ Standard_Integer i, j, k, aNbS, aNbPBIn, aNbPBOn, aNbPBSc, aNbAV, nSp;
Standard_Boolean bRunParallel;
- Standard_Size aNbBF, k;
+ Standard_Size aNbBF;
TopoDS_Face aFF, aFSD;
TopoDS_Edge aSp, aEE;
TopAbs_Orientation anOriF, anOriE;
BOPAlgo_BuilderFaceCnt::Perform(bRunParallel, aVBF);
//===================================================
//
- for (k=0; k<aNbBF; ++k) {
+ for (k=0; k<(Standard_Integer)aNbBF; ++k) {
aLFIm.Clear();
//
BOPAlgo_BuilderFace& aBF=aVBF(k);
iBeg=aBR.begin();
iEnd=aBR.end();
for(i=iBeg; i!=iEnd; ++i) {
- BOPAlgo_BuilderFace& aBF=aVBF(i);
+ BOPAlgo_BuilderFace& aBF=aVBF((Standard_Integer)i);
//
aBF.Perform();
}
/* Complement du parametre courant (cf Hollerith sur +ieurs lignes) */
void iges_addparam (int longval, char* parval)
{
- char *newval, *oldval; int i;
- size_t long0;
+ char *newval, *oldval;
+ int i, long0;
if (longval <= 0) return;
oldval = curparam->parval;
- long0 = strlen(oldval);
+ long0 = (int)strlen(oldval);
/* newval = (char*) malloc(long0+longval+1); */
- newval = iges_newchar("",(int)long0+longval+1);
+ newval = iges_newchar("",long0+longval+1);
for (i = 0; i < long0; i ++) newval[i] = oldval[i];
for (i = 0; i < longval; i ++) newval[i+long0] = parval[i];
newval[long0+longval] = '\0';
return 0;
}
-static char sarr[2000];
-static int si=1;
-
#ifdef WNT
-static int StackOverflow(int i = -1)
+static int StackOverflow (int i = -1)
{
char arr[2000];
- if (si == 1) {
- si = 0;
- memcpy(arr,sarr,2000);
- arr[1999]=0;
- int n = (int)strlen(arr), s=0;
- while (n--)
- s += StackOverflow(i-1);
- return i + s + StackOverflow(i-1);
- }
- else if (i != 0) {
- return i + StackOverflow(i-1);
- }
- si = 1;
+ memset (arr, 0, sizeof(arr));
+ if (i < 0)
+ StackOverflow(i-1);
return i;
}
{
if (argc != 1)
{
- di << "Usage : " << argv[0] << "\n";
+ cout << "Usage : " << argv[0] << "\n";
return 1;
}
Standard_Boolean Succes;
{//==== Test Divide ByZero (Integer) ========================================
try{
OCC_CATCH_SIGNALS
+ cout << "(Integer) Divide By Zero..." << endl;
di << "(Integer) Divide By Zero...";
//cout.flush();
di << "\n";
{//==== Test Divide ByZero (Real) ===========================================
try{
OCC_CATCH_SIGNALS
+ cout << "(Real) Divide By Zero..." << endl;
di << "(Real) Divide By Zero...";
//cout.flush();
di << "\n";
{//==== Test Overflow (Integer) =============================================
try{
OCC_CATCH_SIGNALS
+ cout << "(Integer) Overflow..." << endl;
di << "(Integer) Overflow...";
//cout.flush();
di << "\n";
{//==== Test Overflow (Real) ================================================
try{
OCC_CATCH_SIGNALS
+ cout << "(Real) Overflow..." << endl;
di << "(Real) Overflow...";
//cout.flush();
di << "\n";
{//==== Test Underflow (Real) ===============================================
try{
OCC_CATCH_SIGNALS
+ cout << "(Real) Underflow" << endl; // to have message in log even if process crashed
di << "(Real) Underflow";
//cout.flush();
di << "\n";
{//==== Test Invalid Operation (Real) ===============================================
try{
OCC_CATCH_SIGNALS
+ cout << "(Real) Invalid Operation..." << endl;
di << "(Real) Invalid Operation...";
//cout.flush();
di << "\n";
{//==== Test Access Violation ===============================================
try {
OCC_CATCH_SIGNALS
+ cout << "Segmentation Fault..." << endl;
di << "Segmentation Fault...";
//cout.flush();
di << "\n";
{//==== Test Stack Overflow ===============================================
try {
OCC_CATCH_SIGNALS
+ cout << "Stack Overflow..." << endl;
di << "Stack Overflow...";
//cout.flush();
di << "\n";
return 0;
}
-//=======================================================================
-//function : readstep
-//purpose :
-//=======================================================================
-
-static Standard_Integer readstep (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** argv)
-{
-// On admet le controller AP214 ou une variante
-
-
- STEPControl_Reader sr;
-
- IFSelect_ReturnStatus readstat = IFSelect_RetVoid;
-
- readstat = sr.ReadFile (argv[1]);
-
- if (readstat != IFSelect_RetDone) {
-
- di<<"No model loaded"<<"\n";
- return 1;
- }
-
-
- Standard_Integer num = sr.NbRootsForTransfer();
- Standard_Integer modepri;
- di<<"NbRootsForTransfer="<<num<<" :\n";
-
- cout<<"Mode (0 End, 1 root n0 1, 2 one root/n0, 3 one entity/n0, 4 Selection) : "<<flush;
- cin>>modepri;
- if (modepri == 0) { di<<"End Reading STEP"<<"\n"; return 0; }
-
-
- if (!sr.TransferRoot (num)) di<<"Transfer root n0 "<<num<<" : no result"<<"\n";
- else {
- TopoDS_Shape sh = sr.OneShape();
- DBRep::Set (argv[2],sh);
- }
- cin>>modepri;
- return 0;
-}
-
// ######## COMMANDE steptrans : teste les transformations #########
//=======================================================================
//function : steptrans
theCommands.Add("steptrans", "steptrans shape stepax1 stepax2", __FILE__, steptrans, g);
theCommands.Add("countexpected","TEST", __FILE__, countexpected, g);
theCommands.Add("dumpassembly", "TEST", __FILE__, dumpassembly, g);
- theCommands.Add("readstep", "readstep [file]", __FILE__, readstep, g);
theCommands.Add("stepfileunits" , "stepfileunits name_file", __FILE__, stepfileunits, g);
}
# Incorrect faces of the filleted cube after import from iges file
#######################################################################
-readstep [locate_data_file bug22715_cube.stp] s1 *
+testreadstep [locate_data_file bug22715_cube.stp] s1
puts [whatis s1]
explode s1 F