default:
{
Standard_NoSuchObject::Raise("Adaptor3d_IsoCurve:Ellipse");
- return gp_Elips();
}
}
return GeomAbs_SurfaceOfExtrusion;
}
-
- // portage WNT
- return GeomAbs_SurfaceOfExtrusion;
}
//=======================================================================
Standard_Integer aNb[6] = {aVVs.Extent(), aVEs.Extent(), aEEs.Extent(),
aVFs.Extent(), aEFs.Extent(), aFFs.Extent()};
//
- Standard_Integer ind = 0;
for (Standard_Integer aTypeInt = 0; aTypeInt < 6; ++aTypeInt) {
for (Standard_Integer i = 0; i < aNb[aTypeInt]; ++i) {
BOPDS_Interf* aInt = (aTypeInt==0) ? (BOPDS_Interf*)(&aVVs(i)) :
myShapesToAvoid.Clear();
//
iCnt=0;
- while (1) {
+ for(;;) {
++iCnt;
bFound=Standard_False;
//
myShapesToAvoid.Clear();
//
iCnt=0;
- while (1) {
+ for(;;) {
++iCnt;
bFound=Standard_False;
//
if (!myShapesToAvoid.Contains(aF)) {
BOPTools::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
}
- else {
- int a=0;
- }
}
aNbE=aMEF.Extent();
//
aMVAdd.Clear();
//
aMVP.Add(nV);
- while(1) {
+ for(;;) {
aNbVP=aMVP.Extent();
for (j=1; j<=aNbVP; ++j) {
const TopoDS_Shape& nVP=aMVP(j);
BOPCol_MapIteratorOfMapOfInteger aIt1;
//
aMIP.Add(i);
- while(1) {
+ for(;;) {
aNbIP=aMIP.Extent();
aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) {
for (j=0; j<aNbC; ++j) {
BOPDS_Curve& aNC=aVC.ChangeValue(j);
const IntTools_Curve& aIC=aNC.Curve();
- // DEBf
- const Handle(Geom_Curve)& aC3D=aIC.Curve();
// DEBt
aNC.InitPaveBlock1();
//
if (aSI.ShapeType()!=TopAbs_FACE) {
continue;
}
- //
- const TopoDS_Face& aF=(*(TopoDS_Face*)(&aSI.Shape()));
- //
if(!myDS->HasFaceInfo(i)) {
continue;
}
aMVAdd.Clear();
//
aMVP.Add(nV);
- while(1) {
+ for(;;) {
aNbVP=aMVP.Extent();
for (j=1; j<=aNbVP; ++j) {
nVP=aMVP(j);
aMVAdd.Clear();
//
aMVP.Add(nV);
- while(1) {
+ for(;;) {
aNbVP=aMVP.Extent();
for (j=1; j<=aNbVP; ++j) {
const Handle(BOPDS_PaveBlock)& nVP=aMVP(j);
//
aMVP.Add(aV);
//
- while(1) {
+ for(;;) {
aNbVP=aMVP.Extent();
for (k=1; k<=aNbVP; ++k) {
const TopoDS_Shape& aVP=aMVP(k);
BOPCol_PMemBlock pBlock, pNext;
//
pBlock=myPBlock1;
- while(1) {
+ for(;;) {
pNext=pBlock->myNext;
if(!pNext) {
myPBlock=pBlock;
BOPCol_PMemBlock pBlock, pNext;
//
pBlock=myPBlock1;
- while(1) {
+ for(;;) {
pNext=pBlock->myNext;
if(!pNext) {
myPBlock=pBlock;
}
//
const BOPCol_MapOfInteger& aMVIn1=aFI1.VerticesIn();
- aIt.Initialize(aMVOn1);
+ aIt.Initialize(aMVIn1);
for (; aIt.More(); aIt.Next()) {
nV=aIt.Value();
aMI.Add(nV);
}
//
const BOPCol_MapOfInteger& aMVIn2=aFI2.VerticesIn();
- aIt.Initialize(aMVOn1);
+ aIt.Initialize(aMVIn2);
for (; aIt.More(); aIt.Next()) {
nV=aIt.Value();
aMI.Add(nV);
i=aIt2.Value();
//
const BOPDS_ShapeInfo& aSI=myDS->ShapeInfo(i);
- const TopoDS_Shape& aSi=aSI.Shape();
const Bnd_Box& aBoxEx=aSI.Box();
//
aSelector.Clear();
aMAdd.Clear();
aMAdd.Add(aF1);
//
- while(1) {
+ for(;;) {
aMAdd1.Clear();
//
aNbAdd = aMAdd.Extent();
const TopoDS_Shape& aF1=theLFIn.First();
aMAdd.Add(aF1);
//
- while(1) {
+ for(;;) {
aMAdd1.Clear();
aNbAdd = aMAdd.Extent();
for (i=1; i<=aNbAdd; ++i) {
TopoDS_Iterator aItC;
//
aLC.Append (theC1);
- while(1) {
+ for(;;) {
aLC1.Clear();
aIt.Initialize(aLC);
for (; aIt.More(); aIt.Next()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
if (!GC.IsNull()) {
if (GC->IsCurve3D()) {
-#ifdef DEB
- const Handle(Geom_Curve)& Crv =
-#endif
- GC->Curve3D();
// if (!C.IsNull()) { //xpu031198, edge degeneree
// xpu151298 : parameters can be setted for null curves
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
if (!GC.IsNull()) {
if (GC->IsCurve3D()) {
-#ifdef DEB
- const Handle(Geom_Curve)& Crv =
-#endif
- GC->Curve3D();
// if (!C.IsNull()) { //xpu031198, edge degeneree
// xpu151298 : parameters can be setted for null curves
}
}
#endif
-
//------------------------------------------------
// Cut edges
//------------------------------------------------
TopTools_MapOfShape Done;
for (Mapit.Initialize(MVE); Mapit.More();Mapit.Next()) {
for (itl.Initialize(Mapit.Value()); itl.More(); itl.Next()) {
- TopoDS_Edge& E = TopoDS::Edge(itl.Value());
- if (Done.Add(E)) {
- sprintf(name,"EEC_%d_%d",NbLoops,NbEdges++);
- DBRep::Set(name,E);
- }
+ TopoDS_Edge& E = TopoDS::Edge(itl.Value());
+ if (Done.Add(E)) {
+ sprintf(name,"EEC_%d_%d",NbLoops,NbEdges++);
+ DBRep::Set(name,E);
+ }
}
}
}
UsedEdges.Add(CE);
if (!MVE.IsBound(CV) || MVE(CV).IsEmpty()) {
- End = Standard_True;
+ End = Standard_True;
}
else {
- End = !SelectEdge(myFace,CE,CV,NE,MVE(CV));
- if (!End) {
- CE = NE;
- if (MVE(CV).IsEmpty()) MVE.UnBind(CV);
- }
+ End = !SelectEdge(myFace,CE,CV,NE,MVE(CV));
+ if (!End) {
+ CE = NE;
+ if (MVE(CV).IsEmpty()) MVE.UnBind(CV);
+ }
}
}
//--------------------------------------------------
TopExp_Explorer explo( NW, TopAbs_VERTEX );
for (; explo.More(); explo.Next())
{
- const TopoDS_Vertex& aV = TopoDS::Vertex( explo.Current() );
- Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &(aV).TShape());
- TV->Tolerance( Tol );
- TV->Modified( Standard_True );
+ const TopoDS_Vertex& aV = TopoDS::Vertex( explo.Current() );
+ Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &(aV).TShape());
+ TV->Tolerance( Tol );
+ TV->Modified( Standard_True );
}
for (explo.Init( NW, TopAbs_EDGE ); explo.More(); explo.Next())
{
- const TopoDS_Edge& aE = TopoDS::Edge( explo.Current() );
- Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &(aE).TShape());
- TE->Tolerance( Tol );
- TE->Modified( Standard_True );
+ const TopoDS_Edge& aE = TopoDS::Edge( explo.Current() );
+ Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &(aE).TShape());
+ TE->Tolerance( Tol );
+ TE->Modified( Standard_True );
}
if (VF.IsSame(CV) && SamePnt2d(VF,EF,CE,myFace))
myNewWires.Append (NW);
- else {
#ifdef DEB
+ else {
cout <<"BRepAlgo_Loop: Open Wire"<<endl;
if (AffichLoop)
- cout << "OpenWire is : NW_"<<NbLoops<<"_"<<NbWires<<endl;
+ cout << "OpenWire is : NW_"<<NbLoops<<"_"<<NbWires<<endl;
+ }
#endif
- }
#ifdef DRAW
if (AffichLoop) {
sprintf(name,"NW_%d_%d",NbLoops,NbWires++);
{
TopoDS_Shape aLocalE = E.Oriented(TopAbs_FORWARD);
TopoDS_Edge WE = TopoDS::Edge(aLocalE);
-// TopoDS_Edge WE = TopoDS::Edge(E.Oriented(TopAbs_FORWARD));
Standard_Real U1,U2;
TopoDS_Vertex V1,V2;
TopTools_ListIteratorOfListOfShape itl(MG(OS));
Standard_Integer IV = 1;
for (; itl.More(); itl.Next()) {
- const TopoDS_Shape& NS = itl.Value();
sprintf(name, "SV_%d_%d",IK,IV++);
#ifdef DRAW
DBRep::Set(name,NS);
Standard_Integer NbPointsOK=0;
Standard_Integer NbFacesInSolid=0;
- do {
+ for(;;) {
myFirstFace++;
faceexplorer.Init(myShape,TopAbs_FACE);
// look for point on face starting from myFirstFace
else { myParamOnEdge*=0.5; }
- } //-- do { ... }
- while(1);
+ } //-- for(;;) { ... }
return 0;
}
// On projette sur CC
extpc.Perform(pone);
if (extpc.IsDone() && extpc.NbExt() >= 1) {
- Standard_Real Dist2Min = extpc.SquareDistance(1);
- Standard_Integer kmin = 1;
- for (Standard_Integer k=2; k<=extpc.NbExt(); k++) {
- Standard_Real Dist2 = extpc.SquareDistance(k);
- if (Dist2 < Dist2Min) {
- Dist2Min = Dist2;
- kmin = k;
- }
- }
- nbp++;
-#ifdef DEB
- Standard_Real prmp = extpc.Point(kmin).Parameter();
-#else
- extpc.Point(kmin).Parameter();
-#endif
+ Standard_Real Dist2Min = extpc.SquareDistance(1);
+ Standard_Integer kmin = 1;
+ for (Standard_Integer k=2; k<=extpc.NbExt(); k++) {
+ Standard_Real Dist2 = extpc.SquareDistance(k);
+ if (Dist2 < Dist2Min) {
+ Dist2Min = Dist2;
+ kmin = k;
+ }
+ }
+ nbp++;
}
}
}
for (exp.Init(theB,TopAbs_EDGE); exp.More(); exp.Next()) {
if (!theMap.IsBound(exp.Current())) {
-#ifdef DEB
- const TopoDS_Edge& e =
-#endif
- TopoDS::Edge(exp.Current());
TopTools_ListOfShape thelist2;
theMap.Bind(exp.Current(), thelist2);
theMap(exp.Current()) = theP.Shapes(exp.Current());
for (exp.Init(theB,TopAbs_EDGE); exp.More(); exp.Next()) {
if (!theMap.IsBound(exp.Current())) {
-#ifdef DEB
- const TopoDS_Edge& e =
-#endif
- TopoDS::Edge(exp.Current());
TopTools_ListOfShape thelist2;
theMap.Bind(exp.Current(), thelist2);
theMap(exp.Current()) = theP.Shapes(exp.Current());
// extremity of the first wire
V1 = TopoDS::Vertex(SeqV.Value(1));
- // previous wire
-#ifdef DEB
- const TopoDS_Wire& wire2 =
-#endif
- TopoDS::Wire(myWork(i-1));
// loop on vertices of wire1
for (ii=1;ii<=SeqV.Length();ii++) {
Handle(Geom_Curve) G3d = BRep_Tool::Curve(TopoDS::Edge(anE),f,l);
GeomAdaptor_Curve AC(G3d,f,l);
- Standard_Boolean dummy = PerformCurve(Parameters, Points,
- AC, aDefl, f, l, Precision::Confusion(),
- 2);
+ PerformCurve(Parameters, Points, AC, aDefl, f,
+ l, Precision::Confusion(), 2);
Standard_Integer NPnts = Points.Length();
if(NPnts > 2) {
const BOPDS_PDS& theDS,
TopTools_DataMapOfShapeListOfShape& theHistMap) {
- const BOPDS_VectorOfInterfVE& aVEs = theDS->InterfVE();
const BOPDS_VectorOfInterfVV& aVVs = theDS->InterfVV();
BRep_Builder aBB;
Standard_Integer i = 0,j;
// iterate on the surfaces of the first edge
- while ( Standard_True) {
+ for(;;) {
i++;
BRep_Tool::CurveOnSurface(E,PC,mySurface,myLocation,f,l,i);
if (mySurface.IsNull()) {
for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
if (!E.IsSame(ex.Current())) {
j = 0;
- while (Standard_True) {
+ for(;;) {
j++;
BRep_Tool::CurveOnSurface(TopoDS::Edge(ex.Current()),
PPC,SS,L,ff,ll,j);
GetTriangle( anElemId ).Edges( e[0], e[1], e[2],
o[0], o[1], o[2] );
- Standard_Boolean isFind = Standard_False;
for ( Standard_Integer anIndex = 0; anIndex < 3; ++anIndex )
{
if ( e[anIndex] == anMainEdgeId && o[anIndex] == anIsForward )
return;
Standard_Integer aDeadEdgeId = Abs( aPolygon.Last() );
- const BRepMesh_Edge& aDeadEdge = GetEdge( aDeadEdgeId );
aDealLinks.Add( aDeadEdgeId );
//=======================================================================
Standard_Integer BRepMesh_VertexTool::FindIndex(const BRepMesh_Vertex& theVertex)
{
- mySelector.SetCurrent(theVertex.Coord());
+ mySelector.SetCurrent(theVertex.Coord(), Standard_False);
myCellFilter.Inspect (theVertex.Coord(), mySelector);
return mySelector.GetCoincidentInd();
}
static void DEBVerticesControl (const TopTools_IndexedMapOfShape& NewEdges,
Handle(BRepAlgo_AsDes) AsDes)
{
- Standard_Integer NVP = 0;
- Standard_Integer NVM = 0;
- Standard_Integer NVN = 0;
-
TopTools_ListOfShape LVP;
- //TopTools_MapIteratorOfMapOfShape it;
TopTools_ListIteratorOfListOfShape it1LE ;
TopTools_ListIteratorOfListOfShape it2LE ;
- //for (it.Initialize(NewEdges) ; it.More(); it.Next()) {
Standard_Integer i;
for (i = 1; i <= NewEdges.Extent(); i++) {
const TopoDS_Edge& NE = TopoDS::Edge(NewEdges(i));
#endif
Standard_Integer NbEdges = 1;
for (it.Initialize(LEdge); it.More(); it.Next()) {
- const TopoDS_Edge& CurE = TopoDS::Edge(it.Value());
sprintf(name,"EOnSph_%d_%d",NbOFFSET,NbEdges++);
#ifdef DRAW
DBRep::Set(name, CurE);
E2 = TopoDS::Edge(myPaths((j<=NbPaths)? j : 1)(i));
TopoDS_Edge E12 = TopoDS::Edge(SectionsEdges(i)(j-1));
- //TopoDS_Vertex PrevVertex = TopoDS::Vertex(VerSeq(j-1));
- //TopoDS_Vertex CurVertex = TopoDS::Vertex(VerSeq(j));
TopoDS_Vertex PrevVertex = (E1.IsNull())? TopoDS::Vertex(myPaths(j-1)(i))
: TopExp::LastVertex(E1, Standard_True);
TopoDS_Vertex CurVertex = (E2.IsNull())? TopoDS::Vertex(myPaths((j<=NbPaths)? j : 1)(i))
TopoDS_Edge ProperEdge;
const TopTools_ListOfShape& LE = VEmap.FindFromKey(PrevVertex);
- //Temporary
- Standard_Integer LenList = LE.Extent();
- ///////////
+
for (itl.Initialize(LE); itl.More(); itl.Next())
{
anEdge = TopoDS::Edge(itl.Value());
BRepLib::BuildCurve3d(NewEdge2);
Standard_Boolean good_ne = IsValidEdge(NewEdge, theFace);
Standard_Boolean good_ne1 = IsValidEdge(NewEdge1, theFace);
- Standard_Boolean good_ne2 = IsValidEdge(NewEdge2, theFace);
GeomAbs_CurveType type_E1 = TypeOfEdge(E1);
GeomAbs_CurveType type_E2 = TypeOfEdge(E2);
aFind.Perform();
aFind.Dump();
- for (i=1; i<=aFind.NbContigousEdges(); i++) {
-#ifdef DEB
- const TopoDS_Edge& edge =
-#endif
- aFind.ContigousEdge(i);
- const TopTools_ListOfShape& list = aFind.ContigousEdgeCouple(i);
- const TopoDS_Edge& sec1 = TopoDS::Edge(list.First());
- const TopoDS_Edge& sec2 = TopoDS::Edge(list.Last());
-#ifdef DEB
- const TopoDS_Edge& bound1 =
-#endif
- aFind.SectionToBoundary(sec1);
-#ifdef DEB
- const TopoDS_Edge& bound2 =
-#endif
- aFind.SectionToBoundary(sec2);
- }
-
return 0;
}
TopTools_MapOfShape& TouchedByCork)
{
// currently nothing is done !!
- if ( Standard_True) {
+ /*if ( Standard_True) {
return;
}
else {
else if (StopFaces.Contains(L.Last()))
TouchedByCork.Add(L.First());
}
- }
+ }*/
+ return;
}
//=======================================================================
{
// Get 3 coordinate axes of the plane.
const gp_Dir &aNorm = aPlane.Axis().Direction();
- const gp_Dir &aXDir = aPlane.XAxis().Direction();
- const gp_Dir &aYDir = aPlane.YAxis().Direction();
const Standard_Real anAngularTol = RealEpsilon();
// Get location of the plane as its barycenter
// At this stage :
// classic intersections have failed, the path is approached in vain.
// Standard_Real Step = 0.1;
- while(1) {
+ for(;;) {
//Attention the parameters of arrow for the path and
//the tolerance for the approximation can't be taken as those of the
//Builder, so they are reestimated as much as possible.
Standard_Real aDelta = VLast - VFirst;
Standard_Integer aDenom = 2;
- while (Standard_True) {
+ for(;;) {
Standard_Real aDeltav = aDelta/aDenom;
Standard_Real aParam = VFirst + aDeltav;
gp_Pnt2d PUV = PCurveOnFace->Value(aParam);
}
for(Standard_Integer i = A->Lower(); i<=A->Upper(); i++){
- const TCollection_ExtendedString& anExtendedString = A->Value(i);
TCollection_AsciiString anAsciiString(A->Value(i),'?');
di << anAsciiString.ToCString();
if(i<A->Upper())
TDF_Label label;
DDF::AddLabel(DF, arg[2], label);
- Standard_Integer isDelta = Draw::Atoi(arg[3]);
Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
di << "Array of Standard_Boolean with bounds from = " << From << " to = " << To << "\n";
Handle(TDataStd_BooleanArray) A = TDataStd_BooleanArray::Set(label, From, To);
realarray->SetValue(j, M_PI * j);
}
- // Getting length of array
-
- Standard_Integer length = realarray->Length();
-
// Retrieving value by index
Standard_Real value = realarray->Value(3);
Handle(TDataStd_Real) valOfdistance = constraint->GetValue();
- Standard_Real distance = valOfdistance->Get();
}
// Setting PARALLEL constraint between NS1 and NS2
if(!aCheck.IsValid(theMkOpe.Shape()))
aResIsValid = FixSameParameter(theMkOpe.Shape(), aCheck);
if (aResIsValid) {
- const TDF_Label& aResultLabel = RESPOSITION(theFunction);
if(theFunction->GetDriverGUID() == FUSE_GUID) {
LoadNamingDS(RESPOSITION(theFunction), theMkOpe);
}
//Presentation of the attribute is erased
//from viewer and removed from AIS_InteractiveContext
- //Checking if attribute is displayed in viewer
-
- if( ShapeLabel.FindAttribute(TPrsStd_AISPresentation::GetID(), PRS) )
- Standard_Boolean isDisplayed = PRS->IsDisplayed();
-
-
Handle(TPrsStd_AISPresentation) P;
if( ShapeLabel.FindAttribute(TPrsStd_AISPresentation::GetID(), P) ) {
static unsigned int __stdcall CpuFunc (void * param)
{
clock_t aCurrent;
- while (1)
+ for(;;)
{
Sleep (5);
Standard_Real anUserSeconds, aSystemSeconds;
{
Standard_Real x = ParseValue(name);
- while (1) {
+ for(;;) {
char c = *name;
if (c == '\0') return x;
name++;
{
Standard_Real x = ParseFactor(name);
- while (1) {
+ for(;;) {
char c = *name;
if (c == '\0') return x;
name++;
HDC hDC = GetDC(win);
HDC aWorkDC = myUseBuffer ? GetMemDC(hDC) : hDC;
- int debug = GetROP2(aWorkDC);
SaveDC(aWorkDC);
SelectObject(aWorkDC,GetStockObject(BLACK_PEN));
Rectangle(aWorkDC, 0, 0, WidthWin(), HeightWin());
{
if (!Draw_IsConsoleSubsystem) return 1;
- while (1) {
+ for(;;) {
while (console_semaphore != WAIT_CONSOLE_COMMAND)
Sleep(100);
//if (gets(console_command))
{
myP = P;
myS = (Adaptor3d_SurfacePtr)&S;
- GeomAbs_SurfaceType aSType = S.GetType();
myPinit = Standard_True;
mySinit = Standard_True;
}
void Extrema_FuncExtPS::Initialize(const Adaptor3d_Surface& S)
{
myS = (Adaptor3d_SurfacePtr)&S;
- GeomAbs_SurfaceType aSType = S.GetType();
mySinit = Standard_True;
myPoint.Clear();
mySqDist.Clear();
{
Handle(TColStd_HArray1OfReal) anArrKnots;
Standard_Integer aDegree = 0;
- GeomAbs_CurveType aType = theSurf.BasisCurve()->Curve().GetType();
if(theSurf.BasisCurve()->Curve().GetType() == GeomAbs_BSplineCurve)
{
Handle(Geom_BSplineCurve) aBspl = theSurf.BasisCurve()->Curve().BSpline();
math_Vector errors(1,2);
math_Vector root(1, 2);
- Standard_Real eps = 1.e-9;
- Standard_Integer nbsubsample = 11;
Standard_Integer aNbMaxIter = 100;
gp_Pnt PStart = theParams.Value();
- Standard_Real DistStart = theParams.GetSqrDistance();
- Standard_Real DistSol = DistStart;
math_FunctionSetRoot S (myF,UV,Tol,UVinf,UVsup, aNbMaxIter);
Bnd_SphereUBTreeSelectorMin aSelector(mySphereArray, aSol);
//aSelector.SetMaxDist( RealLast() );
aSelector.DefineCheckPoint( P );
- Standard_Integer aNbSel = mySphereUBTree->Select( aSelector );
+ mySphereUBTree->Select( aSelector );
//TODO: check if no solution in binary tree
Bnd_Sphere& aSph = aSelector.Sphere();
Standard_Real aU = myUParams->Value(aSph.U());
Bnd_SphereUBTreeSelectorMax aSelector(mySphereArray, aSol);
//aSelector.SetMaxDist( RealLast() );
aSelector.DefineCheckPoint( P );
- Standard_Integer aNbSel = mySphereUBTree->Select( aSelector );
+ mySphereUBTree->Select( aSelector );
//TODO: check if no solution in binary tree
Bnd_Sphere& aSph = aSelector.Sphere();
Standard_Real aU = myUParams->Value(aSph.U());
Standard_Real aV = myVParams->Value(aSph.V());
Extrema_POnSurfParams aParams(aU, aV, myS->Value(aU, aV));
-
aParams.SetSqrDistance(P.SquareDistance(aParams.Value()));
aParams.SetIndices(aSph.U(), aSph.V());
void FSD_CmpFile::ReadWord(TCollection_AsciiString& buffer)
{
- char c;
+ char c = '\0';
char b[8193],*tmpb;
Standard_Boolean IsEnd = Standard_False;
Standard_Integer i;
}
default: return -1;
}
- return -1;
}
void FSD_File::ReadWord(TCollection_AsciiString& buffer)
{
- char c;
+ char c = '\0';
char b[8193],*tmpb;
Standard_Boolean IsEnd = Standard_False;
Standard_Integer i;
}
default: return -1;
}
- return -1;
}
default:
return Standard_False;
}
- return Standard_False;
}
//==============================================================================
Handle(Geom_TrimmedCurve) curvTrim;
Handle(Geom_BSplineCurve) curvBS, curvBS1;
Handle(Geom_Curve) curv = mySections(1);
- Standard_Real first = curv->FirstParameter(),
- last = curv->LastParameter();
for (j=jdeb; j<=jfin; j++) {
theUfMax = 0.;
theUlMax = 0.;
theImax = 0;
- Standard_Real ufmax = 0., ulmax = 0.;
//take knots
Standard_Integer nbp = thePnts->NbKnots();
B.Add(NF,W); // add the new wire in the new face.
}
//}
-
-
- TopTools_ListOfShape& IntL = myDS.AddIntL(F);
+ myDS.AddIntL(F);
TopTools_ListOfShape& OutL = myDS.AddOutL(F);
if (myDS.FaceHasIntL(F)) { // get the InternalOutLines on face F
// read mode : lire les lignes
// On charge le fichier dans "thelist"
Standard_Boolean header = Standard_False;
- while (1) {
+ for(;;) {
ligne[0] = '\0';
fgets(ligne,200,lefic);
if (feof(lefic)) break;
if (lefic == NULL) return -1; /* fichier pas pu etre ouvert */
for (i = 1; i < 6; i++) lesect[i] = 0;
for (j = 0; j < 100; j++) ligne[j] = 0;
- while (1) {
+ for(;;) {
numl ++;
i = iges_lire(lefic,&numsec,ligne,modefnes);
if (i <= 0) {
default:
return(gp_Pnt(0.0,0.0,0.0));
}
- return(gp_Pnt(0.0,0.0,0.0));
}
//
gp_Pnt P1 = aline->Value(U), P2, P3;
gp_Vec V13, V12, V23;
Standard_Real dU = DU/2.0, curvDef, angDef, m1, m2, m3;
- do{ //According to class TangentialDeflection from GCPnts
+ for(;;) { //According to class TangentialDeflection from GCPnts
P2=aline->Value(U+dU); P3=aline->Value(U+DU);
V13 = P3.XYZ().Subtracted(P1.XYZ()); m1 = V13.Magnitude();
V12 = P2.XYZ().Subtracted(P1.XYZ()); m2 = V12.Magnitude();
angDef = Abs(V13.Angle(V23));
if(curvDef < CurvDef && angDef < AngDef) break;
DU = dU; dU /= 2.0;
- }while(1);
+ }
return P3;
}
//=======================================================================
done = Standard_True;
SLin.Clear();
- Standard_Real Deflection2 = Deflection*Deflection;
Standard_Integer nbLigSec = Interference.NbSectionLines();
Standard_Integer nbTanZon = Interference.NbTangentZones();
if(U2<UminLig2) UminLig2=U2;
if(V2<VminLig2) VminLig2=V2;
}
-
- Standard_Real Deflection2 = Deflection*Deflection;
Standard_Real SeuildPointLigne = 15.0 * Increment * Increment;
- Standard_Integer NbPntOn2SOnLine = 0, NbLigCalculee = 0, ver;
+ Standard_Integer NbLigCalculee = 0, ver;
Standard_Real pu1,pu2,pv1,pv2, dminiPointLigne;
Standard_Boolean HasStartPoint,RejetLigne;
IntSurf_PntOn2S StartPOn2S;
return;
}
- Standard_Real Deflection2 = Deflection*Deflection;
Standard_Integer nbLigSec = Interference.NbSectionLines();
Standard_Integer nbTanZon = Interference.NbTangentZones();
Standard_Real SeuildPointLigne = 15.0 * Increment * Increment;
- Standard_Integer NbPntOn2SOnLine = 0, NbLigCalculee = 0, ver;
+ Standard_Integer NbLigCalculee = 0, ver;
Standard_Real U1,U2,V1,V2, pu1,pu2,pv1,pv2, incidence, dminiPointLigne;
Standard_Boolean HasStartPoint,RejetLigne;
IntSurf_PntOn2S StartPOn2S;
empt = Standard_True;
done = Standard_True;
SLin.Clear();
- Standard_Real Deflection2 = Deflection*Deflection;
Standard_Integer NbLigCalculee = 0;
Standard_Real U1,U2,V1,V2;
Standard_Real u0, u1, v0, v1, aU, aV, dU, dV;
//
const Handle(Adaptor3d_HSurface&) MaSurface=(SurfID==1)? MaSurface1 : MaSurface2;
- IntPolyh_ArrayOfPoints &TPoints=(SurfID==1)? TPoints1:TPoints2;
NbSamplesU=(SurfID==1)? NbSamplesU1:NbSamplesU2;
NbSamplesV=(SurfID==1)? NbSamplesV1:NbSamplesV2;
//
Standard_Integer NbSamplesU, NbSamplesV, i, aNbSamplesU1, aNbSamplesV1;
Standard_Real u0, u1, v0, v1, aU, aV, dU, dV;
const Handle(Adaptor3d_HSurface)& MaSurface=(SurfID==1)? MaSurface1 : MaSurface2;
- IntPolyh_ArrayOfPoints &TPoints=(SurfID==1)? TPoints1:TPoints2;
NbSamplesU=(SurfID==1)? NbSamplesU1:NbSamplesU2;
NbSamplesV=(SurfID==1)? NbSamplesV1:NbSamplesV2;
return iErr;
}
//
- while(1) {
+ for(;;) {
if (aYP>aYL) {
aA=aXL;
aXL=aXP;
aTolang2=1.e-16;
aLin=myCurve.Line();
const gp_Dir& aDirL=aLin.Direction();
- const gp_Pnt& aLocL=aLin.Location();
//
aCos=aDirC.Dot(aDirL);
if(aCos >= 0.) {
Standard_Integer step = 1, stepcheck = 1000, steplimit = 100000;
Standard_Real value = (IP==1) ? DistanceFunction(0.5*(a+b)) : DerivativeFunction(0.5*(a+b));
- while (1) {
+ for(;;) {
x0=.5*(a+b);
if (IP==1)
return;
}
//
- while(1) {
+ for(;;) {
iTrimmed=0;
iOffset=0;
aCT3D=Handle(Geom_TrimmedCurve)::DownCast(aC3DB);
return;
}
//
- while(1) {
+ for(;;) {
if (fabs(aA-aB)<aEps) {
aX=0.5*(aA+aB);
aF=Distance(aX);
anIsProj1=ff1;
anIsProj2=ff2;
- while (1) {
+ for(;;) {
if (fabs(t1-t2) < aEpsT) {
tRoot=(anIsProj1) ? t1 : t2;
return;
a=tA; b=tB; r=fA;
- while (1) {
+ for(;;) {
x0=.5*(a+b);
if (IP==1)
yl=coeff*DistanceFunction(xl);
- while (1) {
+ for(;;) {
if (fabs(b-a) < myEpsT) {
return .5*(b+a);
}//if (IsVPer) {
}
- while (1) {
+ for(;;) {
dedans = 1;
gp_Pnt2d Puv(u,v);
aF2=MaxSquareDistance(aX2,
aC3D, aC2D1, aC2D2, myHS1, myHS2, myFace1, myFace2, myContext);
//
- while(1) {
+ for(;;) {
//
if (fabs(aA-aB)<aEps) {
aX=0.5*(aA+aB);
Standard_Boolean isHeader = Standard_False;
Standard_Boolean isDoctype = Standard_False;
- while (1) {
+ for(;;) {
LDOM_XmlReader::RecordType aType = ReadRecord (*myReader, myCurrentData);
switch (aType) {
case LDOM_XmlReader::XML_HEADER:
Standard_Boolean isError = Standard_False;
const LDOM_BasicElement * aParent = &myReader->GetElement();
const LDOM_BasicNode * aLastChild = NULL;
- while (1) {
+ for(;;) {
LDOM_Node::NodeType aLocType;
LDOMBasicString aTextValue;
char *aTextStr;
char * aSrcPtr = theSrc, * aDstPtr = theSrc;
Standard_Integer anIncrCount = 0;
- while (1) {
+ for(;;) {
char * aPtr = strchr (aSrcPtr, '&');
if (aPtr == NULL) {
// End of the loop
char * aDest = (char *) theSrc;
Standard_Integer aCount = 0;
// Analyse if there is a non-standard character in the string
- while (1) {
+ for(;;) {
const unsigned int iSrc =
(const unsigned int) * (const unsigned char *) ptrSrc;
if (iSrc == 0) {
if (myLastChild == NULL) {
const LDOM_BasicNode * aNode = anElem.GetFirstChild();
if (aNode && aNode -> getNodeType () != LDOM_Node::ATTRIBUTE_NODE)
- while (1) {
+ for(;;) {
const LDOM_BasicNode * aSibling = aNode -> GetSibling();
if (aSibling == NULL)
return LDOMString ();
if (myLastChild == NULL) {
const LDOM_BasicNode * aNode = anElem.GetFirstChild();
if (aNode && aNode -> getNodeType () != LDOM_Node::ATTRIBUTE_NODE)
- while (1) {
+ for(;;) {
const LDOM_BasicNode * aSibling = aNode -> GetSibling();
if (aSibling == NULL)
return LDOM_Attr ();
LDOMBasicString anAttrName, anAttrValue;
char anAttDelimiter = '\0';
- while (1) {
+ for(;;) {
// Check if the current file buffer is exhausted
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// There should always be some bytes available in the buffer for analysis
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
case STATE_COMMENT:
aPtr = aStartData;
- while (1) {
+ for(;;) {
aPtr = (const char *) memchr (aPtr, '-', (myEndPtr - 2) - aPtr);
if (aPtr == NULL) break;
if (aPtr[1] != '-') ++ aPtr;
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
case STATE_CDATA:
aPtr = aStartData;
- while (1) {
+ for(;;) {
aPtr = (const char *) memchr (aPtr, ']', (myEndPtr - 1) - aStartData);
if (aPtr == NULL) break;
if (aPtr[1] != ']') { // ERROR
const char *& aNameEnd)
{
Standard_Boolean aResult;
- int aCh = aString[0];
+ char aCh = aString[0];
if (IsAlphabetic(aCh) || aCh == '_' || aCh == ':') {
const char * aPtr = &aString[1];
while (aPtr < aStringEnd) {
// Skip whitespaces in the beginning of the string
aPtr = anEndPtr;
aLeftSpaces = 0;
- while (1)
+ for (;;)
{
_Char aChar = * aPtr;
if (aChar == ' ') aLeftSpaces++;
#define IMEM_FREE(p_bl) (size_t(p_bl->p_end_block - p_bl->p_free_space))
+ // auxiliary dummy function used to get a place where break point can be set
+ inline void place_for_breakpoint() {}
};
#define MaxLookup 16
IS_DEBUG = theDebug;
}
+#ifdef DEB
+
//=======================================================================
/**
* Static value of the current allocation ID. It provides unique
aMutex.Lock();
StorageIDMap().Bind(theAlloc, ++CurrentID);
StorageIDSet().Add(CurrentID);
- aMutex.Unlock();
if (CurrentID == CATCH_ID)
- {
- // Place for break point for creation of investigated allocator
- int a = 1;
- }
+ place_for_breakpoint();
+ aMutex.Unlock();
}
//=======================================================================
aMutex.Unlock();
}
+#endif /* DEB */
+
//=======================================================================
//function : IncAllocator_PrintAlive
//purpose : Outputs the alive numbers to the file inc_alive.d
// Suppress "e+00" and unsignificant 0's
- if ((p = strchr(aString,'e'))) {
+ p = strchr(aString,'e');
+ if (p) {
if (!strcmp(p,"e+00"))
*p = 0 ;
for (q = p-1 ; *q == '0' ; q--) ;
OSD_DirectoryIterator::OSD_DirectoryIterator() {}
void OSD_DirectoryIterator::Initialize(
- const OSD_Path& where,
- const TCollection_AsciiString& Mask){}
+ const OSD_Path& /*where*/,
+ const TCollection_AsciiString& /*Mask*/){}
#endif
} // end OSD_Disk :: DiskQuota
-void OSD_Disk :: SetDiskQuota ( const Standard_Integer QuotaSize ) {
+void OSD_Disk :: SetDiskQuota ( const Standard_Integer /*QuotaSize*/ ) {
SetLastError ( ( DWORD )STG_E_UNIMPLEMENTEDFUNCTION );
// Open a file
// ---------------------------------------------------------------------
-void OSD_File :: Open (
- const OSD_OpenMode Mode, const OSD_Protection& Protect
- ) {
+void OSD_File :: Open (const OSD_OpenMode Mode, const OSD_Protection& /*Protect*/)
+{
TCollection_AsciiString fName;
const Standard_Integer Offset, const OSD_FromWhere Whence
) {
- DWORD dwMoveMethod;
+ DWORD dwMoveMethod = 0;
TEST_RAISE( TEXT( "Seek" ) );
PTOKEN_OWNER pTkOwner = NULL;
PTOKEN_GROUPS pTkGroups = NULL;
PTOKEN_PRIMARY_GROUP pTkPrimaryGroup = NULL;
- PSECURITY_DESCRIPTOR retVal;
+ PSECURITY_DESCRIPTOR retVal = NULL;
PSECURITY_DESCRIPTOR pfSD = NULL;
BOOL fDummy;
PFILE_ACE pFileACE;
static DWORD __fastcall _get_access_mask ( OSD_SingleProtection prt ) {
- DWORD retVal;
+ DWORD retVal = 0;
switch ( prt ) {
static DWORD __fastcall _get_dir_access_mask ( OSD_SingleProtection prt ) {
- DWORD retVal;
+ DWORD retVal = 0;
switch ( prt ) {
) {
HANDLE retVal = INVALID_HANDLE_VALUE;
- DWORD dwDesiredAccess;
+ DWORD dwDesiredAccess = 0;
DWORD dwCreationDistribution;
switch ( oMode ) {
Standard_CString fName, Standard_Integer fileHandle
) {
- Standard_Integer retVal;
+ Standard_Integer retVal = 0;
DWORD dwType;
int fileType;
BOOL __fastcall _osd_print (const Standard_PCharacter pName, Standard_CString fName ) {
BOOL fOK, fJob;
- HANDLE hPrinter;
+ HANDLE hPrinter = NULL;
BYTE jobInfo[ MAX_PATH + sizeof ( DWORD ) ];
- DWORD dwNeeded, dwCode;
+ DWORD dwNeeded, dwCode = 0;
fOK = fJob = FALSE;
if (Count <= 0)
return Standard_False ;
- while(1) {
+ for(;;) {
ReadLine(aLine, MaxLength, Len) ;
if (!aLine.IsEmpty())
return Standard_True ;
OSD_FileIterator::OSD_FileIterator() {}
void OSD_FileIterator::Initialize(
- const OSD_Path& where,
- const TCollection_AsciiString& Mask){}
+ const OSD_Path& /*where*/,
+ const TCollection_AsciiString& /*Mask*/){}
#endif
Standard_Integer OSD_FileNode::UserId () {
PSID pSIDowner = NULL;
- PSID retVal;
+ PSID retVal = NULL;
BOOL fDefaulted;
TCollection_AsciiString fName;
PSECURITY_DESCRIPTOR pSD;
FILETIME ftCreationTime;
FILETIME ftLastWriteTime;
LPFILETIME lpftPtr;
- HANDLE hFile;
+ HANDLE hFile = INVALID_HANDLE_VALUE;
__try {
DWORD nSize;
Standard_Character szHostName[ MAX_COMPUTERNAME_LENGTH + 1 ];
- char* hostAddr;
+ char* hostAddr = 0;
MEMORYSTATUS ms;
WSADATA wd;
PHOSTENT phe;
nSize = MAX_COMPUTERNAME_LENGTH + 1;
osVerInfo.dwOSVersionInfoSize = sizeof ( OSVERSIONINFO );
+ ZeroMemory (&ms, sizeof(ms));
ZeroMemory ( szHostName, sizeof ( Standard_Character ) * (MAX_COMPUTERNAME_LENGTH + 1) );
if ( !GetVersionEx ( &osVerInfo ) ) {
static OSD_MAllocHook::Callback* MypCurrentCallback = NULL;
+namespace {
+ // dummy function to call at place where break point might be needed
+ inline void place_for_breakpoint () {}
+};
+
//=======================================================================
//function : GetCallback
//purpose :
myMutex.Lock();
myLogFile << "alloc "<< std::setw(10) << theRequestNum
<< std::setw(20) << theSize << std::endl;
- myMutex.Unlock();
if (myBreakSize == theSize)
- {
- int a = 1;
- }
+ place_for_breakpoint();
+ myMutex.Unlock();
}
}
long /*theRequestNum*/)
{
if (myBreakSize == theSize)
- {
- int a = 1;
- }
+ place_for_breakpoint();
if (theSize > 0)
{
myMutex.Lock();
} // end OSD_Path :: SystemName
Standard_Boolean OSD_Path :: IsValid (
- const TCollection_AsciiString& aDependentName,
+ const TCollection_AsciiString& /*aDependentName*/,
const OSD_SysType aSysType
) const {
return retVal;
- while ( Standard_True ) {
+ for (;;) {
if ( myTrek.Token ( TEXT( "|" ), i++ ).IsEmpty () )
Standard_Boolean retVal = FALSE;
PSID pSIDadmin;
HANDLE hProcessToken = INVALID_HANDLE_VALUE;
- PTOKEN_GROUPS pTKgroups;
+ PTOKEN_GROUPS pTKgroups = NULL;
if ( !OpenProcessToken (
GetCurrentProcess (),
} // end OSD_SharedLibrary :: Name
-Standard_Boolean OSD_SharedLibrary :: DlOpen ( const OSD_LoadMode Mode ) {
+Standard_Boolean OSD_SharedLibrary :: DlOpen ( const OSD_LoadMode /*Mode*/ ) {
Standard_Boolean retVal = Standard_True;
LPTSTR pathSrc, pathDst;
HANDLE hFindFile;
BOOL fFind;
- BOOL retVal;
+ BOOL retVal = FALSE;
DIR_RESPONSE response;
DWORD level;
if ( pFD -> dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) {
- if ( !( retVal = MoveDirectory ( pFullNameSrc, pFullNameDst ) ) ) break;
+ retVal = MoveDirectory ( pFullNameSrc, pFullNameDst );
+ if (!retVal) break;
} else {
retry_1:
- if ( !( retVal = MoveFileEx (
- pFullNameSrc, pFullNameDst,
- MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED
- )
- )
- ) {
+ retVal = MoveFileEx (pFullNameSrc, pFullNameDst,
+ MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED);
+ if (! retVal) {
if ( _response_dir_proc != NULL ) {
/***/
BOOL CopyDirectory ( LPCTSTR dirSrc, LPCTSTR dirDst ) {
- PWIN32_FIND_DATA pFD;
+ PWIN32_FIND_DATA pFD = NULL;
LPTSTR pName = NULL;
LPTSTR pFullNameSrc = NULL;
LPTSTR pFullNameDst = NULL;
if ( pFD -> dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) {
- if ( !( retVal = CopyDirectory ( pFullNameSrc, pFullNameDst ) ) ) break;
+ retVal = CopyDirectory ( pFullNameSrc, pFullNameDst );
+ if ( ! retVal ) break;
} else {
retry:
- if ( !( retVal = CopyFile ( pFullNameSrc, pFullNameDst, FALSE ) ) ) {
+ retVal = CopyFile ( pFullNameSrc, pFullNameDst, FALSE );
+ if ( ! retVal ) {
if ( _response_dir_proc != NULL ) {
SetConsoleCtrlHandler (&_osd_ctrl_break_handler, TRUE);
#ifdef _MSC_VER
- _se_translator_function pOldSeFunc = _set_se_translator (TranslateSE);
+// _se_translator_function pOldSeFunc =
+ _set_se_translator (TranslateSE);
#endif
fFltExceptions = theFloatingSignal;
if ( !fDbgLoaded ) {
- HKEY hKey;
+ HKEY hKey = NULL;
HANDLE hEvent = INVALID_HANDLE_VALUE;
DWORD dwKeyType;
DWORD dwValueLen;
//void OSD::Handler(const OSD_Signals aSig,
// const OSD_Signals aCode){}
-void OSD::Handler(const OSD_Signals theSignal,
- const Standard_Address theSigInfo,
- const Standard_Address theContext) {}
+void OSD::Handler(const OSD_Signals /*theSignal*/,
+ const Standard_Address /*theSigInfo*/,
+ const Standard_Address /*theContext*/) {}
-void OSD::SegvHandler(const OSD_Signals aSig,
- const Standard_Address code,
- const Standard_Address scp){}
+void OSD::SegvHandler(const OSD_Signals /*aSig*/,
+ const Standard_Address /*code*/,
+ const Standard_Address /*scp*/){}
#endif // WNT
OpenGl_SequenceOfLayers::Iterator anIts;
for (anIts.Init (myLayers); anIts.More (); anIts.Next (), aSeqId++)
{
- OpenGl_PriorityList& aScanList = anIts.ChangeValue ();
if (aSeqPos == aSeqId)
continue;
/*
* Creation du triedre
*/
- const OpenGl_AspectLine *AspectLine = theWorkspace->AspectLine( Standard_True );
/* Fotis Sioutis 2007-11-14 15:06
I have also seen in previous posts that the view trihedron in V3d_WIREFRAME mode
glPushAttrib ( GL_DEPTH_BUFFER_BIT );
- const OpenGl_AspectLine *aspect_line = AWorkspace->AspectLine( Standard_True );
-
//TsmPushAttri(); /* save previous graphics context */
if ( (AWorkspace->NamedStatus & OPENGL_NS_2NDPASSNEED) == 0 )
#include <Prs3d_RadiusAspect.ixx>
-Prs3d_RadiusAspect::Prs3d_RadiusAspect(const Quantity_NameOfColor aColor,
+Prs3d_RadiusAspect::Prs3d_RadiusAspect(const Quantity_NameOfColor /*aColor*/,
const Aspect_TypeOfLine aType,
const Standard_Real aWidth) {
}
di << "ERROR : Usage : " << argv[0] << " shape; get selection mode" << "\n";
return 1;
}
-
- Standard_Boolean updateviewer = Standard_True, PutInCollector = Standard_True;
ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS();
try {
OCC_CATCH_SIGNALS
if( writer.Transfer(document, mode)) {
- IFSelect_ReturnStatus stat =
- writer.Write(aFilePath.ToCString());
+ writer.Write(aFilePath.ToCString());
}
}
catch(OSD_Exception_STACK_OVERFLOW) {
{
// Used to Display Geometry or Topolgy
char name[255];
- char *pname = name;
Standard_Boolean check = Standard_True;
// Set default arguments
// Used to Display Geometry or Topolgy
char name[255];
- char *pname = name;
- //bool check = true;
Standard_Boolean check = Standard_True;
// Set default arguments
if (!aResult.IsNull())
{
double lmaxdist = 0.0;
- double lmaxtoler = 0.0;
TopExp_Explorer aExp2;
for (aExp2.Init(aResult,TopAbs_VERTEX); aExp2.More(); aExp2.Next())
{
}
gp_Ax2 Cone_Ax;
- double R1=8, R2=16, H1=20, H2=40, angle;
+ double R1=8, R2=16, angle;
gp_Pnt P0(0,0,0),
P1(0,0,20), P2(0,0,45);
angle = 2*M_PI;
Handle(Dico_DictionaryOfInteger) aDico = new Dico_DictionaryOfInteger();
Handle(TColStd_HSequenceOfAsciiString) aSequence = new TColStd_HSequenceOfAsciiString;
Standard_CString aString;
- Standard_Integer i=1,j=1,k=1,l=1,aa=1;
+ Standard_Integer i=1,j=1,l=1,aa=1;
TopExp_Explorer expl;
Standard_Real f3d,l3d;
for(expl.Init(aShape,TopAbs_FACE);expl.More();expl.Next())
static Standard_Integer BUC60857 (Draw_Interpretor& di, Standard_Integer /*argc*/,const char ** argv)
{
gp_Ax2 Cone_Ax;
- double R1=8, R2=16, H1=20, H2=40, angle;
+ double R1=8, R2=16, angle;
gp_Pnt P0(0,0,0), P1(0,0,20), P2(0,0,45);
angle = 2*M_PI;
void QANewBRepNaming_Gluing::Load(QANewModTopOpe_Glue& theMkGluing) {
TopoDS_Shape aResShape = theMkGluing.Shape();
const TopoDS_Shape& anObjShape = theMkGluing.Shape1();
- const TopoDS_Shape& aToolShape = theMkGluing.Shape2();
- const TopAbs_ShapeEnum& anObjectType = ShapeType(anObjShape);
if (aResShape.IsNull()) {
#ifdef MDTV_DEB
TopoDS_Shape ResSh = MS.Shape();
const TopoDS_Shape& ObjSh = MS.Shape1();
- const TopoDS_Shape& ToolSh = MS.Shape2();
const TopAbs_ShapeEnum& ObjType = ShapeType(ObjSh);
if (ResSh.IsNull()) {
TopTools_IndexedMapOfShape allSubShapes;
TopExp::MapShapes(aSelectedShape, allSubShapes);
-// cout<<"SELECTION ..."<<endl;
-// cout << "i = " << allSubShapes.Extent() << endl;
- Standard_Integer count = 0, i;
- char aDrawName[80] = "Select";
+
+ Standard_Integer i;
for (i = 1; i <= allSubShapes.Extent(); i++) {
const TDF_Label& aSubLabel = L.FindChild(i);
// cout<<"Wrong selection ..."<<endl;
return 1;
}
- const TopAbs_ShapeEnum TypeOfNaming = aNS->Get().ShapeType();
// cout<<i<<" ";TopAbs::Print(TypeOfNaming, cout); cout<<" ";
// DBRep::Set("Solved", aNS->Get());
TNaming_Selector SLSolving(itr.Value());
if(nbs <= 1) return aRes;
math_Matrix aMat(1, nbs, 1, nbs, 0);
- Standard_Integer aMax=nbs*nbs;
TopTools_MapIteratorOfMapOfShape anMIter(aSMap);
Standard_Integer n = 1;
}
//cout << "QANewModTopOpe::IsConnected(3)Lnbs=" <<nbs<< endl;
- Standard_Integer k,i,ncount=0;
+ Standard_Integer k,i;
Standard_Real p;
Standard_Boolean aNotChanged;
//=======================================================================
Standard_Boolean QANewModTopOpe_Intersection::HasDeleted() const
{
- Standard_Real aresult = Standard_False;
TopExp_Explorer anExp;
for(Standard_Integer argit = 0; argit < 2; argit++) {
const BOPDS_PDS& pDS = aDSFiller.PDS();
Standard_Integer aNb = 0, aNbSps;
- Standard_Integer i = 0, j = 0;
+ Standard_Integer i = 0;
TopTools_IndexedMapOfShape aMapV;
{
void RWHeaderSection_GeneralModule::CheckCase(const Standard_Integer CN,
const Handle(Standard_Transient)& ent,
const Interface_ShareTool& shares,
- Handle(Interface_Check)& ach) const
+ Handle(Interface_Check)& /*ach*/) const
{
}
// --- inherited field : assignedApproval ---
Handle(StepBasic_Approval) aAssignedApproval;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_approval", ach, STANDARD_TYPE(StepBasic_Approval), aAssignedApproval);
+ data->ReadEntity(num, 1,"assigned_approval", ach, STANDARD_TYPE(StepBasic_Approval), aAssignedApproval);
// --- own field : items ---
// --- inherited field : assignedDateAndTime ---
Handle(StepBasic_DateAndTime) aAssignedDateAndTime;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
+ data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
// --- inherited field : role ---
Handle(StepBasic_DateTimeRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
// --- own field : items ---
// --- inherited field : assignedDate ---
Handle(StepBasic_Date) aAssignedDate;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_date", ach, STANDARD_TYPE(StepBasic_Date), aAssignedDate);
+ data->ReadEntity(num, 1,"assigned_date", ach, STANDARD_TYPE(StepBasic_Date), aAssignedDate);
// --- inherited field : role ---
Handle(StepBasic_DateRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateRole), aRole);
// --- own field : items ---
// --- inherited field : assigned_document
Handle(StepBasic_Document) adoc;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity
+ data->ReadEntity
(num, 1,"assigned_document", ach, STANDARD_TYPE(StepBasic_Document), adoc);
// --- inherited field : source ---
// --- inherited field : assignedOrganization ---
Handle(StepBasic_Organization) aAssignedOrganization;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_organization", ach, STANDARD_TYPE(StepBasic_Organization), aAssignedOrganization);
+ data->ReadEntity(num, 1,"assigned_organization", ach, STANDARD_TYPE(StepBasic_Organization), aAssignedOrganization);
// --- inherited field : role ---
Handle(StepBasic_OrganizationRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_OrganizationRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_OrganizationRole), aRole);
// --- own field : items ---
// --- inherited field : assignedPersonAndOrganization ---
Handle(StepBasic_PersonAndOrganization) aAssignedPersonAndOrganization;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_person_and_organization", ach, STANDARD_TYPE(StepBasic_PersonAndOrganization), aAssignedPersonAndOrganization);
+ data->ReadEntity(num, 1,"assigned_person_and_organization", ach, STANDARD_TYPE(StepBasic_PersonAndOrganization), aAssignedPersonAndOrganization);
// --- inherited field : role ---
Handle(StepBasic_PersonAndOrganizationRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_PersonAndOrganizationRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_PersonAndOrganizationRole), aRole);
// --- own field : items ---
// --- inherited field : assignedSecurityClassification ---
Handle(StepBasic_SecurityClassification) aAssignedSecurityClassification;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_security_classification", ach, STANDARD_TYPE(StepBasic_SecurityClassification), aAssignedSecurityClassification);
+ data->ReadEntity(num, 1,"assigned_security_classification", ach, STANDARD_TYPE(StepBasic_SecurityClassification), aAssignedSecurityClassification);
// --- own field : items ---
// --- inherited field : assignedDateAndTime ---
Handle(StepBasic_DateAndTime) aAssignedDateAndTime;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
+ data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
// --- inherited field : role ---
Handle(StepBasic_DateTimeRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
// --- own field : items ---
// --- inherited field : assignedDate ---
Handle(StepBasic_Date) aAssignedDate;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_date", ach, STANDARD_TYPE(StepBasic_Date), aAssignedDate);
+ data->ReadEntity(num, 1,"assigned_date", ach, STANDARD_TYPE(StepBasic_Date), aAssignedDate);
// --- inherited field : role ---
Handle(StepBasic_DateRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateRole), aRole);
// --- own field : items ---
// --- inherited field : assignedApproval ---
Handle(StepBasic_Approval) aAssignedApproval;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_approval", ach, STANDARD_TYPE(StepBasic_Approval), aAssignedApproval);
+ data->ReadEntity(num, 1,"assigned_approval", ach, STANDARD_TYPE(StepBasic_Approval), aAssignedApproval);
// --- own field : items ---
// --- inherited field : assignedPersonAndOrganization ---
Handle(StepBasic_PersonAndOrganization) aAssignedPersonAndOrganization;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_person_and_organization", ach, STANDARD_TYPE(StepBasic_PersonAndOrganization), aAssignedPersonAndOrganization);
+ data->ReadEntity(num, 1,"assigned_person_and_organization", ach, STANDARD_TYPE(StepBasic_PersonAndOrganization), aAssignedPersonAndOrganization);
// --- inherited field : role ---
Handle(StepBasic_PersonAndOrganizationRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_PersonAndOrganizationRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_PersonAndOrganizationRole), aRole);
// --- own field : items ---
// --- inherited field : assigned_document
Handle(StepBasic_Document) adoc;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity
+ data->ReadEntity
(num, 1,"assigned_document", ach, STANDARD_TYPE(StepBasic_Document), adoc);
// --- inherited field : source ---
// --- inherited field : assignedDateAndTime ---
Handle(StepBasic_DateAndTime) aAssignedDateAndTime;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
+ data->ReadEntity(num, 1,"assigned_date_and_time", ach, STANDARD_TYPE(StepBasic_DateAndTime), aAssignedDateAndTime);
// --- inherited field : role ---
Handle(StepBasic_DateTimeRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateTimeRole), aRole);
// --- own field : items ---
// --- inherited field : assignedDate ---
Handle(StepBasic_Date) aAssignedDate;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_date", ach, STANDARD_TYPE(StepBasic_Date), aAssignedDate);
+ data->ReadEntity(num, 1,"assigned_date", ach, STANDARD_TYPE(StepBasic_Date), aAssignedDate);
// --- inherited field : role ---
Handle(StepBasic_DateRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_DateRole), aRole);
// --- own field : items ---
// --- inherited field : assignedOrganization ---
Handle(StepBasic_Organization) aAssignedOrganization;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_organization", ach, STANDARD_TYPE(StepBasic_Organization), aAssignedOrganization);
+ data->ReadEntity(num, 1,"assigned_organization", ach, STANDARD_TYPE(StepBasic_Organization), aAssignedOrganization);
// --- inherited field : role ---
Handle(StepBasic_OrganizationRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_OrganizationRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_OrganizationRole), aRole);
// --- own field : items ---
// --- inherited field : assignedPersonAndOrganization ---
Handle(StepBasic_PersonAndOrganization) aAssignedPersonAndOrganization;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_person_and_organization", ach, STANDARD_TYPE(StepBasic_PersonAndOrganization), aAssignedPersonAndOrganization);
+ data->ReadEntity(num, 1,"assigned_person_and_organization", ach, STANDARD_TYPE(StepBasic_PersonAndOrganization), aAssignedPersonAndOrganization);
// --- inherited field : role ---
Handle(StepBasic_PersonAndOrganizationRole) aRole;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_PersonAndOrganizationRole), aRole);
+ data->ReadEntity(num, 2,"role", ach, STANDARD_TYPE(StepBasic_PersonAndOrganizationRole), aRole);
// --- own field : items ---
// --- inherited field : assignedSecurityClassification ---
Handle(StepBasic_SecurityClassification) aAssignedSecurityClassification;
-#ifdef DEB
- Standard_Boolean stat1 =
-#endif
- data->ReadEntity(num, 1,"assigned_security_classification", ach, STANDARD_TYPE(StepBasic_SecurityClassification), aAssignedSecurityClassification);
+ data->ReadEntity(num, 1,"assigned_security_classification", ach, STANDARD_TYPE(StepBasic_SecurityClassification), aAssignedSecurityClassification);
// --- own field : items ---
// --- own field : frameOfReference ---
Handle(StepBasic_ApplicationContext) aFrameOfReference;
-#ifdef DEB
- Standard_Boolean stat2 =
-#endif
- data->ReadEntity(num, 2,"frame_of_reference", ach, STANDARD_TYPE(StepBasic_ApplicationContext), aFrameOfReference);
+ data->ReadEntity(num, 2,"frame_of_reference", ach, STANDARD_TYPE(StepBasic_ApplicationContext), aFrameOfReference);
//--- Initialisation of the read entity ---
if (Debug)
cout << "Key = '" << aToken1 << flush ;
- if ((Pos = Line.FirstLocationNotInSet(WhiteSpace, Pos2+1, Line.Length()))) {
+ Pos = Line.FirstLocationNotInSet(WhiteSpace, Pos2+1, Line.Length());
+ if (Pos) {
if (Line.Value(Pos) == '\\')
switch(Line.Value(Pos+1)) {
case '\\' :
const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap,
const STEPCAFControl_DataMapOfShapePD& ShapePDMap) const
{
- const Handle(Interface_InterfaceModel)& Model = Reader().WS()->Model();
const Handle(Transfer_TransientProcess)& TP = Reader().WS()->TransferReader()->TransientProcess();
NCollection_DataMap<TopoDS_Shape, Handle(TCollection_HAsciiString)> ShapeNameMap;
TColStd_MapOfTransient aRepItems;
//=======================================================================
Standard_Boolean Select3D_SensitiveEntity::Matches(const TColgp_Array1OfPnt2d& aPoly,
- const Bnd_Box2d& aBox,
+ const Bnd_Box2d& /*aBox*/,
const Standard_Real aTol)
{
return Standard_False;
ces.Append (i); statuses.SetValue (i, 1); //putting into CES
Standard_Boolean SearchBackward = Standard_True;
- while (Standard_True) {
+ for(;;) {
Standard_Integer ei = ces.Last(); //ei-edge index, number of current edge analyzed for connection
Standard_Boolean found;
TopoDS_Edge edge;
Standard_Integer iumin, iumax, ivmin, ivmax;
Standard_Real dsu=0., dsv=0.;
Standard_Boolean canBeClosed = Standard_False;
- while ( 1 ) {
+ for(;;) {
Standard_Integer index = 0;
Standard_Boolean misoriented = Standard_True, samepatch = Standard_False;
Standard_Boolean reverse = Standard_False, connected = Standard_False;
// Collect wires in packets lying on same surface and dispatch them
TColStd_Array1OfBoolean used ( 1, nb );
used.Init ( Standard_False );
- while ( 1 ) {
+ for(;;) {
TopTools_SequenceOfShape loops;
Handle(Geom_Surface) Surf;
#endif*/
char* aVar;
- Standard_Integer anAllocId = (aVar = getenv ("MMGT_OPT" )) ? atoi (aVar) :
- (OCCT_MMGT_OPT_DEFAULT);
- Standard_Boolean toClear = (aVar = getenv ("MMGT_CLEAR" )) ? (atoi (aVar) != 0) : Standard_True;
+ aVar = getenv ("MMGT_OPT");
+ Standard_Integer anAllocId = (aVar ? atoi (aVar): OCCT_MMGT_OPT_DEFAULT);
+ aVar = getenv ("MMGT_CLEAR");
+ Standard_Boolean toClear = (aVar ? (atoi (aVar) != 0) : Standard_True);
// on Windows (actual for XP and 2000) activate low fragmentation heap
// for CRT heap in order to get best performance.
{
case 1: // OCCT optimized memory allocator
{
- Standard_Boolean bMMap = (aVar = getenv ("MMGT_MMAP" )) ? (atoi (aVar) != 0) : Standard_True;
- Standard_Integer aCellSize = (aVar = getenv ("MMGT_CELLSIZE" )) ? atoi (aVar) : 200;
- Standard_Integer aNbPages = (aVar = getenv ("MMGT_NBPAGES" )) ? atoi (aVar) : 1000;
- Standard_Integer aThreshold = (aVar = getenv ("MMGT_THRESHOLD")) ? atoi (aVar) : 40000;
+ aVar = getenv ("MMGT_MMAP");
+ Standard_Boolean bMMap = (aVar ? (atoi (aVar) != 0) : Standard_True);
+ aVar = getenv ("MMGT_CELLSIZE");
+ Standard_Integer aCellSize = (aVar ? atoi (aVar) : 200);
+ aVar = getenv ("MMGT_NBPAGES");
+ Standard_Integer aNbPages = (aVar ? atoi (aVar) : 1000);
+ aVar = getenv ("MMGT_THRESHOLD");
+ Standard_Integer aThreshold = (aVar ? atoi (aVar) : 40000);
myFMMgr = new Standard_MMgrOpt (toClear, bMMap, aCellSize, aNbPages, aThreshold);
break;
}
HANDLE * aMBlock = 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)) )
+ ! ((aMBlock = (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0))) )
{
// close handle if allocated
if ( hMap )
//==================================================================
void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
const Adaptor3d_Curve& aCurve,
- const Quantity_Length aDeflection,
+ const Quantity_Length /*aDeflection*/,
const Handle(Prs3d_Drawer)& aDrawer,
TColgp_SequenceOfPnt& Points,
const Standard_Boolean drawCurve)
const Adaptor3d_Curve& aCurve,
const Standard_Real U1,
const Standard_Real U2,
- const Quantity_Length aDeflection,
+ const Quantity_Length /*aDeflection*/,
TColgp_SequenceOfPnt& Points,
const Standard_Integer NbPoints,
const Standard_Boolean drawCurve)
const Handle(Prs3d_Drawer)& theDrawer,
Prs3d_NListOfSequenceOfPnt& theCurves)
{
- Standard_Real aLimit = theDrawer->MaximalParameterValue();
Standard_Integer aNbPoints = theDrawer->Discretisation();
StdPrs_ToolRFace aToolRst (theFace);
}
-void StepBasic_SiUnit::SetDimensions(const Handle(StepBasic_DimensionalExponents)& aDimensions)
+void StepBasic_SiUnit::SetDimensions(const Handle(StepBasic_DimensionalExponents)& /*aDimensions*/)
{
// WARNING : the field is redefined.
// field set up forbidden.
void StepData_DefaultGeneral::CheckCase(const Standard_Integer casenum,
const Handle(Standard_Transient)& ent,
const Interface_ShareTool& shares,
- Handle(Interface_Check)& ach) const
+ Handle(Interface_Check)& /*ach*/) const
{
} // pas de Check sur une UndefinedEntity
void StepData_DescrGeneral::CheckCase(const Standard_Integer CN,
const Handle(Standard_Transient)& ent,
const Interface_ShareTool& shares,
- Handle(Interface_Check)& ach) const
+ Handle(Interface_Check)& /*ach*/) const
{
} // pour l instant
void StepData_PDescr::Check(const StepData_Field& afild,
- Handle(Interface_Check)& ach) const
+ Handle(Interface_Check)& /*ach*/) const
{
// pour l instant ...
}
{ return thefields; }
-void StepData_Simple::Check(Handle(Interface_Check)& ach) const
+void StepData_Simple::Check(Handle(Interface_Check)& /*ach*/) const
{
} // qq chose ? cf la description
Standard_Integer fromscope = nr;
Standard_Integer toscope = indm(indmap);
if (toscope < 0) toscope = -toscope;
- while (1) {
+ for(;;) {
fromscope --; // iteration de base
if (fromscope <= toscope) {
errorscope = Standard_True; // BANG, on est dessus
return orientation;
}
-void StepShape_OrientedClosedShell::SetCfsFaces(const Handle(StepShape_HArray1OfFace)& aCfsFaces)
+void StepShape_OrientedClosedShell::SetCfsFaces(const Handle(StepShape_HArray1OfFace)& /*aCfsFaces*/)
{
// WARNING : the field is redefined.
// field set up forbidden.
return orientation;
}
-void StepShape_OrientedFace::SetBounds(const Handle(StepShape_HArray1OfFaceBound)& aBounds)
+void StepShape_OrientedFace::SetBounds(const Handle(StepShape_HArray1OfFaceBound)& /*aBounds*/)
{
// WARNING : the field is redefined.
// field set up forbidden.
return orientation;
}
-void StepShape_OrientedOpenShell::SetCfsFaces(const Handle(StepShape_HArray1OfFace)& aCfsFaces)
+void StepShape_OrientedOpenShell::SetCfsFaces(const Handle(StepShape_HArray1OfFace)& /*aCfsFaces*/)
{
// WARNING : the field is redefined.
// field set up forbidden.
}
if (result) {
- Standard_Integer otype,oref;
+ Standard_Integer otype, oref = 0;
errorCode = f.BeginReadRefSection();
if(aFile.IsOpen() && aFile.IsReadable()) {
TCollection_AsciiString aLine;
Standard_Integer aNbReaded(0);
- while (1) {
+ for (;;) {
aFile.ReadLine(aLine, 80, aNbReaded);
if(aFile.IsAtEnd() || !aNbReaded) {
aFile.Close();
TColStd_MapIteratorOfPackedMapOfInteger::TColStd_MapIteratorOfPackedMapOfInteger
(const TColStd_PackedMapOfInteger& theMap)
: TCollection_BasicMapIterator (theMap),
- myIntMask (~0)
+ myIntMask (~0U)
{
if (myNode) {
const TColStd_intMapNode * aNode =
(const TColStd_PackedMapOfInteger& theMap)
{
TCollection_BasicMapIterator::Initialize (theMap);
- myIntMask = ~0;
+ myIntMask = ~0U;
if (myNode) {
const TColStd_intMapNode * aNode =
reinterpret_cast <const TColStd_intMapNode *>(myNode);
void TColStd_MapIteratorOfPackedMapOfInteger::Reset ()
{
TCollection_BasicMapIterator::Reset();
- myIntMask = ~0;
+ myIntMask = ~0U;
if (myNode) {
const TColStd_intMapNode * aNode =
reinterpret_cast <const TColStd_intMapNode *>(myNode);
unsigned int val = theNode->myData & theMask;
int nZeros (0);
if (val == 0)
- theMask = ~0; // void, nothing to do
+ theMask = ~0U; // void, nothing to do
else{
- unsigned int aMask = ~0;
+ unsigned int aMask = ~0U;
if ((val & 0x0000ffff) == 0) {
aMask = 0xffff0000;
nZeros = 16;
unsigned int val = theNode->myData & theMask;
int nZeros (0);
if (val == 0)
- theMask = ~0; // void, nothing to do
+ theMask = ~0U; // void, nothing to do
else {
- unsigned int aMask = ~0;
+ unsigned int aMask = ~0U;
if ((val & 0xffff0000) == 0) {
aMask = 0x0000ffff;
nZeros = 16;
while (p1) {
if (p1->IsEqual(aKeyInt)) {
const size_t anOldPop = p1->NbValues();
- Standard_Integer newData = p1->Data() | p2->Data();
+ unsigned int newData = p1->Data() | p2->Data();
if ( newData != p1->Data() ) {
p1->ChangeData() = newData;
aNewExtent = aNewExtent - anOldPop +
void TCollection_AsciiString::Capitalize()
{
for (int i=0; i < mylength; i++) {
- if ( i==0 ) mystring[i] = toupper(mystring[i]);
- else mystring[i] = tolower(mystring[i]);
+ if ( i==0 ) mystring[i] = ::UpperCase(mystring[i]);
+ else mystring[i] = ::LowerCase(mystring[i]);
}
}
if (mystring[i] == aChar) mystring[i] = NewChar;
}
else{
- Standard_Character anUpperChar = toupper(aChar);
+ Standard_Character anUpperChar = ::UpperCase(aChar);
for (int i=0; i < mylength; i++)
- if (toupper(mystring[i]) == anUpperChar) mystring[i] = NewChar;
+ if (::UpperCase(mystring[i]) == anUpperChar) mystring[i] = NewChar;
}
}
void TCollection_AsciiString::LowerCase()
{
for (int i=0; i < mylength; i++)
- mystring[i] = tolower(mystring[i]);
+ mystring[i] = ::LowerCase(mystring[i]);
}
//------------------------------------------------------------------------
if (mystring[i] != what) mystring[c++] = mystring[i];
}
else {
- Standard_Character upperwhat = toupper(what);
+ Standard_Character upperwhat = ::UpperCase(what);
for (int i=0; i < mylength; i++) {
- if (toupper(mystring[i]) != upperwhat) mystring[c++] = mystring[i];
+ if (::UpperCase(mystring[i]) != upperwhat) mystring[c++] = mystring[i];
}
}
mylength = c;
void TCollection_AsciiString::UpperCase()
{
for (int i=0; i < mylength; i++)
- mystring[i] = toupper(mystring[i]);
+ mystring[i] = ::UpperCase(mystring[i]);
}
//------------------------------------------------------------------------
//purpose : Adds the referenced attributes or labels.
//=======================================================================
-void TDF_Attribute::References(const Handle(TDF_DataSet)& aDataSet) const
+void TDF_Attribute::References(const Handle(TDF_DataSet)& /*aDataSet*/) const
{}
Handle(TDataStd_Directory) dir;
if (L.IsNull()) return Standard_False;
- while (1) {
+ for(;;) {
if(L.FindAttribute(TDataStd_Directory::GetID(), dir)) break;
L = L.Father();
if (L.IsNull()) break;
Handle(TDataStd_NoteBook) NB;
if (L.IsNull()) return Standard_False;
- while (1) {
+ for(;;) {
if(L.FindAttribute(TDataStd_NoteBook::GetID(), NB)) break;
L = L.Father();
if (L.IsNull()) break;
TDF_Label L = current;
Handle(TDataXtd_Shape) SA;
if (L.IsNull()) return Standard_False;
- while (1) {
+ for(;;) {
if(L.FindAttribute(TDataXtd_Shape::GetID(), SA)) break;
L = L.Father();
if (L.IsNull()) break;
//purpose : Collects the references
//=======================================================================
-void TFunction_Function::References(const Handle(TDF_DataSet)& aDataSet) const
+void TFunction_Function::References(const Handle(TDF_DataSet)& /*aDataSet*/) const
{
}
//purpose :
//=======================================================================
-void TNaming_UsedShapes::References(const Handle(TDF_DataSet)& aDataSet) const
+void TNaming_UsedShapes::References(const Handle(TDF_DataSet)& /*aDataSet*/) const
{
}
//purpose :
//=======================================================================
void TPrsStd_ConstraintTools::ComputeOthers
-(const Handle(TDataXtd_Constraint)& aConst,
+(const Handle(TDataXtd_Constraint)& /*aConst*/,
Handle(AIS_InteractiveObject)& anAIS)
{
}
TestTopOpe_HDSDisplayer.hxx
TestTopOpe_HDSDisplayer.cxx
TestTopOpe_HDSCommands.cxx
-TestTopOpe_DSACommands.cxx
TestTopOpe_CORCommands.cxx
TestTopOpe_OtherCommands.cxx
TestTopOpe::HDSCommands(theCommands);
TestTopOpe::MesureCommands(theCommands);
TestTopOpe::CORCommands(theCommands);
- TestTopOpe::DSACommands(theCommands);
+ //TestTopOpe::DSACommands(theCommands);
TestTopOpe::OtherCommands(theCommands);
TestTopOpeTools::AllCommands(theCommands);
TestTopOpeDraw::AllCommands(theCommands);
// TopoDS_Face f = TopoDS::Face(DBRep::Get(a[1]));
if (f.IsNull()) {di<<"null shape"<<"\n";return 1;}
gp_Pnt p; DrawTrSurf::GetPoint(a[2], p);
-#ifdef DEB
- Standard_Real length = Draw::Atof(a[3]);
-#endif
+
Standard_Real dist=0.; gp_Pnt2d uv; Standard_Boolean ok = FUN_tool_projPonF(p,f,uv,dist);
if (!ok) {di<<"projection failed"<<"\n"; return 1;}
#ifdef DEB
+++ /dev/null
-// Created on: 1997-12-01
-// Created by: Prestataire Mary FABIEN
-// Copyright (c) 1997-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.
-
-
-
-#include <TestTopOpe.ixx>
-#include <BRepAlgo_DSAccess.hxx>
-#include <DBRep.hxx>
-#include <TopOpeBRepDS_define.hxx>
-
-Standard_Integer DSACCESSCOMMANDS(Draw_Interpretor& interpretor,Standard_Integer na, const char** a)
-{
- static BRepAlgo_DSAccess DSA;
-// Standard_Integer i;
-
- if (!strcmp(a[0],"dsload"))
- if (na == 3) {
- TopoDS_Shape SS1 = DBRep::Get(a[1]);
- TopoDS_Shape& S1 = SS1;
- TopoDS_Shape SS2 = DBRep::Get(a[2]);
- TopoDS_Shape& S2 = SS2;
- TestTopOpe::CurrentDS(DSA.DS());
- DSA.Load(S1, S2);
- return 0;
- }
- else
- return 0;
-
- else if(!strcmp(a[0],"dsinit")) {
- DSA.Init();
- }
- else if(!strcmp(a[0],"dsinters"))
- if (na == 4)
- if(!strcmp(a[1],"-sd")) {
- const TopoDS_Shape& S1 = DBRep::Get(a[2]);
- const TopoDS_Shape& S2 = DBRep::Get(a[3]);
- DSA.SameDomain(S1, S2);
- }
- else
- return 0;
- else {
- if(na == 3) {
- const TopoDS_Shape& S1 = DBRep::Get(a[1]);
- const TopoDS_Shape& S2 = DBRep::Get(a[2]);
- DSA.Intersect(S1, S2);
- }
- else
- if(na == 1)
- DSA.Intersect();
- }
- else if(!strcmp(a[0],"dsgetsect")) {
- if((na == 2) || (na == 4)) {
- TopoDS_Shape EmptyShape;
- const TopoDS_Shape& S1 = ((na == 2) ? EmptyShape : DBRep::Get(a[2]));
- const TopoDS_Shape& S2 = ((na == 2) ? EmptyShape : DBRep::Get(a[3]));
- const TopTools_ListOfShape& list =
- ((na == 2) ? DSA.GetSectionEdgeSet() :
- DSA.GetSectionEdgeSet(S1, S2));
- Standard_Integer index = 1;
- if(list.Extent() > 1) {
- TopTools_ListIteratorOfListOfShape it(list);
- for(; it.More(); it.Next(), index++) {
- TCollection_AsciiString enam(a[1]);
- enam=enam + "_" + TCollection_AsciiString(index);
- DBRep::Set(enam.ToCString(),it.Value());
- }
- }
- else
- if(list.Extent() == 1) {
- TCollection_AsciiString enam(a[1]);
- DBRep::Set(enam.ToCString(),list.First());
- }
- else
- return 0;
- }
- }
-
- else if(!strcmp(a[0],"dssuppsect")) {
- if(na == 2) {
- const TopoDS_Shape& S = DBRep::Get(a[1]);
- DSA.SuppressEdgeSet(S);
- }
- else
- return 0;
- }
-
- else if(!strcmp(a[0],"dsperform")) {
- if(na == 3) {
- TopoDS_Shape S;
- TCollection_AsciiString enam(a[1]);
- if(!strcmp(enam.ToCString(),"fus"))
- S = DSA.Merge(TopAbs_OUT, TopAbs_OUT);
- else if(!strcmp(enam.ToCString(),"c12"))
- S = DSA.Merge(TopAbs_OUT, TopAbs_IN);
- else if(!strcmp(enam.ToCString(),"c21"))
- S = DSA.Merge(TopAbs_IN, TopAbs_OUT);
- else if(!strcmp(enam.ToCString(),"com"))
- S = DSA.Merge(TopAbs_IN, TopAbs_IN);
- DBRep::Set(a[2], S);
- TopOpeBRepDS_DataStructure& DS = DSA.DS()->ChangeDS();
- Standard_Integer i,j,nbsh = DS.NbShapes();
- for(i = 1;i<=nbsh;i++) {
- TopTools_ListOfShape& los = DS.ChangeShapeSameDomain(i);
- j = los.Extent();
-
- TopTools_ListIteratorOfListOfShape li(los);
- for(; li.More(); li.Next()) {
-#ifdef DEB
- const TopoDS_Shape& Shap =
-#endif
- li.Value();
- }
- }
- }
- else
- return 0;
- }
-
- else if(!strcmp(a[0],"dshelp")) {
-
- interpretor<<"\n";
- interpretor<<" dsinit"<<"\n";
- interpretor<<" dsload shape1 shape2"<<"\n";
- interpretor<<" dsinters [-sd] [f1 f2]"<<"\n";
- interpretor<<" if -sd, the faces are samedomain"<<"\n";
- interpretor<<" no argument = intersect two input Shapes"<<"\n";
- interpretor<<" dsgetsect result [f1 f2] (result = compound)"<<"\n";
- interpretor<<" dssuppsect comp"<<"\n";
- interpretor<<" dsperform fus/c12/c21/com resultShape "<<"\n";
- interpretor<<"\n";
-
- return 0;
- }
- return 0;
-}
-//=======================================================================
-//function : BOOPCommands
-//purpose :
-//=======================================================================
-void TestTopOpe::DSACommands(Draw_Interpretor& theCommands)
-{
- const char* g = "TestTopOpe DSACommands";
- theCommands.Add("dsinit","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
- theCommands.Add("dsload","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
- theCommands.Add("dsinters","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
- theCommands.Add("dsgetsect","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
- theCommands.Add("dssuppsect","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
- theCommands.Add("dsperform","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
- theCommands.Add("dshelp","Taper dshelp",__FILE__,DSACCESSCOMMANDS,g);
-}
di.EvalFile(filename);
}
-static Standard_Integer ttab(Draw_Interpretor& di, Standard_Integer narg, const char** a) {
+static Standard_Integer ttab(Draw_Interpretor& di, Standard_Integer narg, const char** /*a*/) {
char s[2000]; strcpy(s,"");
Sprintf(s,"%s%s",s,"proc addt {at args} {upvar $at x;set L \"\";addl L [join $args];");
Sprintf(s,"%s%s",s,"foreach l $L {set x([array size x]) $l}};");
myLI1.Clear();
myLI2.Clear();
myHDS = HDS;
-
+
#ifdef DEB
Standard_Boolean trc = TopOpeBRepDS_GettraceDSF();
trc = trc || TopOpeBRepDS_GettraceEDSF();
myPEI->Dump(str,myPDS->Shape(myE1),myPDS->Shape(myE2));
}
#endif
-
-#ifdef DEB
- Standard_Boolean hs =
-#endif
- myPEI->HasSegment();
Standard_Boolean esd = myPEI->SameDomain();
if (esd) myPDS->FillShapesSameDomain(E1,E2);
// exit if no point.
myPEI->InitPoint(); if ( !myPEI->MorePoint() ) return;
-
-#ifdef DEB
- Standard_Boolean reducesegment = (hs && !esd);
-#endif
// --- Add <E1,E2> in BDS
Standard_Integer E1index = myPDS->AddShape(E1,1);
Standard_Integer if2 = 0; if ( ! myF2.IsNull() ) if2 = myPDS->AddShape(myF2,2);
#ifdef DEB
- Standard_Boolean pointofsegment =
+ Standard_Boolean pointofsegment = P2D.IsPointOfSegment();
#endif
- P2D.IsPointOfSegment();
#ifdef DEB
if (trc) {
else if (pointofsegment && !esd) debposnesd();
}
#endif
-
+
TopOpeBRepDS_Transition T1 = P2D.Transition(1);
TopOpeBRepDS_Transition T2 = P2D.Transition(2);
Standard_Integer ifb = TU.IndexBefore();
Standard_Integer ifa = TU.IndexAfter();
const TopoDS_Face& fb = TopoDS::Face(myPDS->Shape(ifb));
-#ifdef DEB
- const TopoDS_Face& fa =
-#endif
- TopoDS::Face(myPDS->Shape(ifa));
#ifdef DEB
if (ifb != ifa) {cout<<"TopOpeBRep_EdgesFiller : ifb != ifa on E"<<EIX<<" NYI"<<endl;}
Standard_Real pE = FDS_Parameter(iloi); TopOpeBRepDS_Transition TN;
TN.ShapeBefore(TU.ShapeBefore());TN.IndexBefore(TU.IndexBefore());
TN.ShapeAfter(TU.ShapeAfter());TN.IndexAfter(TU.IndexAfter());
+
#ifdef DEB
Standard_Boolean ok =
#endif
- FDS_stateEwithF2d(*myPDS,E,pE,K,G,fb,TN);
+ FDS_stateEwithF2d(*myPDS,E,pE,K,G,fb,TN);
#ifdef DEB
if (TRC) {
TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl);
gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf);
gp_Pnt ptl = BRep_Tool::Pnt(vl);
-#ifdef DEB
- Standard_Real dl =
-#endif
- pt2.Distance(ptl);
+
Standard_Real tolf = BRep_Tool::Tolerance(vf);
-#ifdef DEB
- Standard_Real toll =
-#endif
- BRep_Tool::Tolerance(vl);
+
Standard_Boolean onf = (df < tolf);
TopoDS_Vertex v1 = onf ? vf : vl;
TopTools_IndexedDataMapOfShapeListOfShape mapVE; TopExp::MapShapesAndAncestors(myFace1,TopAbs_VERTEX,TopAbs_EDGE,mapVE);
Standard_Boolean isvertex11 = isvertex1 && !isvertex12;
Standard_Boolean T1INT = (T1.Orientation(TopAbs_IN) == TopAbs_INTERNAL);
-#ifdef DEB
- Standard_Boolean T1EXT = (T1.Orientation(TopAbs_IN) == TopAbs_EXTERNAL);
-#endif
+
if (T1INT && isvertex2 && !isvertex1) {
const TopoDS_Vertex& V2 = P2D.Vertex(2);
TopOpeBRepDS_Transition newT; Standard_Boolean computed = ::EdgesIntersector_checkT1D(myEdge1,myEdge2,V2,newT);
// --- Add <FF,EE> in BDS
Standard_Integer FFindex = BDS.AddShape(FF,1);
-#ifdef DEB
- Standard_Integer EEindex =
-#endif
BDS.AddShape(EE,2);
// --- get list of interferences connected to edges <FF>,<EE>
if (!OOdone) return Standard_False;
const TopoDS_Edge& E = TopoDS::Edge(pDS->Shape(iE));
-#ifdef DEB
- const TopoDS_Face& F =
-#endif
- TopoDS::Face(pDS->Shape(iF));
const TopoDS_Face& OOF = TopoDS::Face(pDS->Shape(iOOF));
Standard_Real f,l; FUN_tool_bounds(E,f,l);
Standard_Boolean tDSF = TopOpeBRepDS_GettraceDSF();
Standard_Boolean trline = Standard_False;
#endif
-
// if a VP is on degenerated edge, adds the triplet
// (vertex, closing edge, degenerated edge) to the
// map as vertex for key.
mykeptVPnbr = 0;
- if (myLine->TypeLineCurve() == TopOpeBRep_RESTRICTION) {
+ if (myLine->TypeLineCurve() == TopOpeBRep_RESTRICTION) {
#ifdef DEB
if (trline) FUN_traceRLine(*myLine);
-#endif
+#endif
ProcessRLine();
return;
}
if ( nINON == 0 ) {
return;
}
-
+
#ifdef DEB
if (trline) FUN_traceGLine(*myLine);
#endif
-
myLineIsonEdge = LSameDomainERL(*myLine, myERL);
// walking (case mouch1a 1 1) : line (vpfirst on 3,vplast on 0,nvpkept = 2) => kept
else cout <<" geometric line not on edge"<<endl;
}
#endif
-
- //----------------------------------------------------------------------
- // IMPORTANT :
+ //---------------------------------------------------------------------- // IMPORTANT :
// Some of Curve/Point transitions for vpoints keep on RESTRICTION lines
// sharing same domain with the current geometric line are computed here
//----------------------------------------------------------------------
}
if ( myLineIsonEdge && (!myDSCIL.IsEmpty()) ) {
-#ifdef DEB
- if (tDSF) cout<<"myLineIsonEdge && (!myDSCIL.IsEmpty())"<<endl;
-#endif
myDSCIL.Clear();
}
}
//purpose :
//=======================================================================
void TopOpeBRep_Hctxee2d::SetEdges(const TopoDS_Edge& E1,const TopoDS_Edge& E2,
- const BRepAdaptor_Surface& BAS1,
- const BRepAdaptor_Surface& BAS2)
+ const BRepAdaptor_Surface& BAS1,
+ const BRepAdaptor_Surface& BAS2)
{
const TopoDS_Face& F1 = BAS1.Face();
GeomAbs_SurfaceType ST1 = BAS1.GetType();
const TopoDS_Face& F2 = BAS2.Face();
-#ifdef DEb
- GeomAbs_SurfaceType ST2 = BAS2.GetType();
-#endif
myEdge1 = TopoDS::Edge(E1);
myEdge2 = TopoDS::Edge(E2);
BRep_Tool::UVPoints(myEdge1,F1,pfirst,plast);
tole = BRep_Tool::Tolerance(myEdge1);
myDomain1.SetValues(pfirst,first,tole,plast,last,tole);
-
+
#ifdef DEB
Standard_Boolean trc = Standard_False;
if (trc) {
cout<<"ed1 on fa1 : {pfirst=("<<pfirst.X()<<" "<<pfirst.Y()<<"),first="<<first<<"\n";
cout<<" plast =("<<plast.X()<<" "<<plast.Y()<<"),last="<<last<<"}"<<endl;}
-#endif
-
+#endif
+
Standard_Boolean memesfaces = F1.IsSame(F2);
Standard_Boolean memesupport = Standard_False;
TopLoc_Location L1,L2;
BRep_Tool::UVPoints(myEdge2,F1,pfirst,plast);
tole = BRep_Tool::Tolerance(myEdge2);
myDomain2.SetValues(pfirst,first,tole,plast,last,tole);
-
+
#ifdef DEB
if (trc) {
cout<<"ed2 on fa1 : {pfirst=("<<pfirst.X()<<" "<<pfirst.Y()<<"),first="<<first<<"\n";
- cout<<" plast =("<<plast.X()<<" "<<plast.Y()<<"),last="<<last<<"}"<<endl;}
+ cout<<" plast =("<<plast.X()<<" "<<plast.Y()<<"),last="<<last<<"}"<<endl;
+ }
#endif
-
}
else {
Handle(Geom2d_Curve) PC2on1; Handle(Geom_Curve) NC;
Standard_Boolean dgE2 = BRep_Tool::Degenerated(myEdge2);
- if (dgE2) { //xpu210998 : cto900Q3
+ if (dgE2)
+ { //xpu210998 : cto900Q3
TopExp_Explorer exv(myEdge2,TopAbs_VERTEX);
const TopoDS_Vertex& v2 = TopoDS::Vertex(exv.Current());
gp_Pnt pt2 = BRep_Tool::Pnt(v2);
Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1);
Standard_Boolean apex = FUN_tool_onapex(uv2,S1);
if (apex) {
- TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl);
- gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf);
- gp_Pnt ptl = BRep_Tool::Pnt(vl);
-#ifdef DEB
- Standard_Real dl =
-#endif
- pt2.Distance(ptl);
- Standard_Real tolf = BRep_Tool::Tolerance(vf);
-#ifdef DEB
- Standard_Real toll =
-#endif
- BRep_Tool::Tolerance(vl);
- Standard_Boolean onf = (df < tolf);
- TopoDS_Vertex v1 = onf ? vf : vl;
- TopTools_IndexedDataMapOfShapeListOfShape mapVE; TopExp::MapShapesAndAncestors(F1,TopAbs_VERTEX,TopAbs_EDGE,mapVE);
- const TopTools_ListOfShape& Edsanc = mapVE.FindFromKey(v1);
- TopTools_ListIteratorOfListOfShape it(Edsanc);
- for (; it.More(); it.Next()){
- const TopoDS_Edge& ee = TopoDS::Edge(it.Value());
- Standard_Boolean dgee = BRep_Tool::Degenerated(ee);
- if (!dgee) continue;
-// Standard_Real f,l;
- PC2on1 = BRep_Tool::CurveOnSurface(ee,F1,first,last);
- }
+ TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl);
+ gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf);
+ gp_Pnt ptl = BRep_Tool::Pnt(vl);
+ Standard_Real tolf = BRep_Tool::Tolerance(vf);
+ Standard_Boolean onf = (df < tolf);
+ TopoDS_Vertex v1 = onf ? vf : vl;
+ TopTools_IndexedDataMapOfShapeListOfShape mapVE; TopExp::MapShapesAndAncestors(F1,TopAbs_VERTEX,TopAbs_EDGE,mapVE);
+ const TopTools_ListOfShape& Edsanc = mapVE.FindFromKey(v1);
+ TopTools_ListIteratorOfListOfShape it(Edsanc);
+ for (; it.More(); it.Next()){
+ const TopoDS_Edge& ee = TopoDS::Edge(it.Value());
+ Standard_Boolean dgee = BRep_Tool::Degenerated(ee);
+ if (!dgee) continue;
+ PC2on1 = BRep_Tool::CurveOnSurface(ee,F1,first,last);
+ }
}
else {} // NYIxpu210998
} //dgE2
myDomain2.SetValues(pfirst,first,tole,plast,last,tole);
#ifdef DEB
if ( TopOpeBRep_GettracePROEDG() ) {
- cout<<"------------ projection de curve"<<endl;
- cout<<"--- Curve : "<<endl;GeomTools_CurveSet::PrintCurve(NC,cout);
- cout<<"--- nouvelle PCurve : "<<endl;GeomTools_Curve2dSet::PrintCurve2d(PC2on1,cout);
- Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1);
- cout<<"--- sur surface : "<<endl;GeomTools_SurfaceSet::PrintSurface(S1,cout);
- cout<<endl;
+ cout<<"------------ projection de curve"<<endl;
+ cout<<"--- Curve : "<<endl;GeomTools_CurveSet::PrintCurve(NC,cout);
+ cout<<"--- nouvelle PCurve : "<<endl;GeomTools_Curve2dSet::PrintCurve2d(PC2on1,cout);
+ Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1);
+ cout<<"--- sur surface : "<<endl;GeomTools_SurfaceSet::PrintSurface(S1,cout);
+ cout<<endl;
}
#endif
}
Standard_Boolean keep = Keep();
Standard_Integer sts = Status();
Standard_Boolean pos = IsPointOfSegment();
- Standard_Real tol = Tolerance();
-
+
const TopOpeBRepDS_Transition& T1 = Transition(1);
const TopOpeBRepDS_Transition& T2 = Transition(2);
BRepAdaptor_Curve BC( arc );
Standard_Real x = 0.789; Standard_Real parmil = (1-x)*uf + x*ul; //xpu170898
gp_Pnt pmil = BC.Value(parmil);
-
+
#ifdef DEB
Standard_Boolean trc = TopOpeBRep_GettraceBIPS();
-#ifdef DRAW
- if (trc) {TCollection_AsciiString aa("pmil"); FUN_brep_draw(aa,pmil);}
+ #ifdef DRAW
+ if (trc) {TCollection_AsciiString aa("pmil"); FUN_brep_draw(aa,pmil);}
+ #endif
#endif
-#endif
-
TopAbs_State st = FSC_StatePonFace (pmil,F,*myPShapeClassifier);
return st;
}
VPI.Init(L,Standard_False);
for (; VPI.More(); VPI.Next()) {
const TopOpeBRep_VPointInter& VP = VPI.CurrentVP();
-#ifdef DEB
- Standard_Integer iVP =
-#endif
- VPI.CurrentVPIndex();
Standard_Real p = VP.ParameterOnLine();
pmin = Min(pmin,p);
pmax = Max(pmax,p);
if ( mycheckkeep ) {
while ( More() ) {
const TopOpeBRep_VPointInter& VP = CurrentVP();
-#ifdef DEB
- Standard_Integer iVP =
-#endif
- CurrentVPIndex();
if (VP.Keep()) break;
else myVPointIndex++;
}
if ( mycheckkeep ) {
while ( More() ) {
const TopOpeBRep_VPointInter& VP = CurrentVP();
-#ifdef DEB
- Standard_Integer iVP =
-#endif
- CurrentVPIndex();
if (VP.Keep()) break;
else myVPointIndex++;
}
const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
#ifdef DEB
Standard_Integer iE = STATIC_PURGE_mapeds.Add(E);
-#ifdef DRAW
- if (trc) {TCollection_AsciiString aa = TCollection_AsciiString("e"); FUN_tool_draw(aa,E,iE);}
-#endif
+ #ifdef DRAW
+ if (trc) {TCollection_AsciiString aa = TCollection_AsciiString("e"); FUN_tool_draw(aa,E,iE);}
+ #endif
#endif
+
// myEds :
myEds.Append(E);
// myVEds :
TopExp_Explorer exv(E, TopAbs_VERTEX);
for (; exv.More(); exv.Next()){
- const TopoDS_Vertex& v = TopoDS::Vertex(exv.Current());
+ const TopoDS_Vertex& v = TopoDS::Vertex(exv.Current());
#ifdef DEB
- Standard_Integer iv = STATIC_PURGE_mapv.Add(v);
-#ifdef DRAW
- if (trc) {TCollection_AsciiString bb = TCollection_AsciiString("v"); FUN_tool_draw(bb,v,iv);}
-#endif
+ Standard_Integer iE = STATIC_PURGE_mapeds.Add(E);
+ #ifdef DRAW
+ if (trc) {TCollection_AsciiString bb = TCollection_AsciiString("v"); FUN_tool_draw(bb,v,iv);}
+ #endif
#endif
Standard_Boolean isb = myVEds.IsBound(v);
if (isb) myVEds.ChangeFind(v).Append(E);
TopOpeBRepTool_C2DF OcE2d; Standard_Boolean isOb = CO.UVRep(OcE,OcE2d);
if (!isOb) return Standard_False; // NYIRAISE
-#ifdef DEB
- const TopoDS_Vertex& vce1 =
-#endif
- TopoDS::Vertex(vcE(1));
Standard_Real parvce1 = TopOpeBRepTool_TOOL::ParE(1,cE); gp_Pnt2d UVvce1 = TopOpeBRepTool_TOOL::UVF(parvce1,cE2d);
-#ifdef DEB
- const TopoDS_Vertex& vOce2 =
-#endif
- TopoDS::Vertex(vOcE(2));
+
Standard_Real parvOcE2 = TopOpeBRepTool_TOOL::ParE(2,OcE); gp_Pnt2d UVvOcE2 = TopOpeBRepTool_TOOL::UVF(parvOcE2,OcE2d);
Standard_Real tol = Max(tttuvcE,tttuvOcE);
isonOcE2d = (UVvce1.Distance(UVvOcE2) < tol);
TopOpeBRepTool_C2DF OcE2d; Standard_Boolean isOb = UVRep(OcE,OcE2d);
if (!isOb) return Standard_False; // NYIRAISE
-#ifdef DEB
- const TopoDS_Vertex& vce1 =
-#endif
- TopoDS::Vertex(vcE(1));
Standard_Real parvce1 = TopOpeBRepTool_TOOL::ParE(1,cE); gp_Pnt2d UVvce1 = TopOpeBRepTool_TOOL::UVF(parvce1,cE2d);
-#ifdef DEB
- const TopoDS_Vertex& vOce2 =
-#endif
- TopoDS::Vertex(vOcE(2));
+
Standard_Real parvOcE2 = TopOpeBRepTool_TOOL::ParE(2,OcE); gp_Pnt2d UVvOcE2 = TopOpeBRepTool_TOOL::UVF(parvOcE2,OcE2d);
Standard_Real tol = Max(tttuvcE,tttuvOcE);
isoncE = (UVvce1.Distance(UVvOcE2) < tol);
if (isoncE && (nfy != 1)) {// cto009L2
- return Standard_False;
+ return Standard_False;
}
}
Standard_Real tttuvOcE = Max(Tol(1,tttolOcE),Tol(2,tttolOcE));
TopOpeBRepTool_C2DF OcE2d; Standard_Boolean isOb = UVRep(OcE,OcE2d);
if (!isOb) return Standard_False; // NYIRAISE
-#ifdef DEB
- const TopoDS_Vertex& vce1 = TopoDS::Vertex(vcE(1));
-#endif
+
Standard_Real parvce1 = TopOpeBRepTool_TOOL::ParE(1,cE); gp_Pnt2d UVvce1 = TopOpeBRepTool_TOOL::UVF(parvce1,cE2d);
-#ifdef DEB
- const TopoDS_Vertex& vOce2 =
-#endif
- TopoDS::Vertex(vOcE(2));
+
Standard_Real parvOcE2 = TopOpeBRepTool_TOOL::ParE(2,OcE); gp_Pnt2d UVvOcE2 = TopOpeBRepTool_TOOL::UVF(parvOcE2,OcE2d);
Standard_Real tol = Max(tttuvcE,tttuvOcE);
isonOcE2d = (UVvce1.Distance(UVvOcE2) < tol);
for (TopTools_ListIteratorOfListOfShape ite(loe); ite.More(); ite.Next()) {
const TopoDS_Edge& e = TopoDS::Edge(ite.Value());
TopAbs_Orientation oe = e.Orientation();
+
#ifdef DEB
- Standard_Integer ie = STATIC_PURGE_mapeds.Add(e);
- if (trc) {cout<<" : on e"<<ie<<endl;}
+ Standard_Integer ie = STATIC_PURGE_mapeds.Add(e);
+ if (trc) {cout<<" : on e"<<ie<<endl;}
#endif
+
if (e.IsSame(E)) continue;
if (M_INTERNAL(oe) || M_EXTERNAL(oe)) continue;
-
-#ifdef DEB
- Standard_Real tttole =
-#endif
- BRep_Tool::Tolerance(e);
Standard_Boolean isb = myERep2d.IsBound(e);
if (!isb) {FUN_RaiseError(); return Standard_False;}
Standard_Real tole = BRep_Tool::Tolerance(e);
TopoDS_Vertex vf,vl; TopExp::Vertices(e,vf,vl);
-#ifdef DEB
- Standard_Real parf =
-#endif
- BRep_Tool::Parameter(vf,e);
-#ifdef DEB
- Standard_Real parl =
-#endif
- BRep_Tool::Parameter(vl,e);
+
TopoDS_Edge newe = faultyE;
// TopoDS_Edge newe; FUN_ds_CopyEdge(e,newe); newe.Orientation(TopAbs_FORWARD);
// vf.Orientation(TopAbs_FORWARD); BB.Add(newe,vf); FUN_ds_Parameter(newe,vf,parf);
Standard_Real tolef= tolef1;
if (tolef2>tolef) tolef=tolef2;
//jmb le 30 juillet 99. on ne multiplie pas la tolerance par la dimension de la piece
- // Standard_Real tolbox = tolef*dx;
- Standard_Real tolbox = tolef;
-
- Standard_Real tolmin = Precision::Confusion();
Deflection=0.01;
MaxUV=0.01;
Standard_Real Front = MyViewContext.ZClippingFrontPlane() ;
Standard_Real Back = MyViewContext.ZClippingBackPlane() ;
- Standard_Real focale= Focale();
MyViewMapping.SetFrontPlaneDistance(Zmax) ;
MyViewMapping.SetBackPlaneDistance(-Zmax) ;
Zeye = Zrp*Zpn + Dx*XZ + Dy*YZ + Dz*ZZ ;
Zrp = sqrt( Xeye*Xeye + Yeye*Yeye + Zeye*Zeye ) ;
V3d_BadValue_Raise_if( Zrp <= 0. ,"V3d_View::Move:: Eye,At are Confused");
-#ifdef DEB
- Standard_Real focale =
-#endif
- Focale();
+
Prp.SetCoord(Xrp,Yrp,Zrp) ;
MyViewMapping.SetProjectionReferencePoint(Prp) ;
Xpn = Xeye / Zrp ; Ypn = Yeye / Zrp ; Zpn = Zeye / Zrp ;
MyView->SetViewOrientation(MyViewOrientation) ;
// Check ZClipping planes
-#ifdef IMP020300
MyView->SetViewMapping(MyViewMapping) ;
SetZSize(0.);
-#else
- Standard_Real Zmax,Xat,Yat,Zat ;
- MyViewReferencePoint.Coord(Xat,Yat,Zat) ;
- Xeye += Xat ; Yeye += Yat ; Zeye += Zat ;
- Zmax = sqrt( Xeye*Xeye + Yeye*Yeye + Zeye*Zeye ) ;
- if( Zmax > MyViewMapping.FrontPlaneDistance() &&
- MyProjModel == V3d_TPM_SCREEN ) {
- SetZSize(2.*Zmax+Zmax*Zmargin) ;
- } else {
- if( MyType == V3d_PERSPECTIVE ) {
- SetFocale(focale) ;
- }
- MyView->SetViewMapping(MyViewMapping) ;
- }
-#endif
ImmediateUpdate();
}
Zrp = sqrt( Xeye*Xeye + Yeye*Yeye + Zeye*Zeye ) ;
V3d_BadValue_Raise_if( Zrp <= 0. ,"V3d_View::Move:: Eye,At are Confused");
-#ifdef DEB
- Standard_Real focale =
-#endif
- Focale();
Prp.SetCoord(Xrp,Yrp,Zrp) ;
MyViewMapping.SetProjectionReferencePoint(Prp) ;
Xpn = Xeye / Zrp ; Ypn = Yeye / Zrp ; Zpn = Zeye / Zrp ;
{
// To test linking against OpenGl_Workspace and all aspect classes
const OpenGl_AspectLine* aLA = theWorkspace->AspectLine(0);
- const OpenGl_AspectFace* aFA = theWorkspace->AspectFace(0);
const OpenGl_AspectMarker* aMA = theWorkspace->AspectMarker(0);
aMA->Type();
const OpenGl_AspectText* aTA = theWorkspace->AspectText(0);
if( !DragFirst )
{
HDC hdc = GetDC( hwnd );
- HGDIOBJ anObj = SelectObject( hdc, GetStockObject( WHITE_PEN ) );
SelectObject( hdc, GetStockObject( HOLLOW_BRUSH ) );
SetROP2( hdc, R2_NOT );
Rectangle( hdc, X_ButtonPress, Y_ButtonPress, X_Motion, Y_Motion );
// Convert
TopLoc_Location L;
- Standard_Integer iprogress = 0, prev_progress = 0;
+ Standard_Integer iprogress = 0;
Standard_Integer n1, n2, n3;
Standard_Integer ixmin, iymin, izmin, ixmax, iymax, izmax;
Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
// Convert
TopLoc_Location L;
- Standard_Integer iprogress = 0, prev_progress = 0;
+ Standard_Integer iprogress = 0;
Standard_Integer n1, n2, n3;
Standard_Integer ixmin, iymin, izmin, ixmax, iymax, izmax;
Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
aStatus = VrmlData_VrmlFormatError;
else {
theBuffer.LinePtr++;
- while (~0) {
+ for(;;) {
gp_XY anXY;
if (!OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
break;
aStatus = VrmlData_VrmlFormatError;
else {
theBuffer.LinePtr++;
- while (~0) {
+ for(;;) {
gp_XYZ anXYZ;
if (!OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
break;
// if (myStatus == StatusOK)
// myStatus = ReadLine (aBuffer);
// Read VRML data by nodes
- while (~0) {
+ for(;;) {
if (!VrmlData_Node::OK(myStatus, ReadLine(aBuffer))) {
if (myStatus == VrmlData_EndOfFile)
myStatus = VrmlData_StatusOK;
TopLoc_Location aL;
Standard_Boolean found = Standard_False;
- for(i = 1; Standard_True; i++) {
+ for(i = 1; ; i++) {
BRep_Tool::PolygonOnTriangulation(aEdge, aPT, aT, aL, i);
myIDDA = min( k, myIDDA );
HPEN hpo = SelectPen( myHDC, GetStockObject ( NULL_PEN ) );
- while ( TRUE ) {
+ for(;;) {
if ( myPRlen == 0 ) {
ddap.pp = myDDA1;
LineDDA ( myStart.x, myStart.y, p -> x, p -> y, &___auxDDAF, ( LPARAM )&ddap );
- while ( TRUE ) {
+ for(;;) {
if ( myPRlen == 0 ) {
return Standard_True;
}
-static Standard_Boolean ConvertBitmap (HBITMAP theHBitmap,
- Image_PixMap& thePixMap)
-{
- // Get informations about the bitmap
- BITMAP aBitmap;
- if (GetObject (theHBitmap, sizeof(BITMAP), (LPSTR )&aBitmap) == 0)
- {
- return Standard_False;
- }
-
- const Standard_Size aSizeRowBytes = Standard_Size(aBitmap.bmWidth) * 4;
- if (!thePixMap.InitTrash (Image_PixMap::ImgBGR32, Standard_Size(aBitmap.bmWidth), Standard_Size(aBitmap.bmHeight), aSizeRowBytes))
- {
- return Standard_False;
- }
- thePixMap.SetTopDown (false);
-
- // Setup image data
- BITMAPINFOHEADER aBitmapInfo;
- memset (&aBitmapInfo, 0, sizeof(BITMAPINFOHEADER));
- aBitmapInfo.biSize = sizeof(BITMAPINFOHEADER);
- aBitmapInfo.biWidth = aBitmap.bmWidth;
- aBitmapInfo.biHeight = aBitmap.bmHeight; // positive means bottom-up!
- aBitmapInfo.biPlanes = 1;
- aBitmapInfo.biBitCount = 32; // use 32bit for automatic word-alignment per row
- aBitmapInfo.biCompression = BI_RGB;
-
- // Copy the pixels
- HDC aDC = GetDC (NULL);
- Standard_Boolean isSuccess = GetDIBits (aDC, theHBitmap,
- 0, // first scan line to set
- aBitmap.bmHeight, // number of scan lines to copy
- thePixMap.ChangeData(), // array for bitmap bits
- (LPBITMAPINFO )&aBitmapInfo, // bitmap data info
- DIB_RGB_COLORS) != 0;
- ReleaseDC (NULL, aDC);
- return isSuccess;
-}
-
//***//
//******************************* Ratio **********************************//
//***//
{
char mess[100];
Sprintf (mess,command,varname);
-#ifdef DEB
- IFSelect_ReturnStatus stat =
-#endif
- thepilot->Execute (mess);
+ thepilot->Execute (mess);
return 1; // stat ?
}
TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
aStepReader.FileUnits( anUnitLengthNames,anUnitAngleNames,anUnitSolidAngleNames);
- Standard_Integer i =1, nb = anUnitLengthNames.Length();
+ Standard_Integer i =1;
di<<"=====================================================\n";
di<<"LENTH Unit"<<"\n";
for( ; i <= anUnitLengthNames.Length() ; i++)
str.Allocate(12 * intArray.Length() + 1);
Standard_Integer i = aL;
- while (1)
+ for (;;)
{
- const Standard_Integer& intValue = intArray.Value(i);
- iChar += Sprintf(&(str[iChar]), "%d ", intValue);
+ iChar += Sprintf(&(str[iChar]), "%d ", intArray.Value(i));
if (i >= anU)
break;
++i;
//Value = Array
TCollection_AsciiString aValueStr2;
Standard_Integer j = anArr1.Lower();
- while (1) {
+ for(;;) {
aValueStr2 += TCollection_AsciiString(anArr1.Value(j));
if (j >= anArr1.Upper()) break;
aValueStr2 += ' ';
//Value = Array
TCollection_AsciiString aValueStr2;
Standard_Integer j = anArr1.Lower();
- while (1) {
+ for(;;) {
#ifndef OCC6010
aValueStr2 += TCollection_AsciiString(anArr1.Value(j));
#else
str.Allocate(25 * realArray.Length() + 1);
Standard_Integer i = aL;
- while (1)
+ for (;;)
{
- const Standard_Real& dblValue = realArray.Value(i);
- iChar += Sprintf(&(str[iChar]), "%.17g ", dblValue);
+ iChar += Sprintf(&(str[iChar]), "%.17g ", realArray.Value(i));
if (i >= anU)
break;
++i;
memcpy (aTarget, aRefPrefix, sizeof (aRefPrefix) - 1);
char * aTargetPtr = aTarget + (sizeof (aRefPrefix) - 1);
- while (1) {
+ for(;;) {
// Check for the end-of-string; find the delimeter ':'
aPtr = strchr (aTagEntry, ':');
if (aPtr == NULL) break;
gp_XYZ Temploc = loc;
// Standard_Real Tempscale = scale;
gp_Mat Tempmatrix (matrix);
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add (Temploc.Multiplied (matrix));
matrix.Multiply (Tempmatrix);
gp_XY Temploc = loc;
// Standard_Real Tempscale = scale;
gp_Mat2d Tempmatrix (matrix);
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add (Temploc.Multiplied (matrix));
matrix.Multiply (Tempmatrix);
if (Npower < 0) Npower = - Npower;
Npower--;
gp_Mat Temp = *this;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) Multiply (Temp);
if (Npower == 1) break;
Temp.Multiply (Temp);
if (Npower < 0) Npower = - Npower;
Npower--;
gp_Mat2d Temp = *this;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) Multiply (Temp);
if (Npower == 1) break;
Temp.Multiply (Temp);
if (Npower < 0) Npower = - Npower;
Npower--;
gp_XYZ Temploc = loc;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) loc.Add (Temploc);
if (Npower == 1) break;
Temploc.Add (Temploc);
Npower--;
gp_XYZ Temploc = loc;
Standard_Real Tempscale = scale;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add (Temploc.Multiplied(scale));
scale = scale * Tempscale;
Npower--;
gp_Mat Tempmatrix (matrix);
if (loc.X() == 0.0 && loc.Y() == 0.0 && loc.Z() == 0.0) {
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) matrix.Multiply (Tempmatrix);
if (Npower == 1) break;
Tempmatrix.Multiply (Tempmatrix);
}
else {
gp_XYZ Temploc = loc;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add (Temploc.Multiplied (matrix));
matrix.Multiply (Tempmatrix);
gp_XYZ Temploc = loc;
Standard_Real Tempscale = scale;
gp_Mat Tempmatrix (matrix);
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add ((Temploc.Multiplied (matrix)).Multiplied (scale));
scale = scale * Tempscale;
if (Npower < 0) Npower = - Npower;
Npower--;
gp_XY Temploc = loc;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) loc.Add (Temploc);
if (Npower == 1) break;
Temploc.Add (Temploc);
Npower--;
gp_XY Temploc = loc;
Standard_Real Tempscale = scale;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add (Temploc.Multiplied(scale));
scale = scale * Tempscale;
Npower--;
gp_Mat2d Tempmatrix (matrix);
if (loc.X() == 0.0 && loc.Y() == 0.0) {
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) matrix.Multiply (Tempmatrix);
if (Npower == 1) break;
Tempmatrix.Multiply (Tempmatrix);
}
else {
gp_XY Temploc = loc;
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add (Temploc.Multiplied (matrix));
matrix.Multiply (Tempmatrix);
gp_XY Temploc = loc;
Standard_Real Tempscale = scale;
gp_Mat2d Tempmatrix (matrix);
- while (1) {
+ for(;;) {
if (IsOdd(Npower)) {
loc.Add ((Temploc.Multiplied (matrix)).Multiplied (scale));
scale = scale * Tempscale;
static Standard_Real Improve(const Standard_Integer N, Standard_Real *Poly, const Standard_Real IniSol) {
- Standard_Real Val, Der, Delta;
+ Standard_Real Val = 0., Der, Delta;
Standard_Real Sol = IniSol;
Standard_Real IniVal = Value(N, Poly, IniSol);
Standard_Integer Index;
set mistake 0
set i 0
while { $mistake != 1 && $i <= 5 } {
- set j 0
- while { $mistake != 1 && $j <= 5 } {
- set position_x [expr ${x_start} + $j]
- set position_y [expr ${y_start} + $i]
- puts $position_x
- puts $position_y
- global color2d
- if { [info exists color2d] } {
- set color [ QAAISGetPixelColor2d ${position_x} ${position_y} ]
- } else {
- set color [ QAGetPixelColor ${position_x} ${position_y} ]
- }
- regexp {RED +: +([-0-9.+eE]+)} $color full rd
- regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
- regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
- set rd_int [expr int($rd * 1.e+05)]
- set gr_int [expr int($gr * 1.e+05)]
- set bl_int [expr int($bl * 1.e+05)]
-
- if { $rd_ch != 0 } {
- set tol_rd [expr abs($rd_ch - $rd_int)/$rd_ch]
- } else {
- set tol_rd $rd_int
- }
- if { $gr_ch != 0 } {
- set tol_gr [expr abs($gr_ch - $gr_int)/$gr_ch]
- } else {
- set tol_gr $gr_int
- }
- if { $bl_ch != 0 } {
- set tol_bl [expr abs($bl_ch - $bl_int)/$bl_ch]
- } else {
- set tol_bl $bl_int
- }
-
- if { $tol_rd > 0.2 || $tol_gr > 0.2 || $tol_bl > 0.2 } {
- puts "Warning : Point with true color was not found near default coordinates"
- set mistake 0
- } else {
- set mistake 1
- }
- incr j
- }
- incr i
+ set j 0
+ while { $mistake != 1 && $j <= 5 } {
+ set position_x [expr ${x_start} + $j]
+ set position_y [expr ${y_start} + $i]
+ puts $position_x
+ puts $position_y
+ global color2d
+ if { [info exists color2d] } {
+ set color [ QAAISGetPixelColor2d ${position_x} ${position_y} ]
+ } else {
+ set color [ QAGetPixelColor ${position_x} ${position_y} ]
+ }
+ regexp {RED +: +([-0-9.+eE]+)} $color full rd
+ regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+ regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+ set rd_int [expr int($rd * 1.e+05)]
+ set gr_int [expr int($gr * 1.e+05)]
+ set bl_int [expr int($bl * 1.e+05)]
+
+ if { $rd_ch != 0 } {
+ set tol_rd [expr abs($rd_ch - $rd_int)/$rd_ch]
+ } else {
+ set tol_rd $rd_int
+ }
+ if { $gr_ch != 0 } {
+ set tol_gr [expr abs($gr_ch - $gr_int)/$gr_ch]
+ } else {
+ set tol_gr $gr_int
+ }
+ if { $bl_ch != 0 } {
+ set tol_bl [expr abs($bl_ch - $bl_int)/$bl_ch]
+ } else {
+ set tol_bl $bl_int
+ }
+
+ if { $tol_rd > 0.2 || $tol_gr > 0.2 || $tol_bl > 0.2 } {
+ puts "Warning : Point with true color was not found near default coordinates"
+ set mistake 0
+ } else {
+ set mistake 1
+ }
+ incr j
+ }
+ incr i
}
return $mistake
}
puts "BLUE color of RGB is $bl_get"
if { $coord_x <= 1 || $coord_y <= 1 } {
- puts "Error : minimal coordinate is x = 2, y = 2. But we have x = $coord_x y = $coord_y"
- return -1
+ puts "Error : minimal coordinate is x = 2, y = 2. But we have x = $coord_x y = $coord_y"
+ return -1
}
global color2d
- if { [info exists color2d] } {
- set color [ QAAISGetPixelColor2d ${coord_x} ${coord_y} ]
- } else {
- set color [ QAGetPixelColor ${coord_x} ${coord_y} ]
- }
+ if { [info exists color2d] } {
+ set color [ QAAISGetPixelColor2d ${coord_x} ${coord_y} ]
+ } else {
+ set color [ QAGetPixelColor ${coord_x} ${coord_y} ]
+ }
regexp {RED +: +([-0-9.+eE]+)} $color full rd
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
set bl_ch [expr int($bl_get * 1.e+05)]
if { $rd_ch != 0 } {
- set tol_rd [expr abs($rd_ch - $rd_int)/$rd_ch]
+ set tol_rd [expr abs($rd_ch - $rd_int)/$rd_ch]
} else {
- set tol_rd $rd_int
+ set tol_rd $rd_int
}
if { $gr_ch != 0 } {
- set tol_gr [expr abs($gr_ch - $gr_int)/$gr_ch]
+ set tol_gr [expr abs($gr_ch - $gr_int)/$gr_ch]
} else {
- set tol_gr $gr_int
+ set tol_gr $gr_int
}
if { $bl_ch != 0 } {
- set tol_bl [expr abs($bl_ch - $bl_int)/$bl_ch]
+ set tol_bl [expr abs($bl_ch - $bl_int)/$bl_ch]
} else {
- set tol_bl $bl_int
+ set tol_bl $bl_int
}
set status 0
if { $tol_rd > 0.2 } {
- puts "Warning : RED light of additive color model RGB is invalid"
- set status 1
+ puts "Warning : RED light of additive color model RGB is invalid"
+ set status 1
}
if { $tol_gr > 0.2 } {
- puts "Warning : GREEN light of additive color model RGB is invalid"
- set status 1
+ puts "Warning : GREEN light of additive color model RGB is invalid"
+ set status 1
}
if { $tol_bl > 0.2 } {
- puts "Warning : BLUE light of additive color model RGB is invalid"
- set status 1
+ puts "Warning : BLUE light of additive color model RGB is invalid"
+ set status 1
}
if { $status != 0 } {
- puts "Warning : Colors of default coordinate are not equal"
+ puts "Warning : Colors of default coordinate are not equal"
}
global stat
if { $tol_rd > 0.2 || $tol_gr > 0.2 || $tol_bl > 0.2 } {
- set info [checkpoint $coord_x $coord_y $rd_ch $gr_ch $bl_ch]
- set stat [lindex $info end]
- if { ${stat} != 1 } {
- puts "Error : Colors are not equal in default coordinate and in the near coordinates too"
- return $stat
- } else {
- puts "Point with valid color was found"
- return $stat
- }
+ set info [checkpoint $coord_x $coord_y $rd_ch $gr_ch $bl_ch]
+ set stat [lindex $info end]
+ if { ${stat} != 1 } {
+ puts "Error : Colors are not equal in default coordinate and in the near coordinates too"
+ return $stat
+ } else {
+ puts "Point with valid color was found"
+ return $stat
+ }
} else {
- set stat 1
+ set stat 1
}
}
set prop "square"
set mass $square
if { [info exists tol_square] } {
- regexp {Mass +: +([-0-9.+eE]+)} [sprops result $tol_square] full m
+ regexp {Mass +: +([-0-9.+eE]+)} [sprops result $tol_square] full m
} else {
- regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
+ regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
}
}
if { [info exists length] } {
#if mass (length or square) is empty in test case then result should be an empty shape.
if { [info exists mass] } {
if { [string compare $subgroup "moddata"] != 0 } {
- puts "checkshape"
- checkshape result
+ puts "checkshape"
+ checkshape result
}
if { [string compare "$mass" "empty"] != 0 } {
- if { $m == 0 } {
- puts "Error : The command is not valid. The $prop is 0."
- }
- if { $mass > 0 } {
- puts "The expected $prop is $mass"
- }
- #check of change of square is < 1%
- if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
- puts "Error : The $prop of result shape is $m"
- }
+ if { $m == 0 } {
+ puts "Error : The command is not valid. The $prop is 0."
+ }
+ if { $mass > 0 } {
+ puts "The expected $prop is $mass"
+ }
+ #check of change of square is < 1%
+ if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
+ puts "Error : The $prop of result shape is $m"
+ }
} else {
- if { $m != 0 } {
- puts "Error : The command is not valid. The $prop is $m"
- }
+ if { $m != 0 } {
+ puts "Error : The command is not valid. The $prop is $m"
+ }
}
}
set glob_inf [info global nb_*_good]
if { [regexp "nb_.*_good" $glob_inf] == 1 } {
if { [info exists nbsh_t] } {
- set nb_info [nbshapes result -t]
+ set nb_info [nbshapes result -t]
} else {
- set nb_info [nbshapes result]
+ set nb_info [nbshapes result]
}
}
puts "Error : area by triangles differs from the actual area by $rel_err %"
} else {
if { $rel_tol > 1 && $rel_tol < 100 } {
- puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol"
+ puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol"
}
}
}
if { [isdraw result] } {
if { [info exists 2dviewer] } {
- clear
- smallview
- donly result
- fit
- xwd $imagedir/${test_image}.png
+ clear
+ smallview
+ donly result
+ fit
+ xwd $imagedir/${test_image}.png
}
if { [info exists 3dviewer] } {
#for multiview support: dump result from all opened views
-puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
-puts "TODO OCC12345 ALL: Faulty : mistakes are found in checked shape by checkshape command"
-puts "TODO OCC12345 ALL: Error : The square of result shape is"
-
+puts "TODO OCC12345 windows: Faulty shapes in variables faulty_1 to faulty_"
puts "=========="
puts "BUC60462"
bfuse result a b
puts "Fuse end"
-set che [checkshape result r]
-if { [regexp {OK} $che] != 1 } {
- puts "Faulty : mistakes are found in checked shape by checkshape command"
-} else {
- puts "Checking by checkshape - OK"
-}
+checkshape result r
-set square 0
+set square 89562.1
set 2dviewer 0