HLRAlgo::InitMinMax(Precision::Infinite(),
(Standard_Address)TotMin,
(Standard_Address)TotMax);
- HLRBRep_EdgeData* ed;
- HLRBRep_FaceData* fd;
- ed = &(myEData.ChangeValue(1));
// compute the global MinMax
// *************************
// for (Standard_Integer edge = 1; edge <= myNbEdges; edge++) {
Standard_Integer edge;
for ( edge = 1; edge <= myNbEdges; edge++) {
- HLRBRep_Curve& EC = ed->ChangeGeometry();
+ HLRBRep_EdgeData& ed = myEData.ChangeValue(edge);
+ HLRBRep_Curve& EC = ed.ChangeGeometry();
EC.Projector(&myProj);
Standard_Real enl =EC.Update((Standard_Address)TotMin,
(Standard_Address)TotMax);
if (enl > tolMinMax) tolMinMax = enl;
- ed++;
}
HLRAlgo::EnlargeMinMax(tolMinMax,
(Standard_Address)TotMin,
Standard_Real tol;
Standard_Boolean ver1,ver2;
- ed = &(myEData.ChangeValue(1));
- fd = &(myFData.ChangeValue(1));
-
// update the edges
// ****************
for (edge = 1; edge <= myNbEdges; edge++) {
- HLRBRep_Curve& EC = ed->ChangeGeometry();
+ HLRBRep_EdgeData& ed = myEData.ChangeValue(edge);
+ HLRBRep_Curve& EC = ed.ChangeGeometry();
HLRAlgo::InitMinMax(Precision::Infinite(),
(Standard_Address)TotMin,
(Standard_Address)TotMax);
tolMinMax = EC.UpdateMinMax((Standard_Address)TotMin,
(Standard_Address)TotMax);
- tol = (Standard_Real)(ed->Tolerance());
- ed->Vertical(TotMax[0] - TotMin[0] < tol &&
+ tol = (Standard_Real)(ed.Tolerance());
+ ed.Vertical(TotMax[0] - TotMin[0] < tol &&
TotMax[1] - TotMin[1] < tol &&
TotMax[2] - TotMin[2] < tol &&
TotMax[3] - TotMin[3] < tol &&
HLRAlgo::EncodeMinMax((Standard_Address)EdgeMin,
(Standard_Address)EdgeMax,
(Standard_Address)MinMaxEdge);
- ed->UpdateMinMax((Standard_Address)MinMaxEdge);
- if (ed->Vertical()) {
+ ed.UpdateMinMax((Standard_Address)MinMaxEdge);
+ if (ed.Vertical()) {
ver1 = Standard_True;
ver2 = Standard_True;
- Standard_Integer vsta = ed->VSta();
- Standard_Integer vend = ed->VEnd();
- Standard_Boolean vout = ed->OutLVSta() || ed->OutLVEnd();
- Standard_Boolean vcut = ed->CutAtSta() || ed->CutAtEnd();
- HLRBRep_EdgeData* eb = &(myEData.ChangeValue(1));
+ Standard_Integer vsta = ed.VSta();
+ Standard_Integer vend = ed.VEnd();
+ Standard_Boolean vout = ed.OutLVSta() || ed.OutLVEnd();
+ Standard_Boolean vcut = ed.CutAtSta() || ed.CutAtEnd();
for (Standard_Integer ebis = 1; ebis <= myNbEdges; ebis++) {
- if (vsta == eb->VSta()) {
- eb->VSta (vend);
- eb->OutLVSta(vout);
- eb->CutAtSta(vcut);
+ HLRBRep_EdgeData& eb = myEData.ChangeValue(ebis);
+ if (vsta == eb.VSta()) {
+ eb.VSta (vend);
+ eb.OutLVSta(vout);
+ eb.CutAtSta(vcut);
}
- else if (vsta == eb->VEnd()) {
- eb->VEnd (vend);
- eb->OutLVEnd(vout);
- eb->CutAtEnd(vcut);
+ else if (vsta == eb.VEnd()) {
+ eb.VEnd (vend);
+ eb.OutLVEnd(vout);
+ eb.CutAtEnd(vcut);
}
- eb++;
}
}
else {
ver2 = Abs(Dir2.X()) + Abs(Dir2.Y()) < myToler * 10;
}
}
- ed->VerAtSta(ed->Vertical() || ver1);
- ed->VerAtEnd(ed->Vertical() || ver2);
- ed->AutoIntersectionDone(Standard_True);
- ed->Simple(Standard_True);
- ed++;
+ ed.VerAtSta(ed.Vertical() || ver1);
+ ed.VerAtEnd(ed.Vertical() || ver2);
+ ed.AutoIntersectionDone(Standard_True);
+ ed.Simple(Standard_True);
}
// update the faces
for (Standard_Integer face = 1; face <= myNbFaces; face++) {
- HLRBRep_Surface& FS = fd->Geometry();
- iFaceGeom = &(fd->Geometry());
+ HLRBRep_FaceData& fd = myFData.ChangeValue(face);
+ HLRBRep_Surface& FS = fd.Geometry();
+ iFaceGeom = &(fd.Geometry());
mySLProps.SetSurface(iFaceGeom);
FS.Projector(&myProj);
iFaceType = FS.GetType();
Standard_Boolean cut = Standard_False;
Standard_Boolean withOutL = Standard_False;
- for (myFaceItr1.InitEdge(*fd);
+ for (myFaceItr1.InitEdge(fd);
myFaceItr1.MoreEdge();
myFaceItr1.NextEdge()) {
if (myFaceItr1.Internal()) {
if (myFaceItr1.Double()) cut = Standard_True;
}
}
- fd->Cut (cut);
- fd->WithOutL(withOutL);
+ fd.Cut (cut);
+ fd.WithOutL(withOutL);
// Is the face simple = no auto-hiding
// not cut and simple surface
iFaceType == GeomAbs_Cylinder ||
iFaceType == GeomAbs_Cone ||
iFaceType == GeomAbs_Sphere ||
- iFaceType == GeomAbs_Torus )) fd->Simple(Standard_True );
- else fd->Simple(Standard_False);
-
- fd->Plane (iFaceType == GeomAbs_Plane );
- fd->Cylinder(iFaceType == GeomAbs_Cylinder);
- fd->Cone (iFaceType == GeomAbs_Cone );
- fd->Sphere (iFaceType == GeomAbs_Sphere );
- fd->Torus (iFaceType == GeomAbs_Torus );
- tol = (Standard_Real)(fd->Tolerance());
- fd->Side(FS.IsSide(tol,myToler*10));
+ iFaceType == GeomAbs_Torus )) fd.Simple(Standard_True );
+ else fd.Simple(Standard_False);
+
+ fd.Plane (iFaceType == GeomAbs_Plane );
+ fd.Cylinder(iFaceType == GeomAbs_Cylinder);
+ fd.Cone (iFaceType == GeomAbs_Cone );
+ fd.Sphere (iFaceType == GeomAbs_Sphere );
+ fd.Torus (iFaceType == GeomAbs_Torus );
+ tol = (Standard_Real)(fd.Tolerance());
+ fd.Side(FS.IsSide(tol,myToler*10));
Standard_Boolean inverted = Standard_False;
- if (fd->WithOutL() && !fd->Side()) {
- inverted = OrientOutLine(face,*fd);
- OrientOthEdge(face,*fd);
+ if (fd.WithOutL() && !fd.Side()) {
+ inverted = OrientOutLine(face,fd);
+ OrientOthEdge(face,fd);
}
- if (fd->Side()) {
- fd->Hiding(Standard_False);
- fd->Back(Standard_False);
+ if (fd.Side()) {
+ fd.Hiding(Standard_False);
+ fd.Back(Standard_False);
}
- else if (!fd->WithOutL()) {
+ else if (!fd.WithOutL()) {
Standard_Real p,pu,pv,r;
- fd->Back(Standard_False);
+ fd.Back(Standard_False);
Standard_Boolean found = Standard_False;
- for (myFaceItr1.InitEdge(*fd);
+ for (myFaceItr1.InitEdge(fd);
myFaceItr1.MoreEdge() && !found;
myFaceItr1.NextEdge()) {
myFE = myFaceItr1.Edge ();
myFEOutLine = myFaceItr1.OutLine ();
myFEInternal = myFaceItr1.Internal ();
myFEDouble = myFaceItr1.Double ();
- HLRBRep_EdgeData* EDataFE1 = &(myEData(myFE));
+ HLRBRep_EdgeData& EDataFE1 = myEData(myFE);
if (!myFEDouble &&
(myFEOri == TopAbs_FORWARD ||
myFEOri == TopAbs_REVERSED)) {
- myFEGeom = &(EDataFE1->ChangeGeometry());
- const HLRBRep_Curve& EC = EDataFE1->Geometry();
+ myFEGeom = &(EDataFE1.ChangeGeometry());
+ const HLRBRep_Curve& EC = EDataFE1.Geometry();
p = EC.Parameter3d((EC.LastParameter () +
EC.FirstParameter()) / 2);
if (HLRBRep_EdgeFaceTool::UVPoint(p,myFEGeom,iFaceGeom,pu,pv)) {
}
else r = Nm.Z();
if (Abs(r) > myToler*10) {
- fd->Back( r < 0 );
+ fd.Back( r < 0 );
found = Standard_True;
break;
}
}
if (!found) {
- fd->Side(Standard_True);
- fd->Hiding(Standard_False);
- fd->Back(Standard_False);
+ fd.Side(Standard_True);
+ fd.Hiding(Standard_False);
+ fd.Back(Standard_False);
}
- else if (fd->Closed()) {
- switch (fd->Orientation()) {
- case TopAbs_REVERSED : fd->Hiding( fd->Back() ); break;
- case TopAbs_FORWARD : fd->Hiding(!fd->Back() ); break;
- case TopAbs_EXTERNAL : fd->Hiding(Standard_True ); break;
- case TopAbs_INTERNAL : fd->Hiding(Standard_False); break;
+ else if (fd.Closed()) {
+ switch (fd.Orientation()) {
+ case TopAbs_REVERSED : fd.Hiding( fd.Back() ); break;
+ case TopAbs_FORWARD : fd.Hiding(!fd.Back() ); break;
+ case TopAbs_EXTERNAL : fd.Hiding(Standard_True ); break;
+ case TopAbs_INTERNAL : fd.Hiding(Standard_False); break;
}
}
- else fd->Hiding(Standard_True);
+ else fd.Hiding(Standard_True);
}
else {
if (inverted) {
- fd->Hiding(Standard_False);
- fd->Back(Standard_True);
+ fd.Hiding(Standard_False);
+ fd.Back(Standard_True);
}
else {
- fd->Hiding(Standard_True);
- fd->Back(Standard_False);
+ fd.Hiding(Standard_True);
+ fd.Back(Standard_False);
}
}
Standard_Boolean FirstTime = Standard_True;
- for (myFaceItr1.InitEdge(*fd);
+ for (myFaceItr1.InitEdge(fd);
myFaceItr1.MoreEdge();
myFaceItr1.NextEdge()) {
myFE = myFaceItr1.Edge();
- HLRBRep_EdgeData* EDataFE2 = &(myEData(myFE));
- if (!fd->Simple()) EDataFE2->AutoIntersectionDone(Standard_False);
- HLRAlgo::DecodeMinMax(EDataFE2->MinMax(),
+ HLRBRep_EdgeData& EDataFE2 = myEData(myFE);
+ if (!fd.Simple()) EDataFE2.AutoIntersectionDone(Standard_False);
+ HLRAlgo::DecodeMinMax(EDataFE2.MinMax(),
(Standard_Address)EdgeMin,
(Standard_Address)EdgeMax);
if (myFaceItr1.BeginningOfWire())
HLRAlgo::EncodeMinMax((Standard_Address)FaceMin,
(Standard_Address)FaceMax,
(Standard_Address)MinMaxFace);
- fd->Wires()->UpdateMinMax((Standard_Address)MinMaxFace);
- fd->Size(HLRAlgo::SizeBox(FaceMin,FaceMax));
- fd++;
+ fd.Wires()->UpdateMinMax((Standard_Address)MinMaxFace);
+ fd.Size(HLRAlgo::SizeBox(FaceMin,FaceMax));
}
}
const Standard_Integer e2)
{
myNbrSortEd = 0;
- HLRBRep_EdgeData* ed = &(myEData(e1));
Standard_Address MinMaxShap = MinMaxTot;
for (Standard_Integer e = e1; e <= e2; e++) {
- if (!ed->Status().AllHidden()) {
- myLEMinMax = ed->MinMax();
+ HLRBRep_EdgeData& ed = myEData(e);
+ if (!ed.Status().AllHidden()) {
+ myLEMinMax = ed.MinMax();
if (((MaxShap1 - MinLEdg1) & 0x80008000) == 0 &&
((MaxLEdg1 - MinShap1) & 0x80008000) == 0 &&
((MaxShap2 - MinLEdg2) & 0x80008000) == 0 &&
myEdgeIndices(myNbrSortEd) = e;
}
}
- ed++;
}
}
for (ie1 = 1; ie1 <= ne1; ie1++) {
myFE = eb1->Edge(ie1);
- HLRBRep_EdgeData* ed1 = &(myEData(myFE));
+ HLRBRep_EdgeData& ed1 = myEData(myFE);
if (eb1->Double (ie1) ||
eb1->IsoLine(ie1) ||
- ed1->Vertical()) ed1->Used(Standard_True );
- else ed1->Used(Standard_False);
+ ed1.Vertical()) ed1.Used(Standard_True );
+ else ed1.Used(Standard_False);
if ((eb1->OutLine(ie1) || eb1->Internal(ie1)) &&
- !ed1->Vertical()) {
+ !ed1.Vertical()) {
Standard_Real p,pu,pv,r;
- myFEGeom = &(ed1->ChangeGeometry());
- const HLRBRep_Curve& EC = ed1->Geometry();
- Standard_Integer vsta = ed1->VSta();
- Standard_Integer vend = ed1->VEnd();
+ myFEGeom = &(ed1.ChangeGeometry());
+ const HLRBRep_Curve& EC = ed1.Geometry();
+ Standard_Integer vsta = ed1.VSta();
+ Standard_Integer vend = ed1.VEnd();
if (vsta == 0 &&
vend == 0) p = 0;
else if (vsta == 0) p = EC.Parameter3d(EC.LastParameter ());
cout << "UVPoint not found, OutLine not Oriented" << endl;
#endif
}
- ed1->Used(Standard_True);
+ ed1.Used(Standard_True);
}
}
}
for (ie1 = 1; ie1 <= ne1; ie1++) {
myFE = eb1->Edge (ie1);
myFEOri = eb1->Orientation(ie1);
- HLRBRep_EdgeData* ed1 = &(myEData(myFE));
+ HLRBRep_EdgeData& ed1 = myEData(myFE);
- if (!ed1->Used()) {
- ed1->Used(Standard_True);
- myFEGeom = &(ed1->ChangeGeometry());
- const HLRBRep_Curve& EC = ed1->Geometry();
+ if (!ed1.Used()) {
+ ed1.Used(Standard_True);
+ myFEGeom = &(ed1.ChangeGeometry());
+ const HLRBRep_Curve& EC = ed1.Geometry();
p = EC.Parameter3d((EC.LastParameter () +
EC.FirstParameter()) / 2);
if (HLRBRep_EdgeFaceTool::UVPoint(p,myFEGeom,iFaceGeom,pu,pv)) {
Standard_Integer ShapMin[16],ShapMax[16],MinMaxShap[16];
Standard_Integer TheMin[16],TheMax[16];
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
+ HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
for (i = 1; i <= n; i++) {
Standard_Boolean FirstTime = Standard_True;
Standard_Integer v1,v2,e1,e2,f1,f2;
SB.Bounds(v1,v2,e1,e2,f1,f2);
- HLRBRep_EdgeData* ed = &(myDS->EDataArray (). ChangeValue(e1 - 1));
- HLRBRep_FaceData* fd = &(myDS->FDataArray (). ChangeValue(f1 - 1));
- ed++;
- fd++;
-
for (Standard_Integer e = e1; e <= e2; e++) {
- HLRAlgo::DecodeMinMax(ed->MinMax(),
+ HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
+ HLRAlgo::DecodeMinMax(ed.MinMax(),
(Standard_Address)TheMin,
(Standard_Address)TheMax);
if (FirstTime) {
(Standard_Address)TheMax,
(Standard_Address)ShapMin,
(Standard_Address)ShapMax);
- ed++;
}
for (Standard_Integer f = f1; f <= f2; f++) {
- HLRAlgo::DecodeMinMax(fd->Wires()->MinMax(),
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ HLRAlgo::DecodeMinMax(fd.Wires()->MinMax(),
(Standard_Address)TheMin,
(Standard_Address)TheMax);
HLRAlgo::AddMinMax((Standard_Address)TheMin,
(Standard_Address)TheMax,
(Standard_Address)ShapMin,
(Standard_Address)ShapMax);
- fd++;
}
HLRAlgo::EncodeMinMax((Standard_Address)ShapMin,
(Standard_Address)ShapMax,
Standard_Boolean visible;
HLRBRep_FaceIterator faceIt;
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
- HLRBRep_FaceData* fd = &(myDS->FDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
+ HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
Standard_Integer ne = myDS->NbEdges();
Standard_Integer nf = myDS->NbFaces();
for (Standard_Integer e = 1; e <= ne; e++) {
- if (ed->Selected()) ed->Status().ShowAll();
- ed++;
+ HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
+ if (ed.Selected()) ed.Status().ShowAll();
}
// for (Standard_Integer f = 1; f <= nf; f++) {
Standard_Integer f;
for ( f = 1; f <= nf; f++) {
- if (fd->Selected()) {
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ if (fd.Selected()) {
- for (faceIt.InitEdge(*fd);
+ for (faceIt.InitEdge(fd);
faceIt.MoreEdge();
faceIt.NextEdge()) {
HLRBRep_EdgeData* edf = &(myDS->EDataArray().ChangeValue(faceIt.Edge()));
if (edf->Selected()) edf->Status().HideAll();
}
}
- fd++;
}
- fd = &(myDS->FDataArray().ChangeValue(1));
-
for (f = 1; f <= nf; f++) {
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
visible = Standard_True;
- if (fd->Selected() && fd->Closed()) {
- if ( fd->Side()) visible = Standard_False;
- else if ( !fd->WithOutL()) {
- switch (fd->Orientation()) {
- case TopAbs_REVERSED : visible = fd->Back() ; break;
- case TopAbs_FORWARD : visible = !fd->Back() ; break;
+ if (fd.Selected() && fd.Closed()) {
+ if ( fd.Side()) visible = Standard_False;
+ else if ( !fd.WithOutL()) {
+ switch (fd.Orientation()) {
+ case TopAbs_REVERSED : visible = fd.Back() ; break;
+ case TopAbs_FORWARD : visible = !fd.Back() ; break;
case TopAbs_EXTERNAL :
case TopAbs_INTERNAL : visible = Standard_True; break;
}
}
if (visible) {
- for (faceIt.InitEdge(*fd);
+ for (faceIt.InitEdge(fd);
faceIt.MoreEdge();
faceIt.NextEdge()) {
Standard_Integer E = faceIt.Edge();
edf->Status().ShowAll();
}
}
- fd++;
}
}
void HLRBRep_InternalAlgo::Select ()
{
if (!myDS.IsNull()) {
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
- HLRBRep_FaceData* fd = &(myDS->FDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
+ HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
Standard_Integer ne = myDS->NbEdges();
Standard_Integer nf = myDS->NbFaces();
for (Standard_Integer e = 1; e <= ne; e++) {
- ed->Selected(Standard_True);
- ed++;
+ HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
+ ed.Selected(Standard_True);
}
for (Standard_Integer f = 1; f <= nf; f++) {
- fd->Selected(Standard_True);
- fd++;
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ fd.Selected(Standard_True);
}
}
}
Standard_Integer v1,v2,e1,e2,f1,f2;
myShapes(I).Bounds(v1,v2,e1,e2,f1,f2);
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
- HLRBRep_FaceData* fd = &(myDS->FDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
+ HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
Standard_Integer ne = myDS->NbEdges();
Standard_Integer nf = myDS->NbFaces();
for (Standard_Integer e = 1; e <= ne; e++) {
- ed->Selected(e >= e1 && e <= e2);
- ed++;
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
+ ed.Selected(e >= e1 && e <= e2);
}
for (Standard_Integer f = 1; f <= nf; f++) {
- fd->Selected(f >= f1 && f <= f2);
- fd++;
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ fd.Selected(f >= f1 && f <= f2);
}
}
}
Standard_Integer v1,v2,e1,e2,f1,f2;
myShapes(I).Bounds(v1,v2,e1,e2,f1,f2);
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
Standard_Integer ne = myDS->NbEdges();
for (Standard_Integer e = 1; e <= ne; e++) {
- ed->Selected(e >= e1 && e <= e2);
- ed++;
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
+ ed.Selected(e >= e1 && e <= e2);
}
}
}
Standard_Integer v1,v2,e1,e2,f1,f2;
myShapes(I).Bounds(v1,v2,e1,e2,f1,f2);
- HLRBRep_FaceData* fd = &(myDS->FDataArray().ChangeValue(1));
+ HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
Standard_Integer nf = myDS->NbFaces();
for (Standard_Integer f = 1; f <= nf; f++) {
- fd->Selected(f >= f1 && f <= f2);
- fd++;
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ fd.Selected(f >= f1 && f <= f2);
}
}
}
void HLRBRep_InternalAlgo::ShowAll ()
{
if (!myDS.IsNull()) {
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
Standard_Integer ne = myDS->NbEdges();
for (Standard_Integer ie = 1; ie <= ne; ie++) {
- ed->Status().ShowAll();
- ed++;
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(ie);
+ ed.Status().ShowAll();
}
}
}
Select(I);
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
Standard_Integer ne = myDS->NbEdges();
for (Standard_Integer e = 1; e <= ne; e++) {
- if (ed->Selected()) ed->Status().ShowAll();
- ed++;
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
+ if (ed.Selected()) ed.Status().ShowAll();
}
}
}
void HLRBRep_InternalAlgo::HideAll ()
{
if (!myDS.IsNull()) {
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
Standard_Integer ne = myDS->NbEdges();
for (Standard_Integer ie = 1; ie <= ne; ie++) {
- ed->Status().HideAll();
- ed++;
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(ie);
+ ed.Status().HideAll();
}
}
}
Select(I);
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
Standard_Integer ne = myDS->NbEdges();
for (Standard_Integer e = 1; e <= ne; e++) {
- if (ed->Selected()) ed->Status().HideAll();
- ed++;
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
+ if (ed.Selected()) ed.Status().HideAll();
}
}
}
if (e2 >= e1) {
myDS->InitBoundSort(SB.MinMax(),e1,e2);
HLRBRep_Hider Cache(myDS);
- HLRBRep_EdgeData* ed = &(myDS->EDataArray().ChangeValue(1));
- HLRBRep_FaceData* fd = &(myDS->FDataArray().ChangeValue(1));
+ HLRBRep_Array1OfEData& aEDataArray = myDS->EDataArray();
+ HLRBRep_Array1OfFData& aFDataArray = myDS->FDataArray();
Standard_Integer ne = myDS->NbEdges();
Standard_Integer nf = myDS->NbFaces();
nbFSimp = 0;
for (e = 1; e <= ne; e++) {
- if (ed->Selected()) {
+ HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
+ if (ed.Selected()) {
nbSelEdges++;
- if (!ed->Status().AllHidden()) nbVisEdges++;
+ if (!ed.Status().AllHidden()) nbVisEdges++;
}
- ed++;
}
for (f = 1; f <= nf; f++) {
- if (fd->Selected()) {
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ if (fd.Selected()) {
nbSelFaces++;
- if (fd->Hiding()) nbCache++;
- if (fd->Side ()) nbFSide++;
- if (fd->Simple()) nbFSimp++;
+ if (fd.Hiding()) nbCache++;
+ if (fd.Side ()) nbFSide++;
+ if (fd.Simple()) nbFSimp++;
}
- fd++;
}
if (myDebug)
}
}
+ if (nf == 0)
+ return;
+
Standard_Integer QWE=0,QWEQWE;
QWEQWE=nf/10;
if (SideFace) {
j = 0;
- fd = &(myDS->FDataArray().ChangeValue(1));
for (f = 1; f <= nf; f++) {
- if (fd->Selected()) {
- if (fd->Side()) {
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ if (fd.Selected()) {
+ if (fd.Side()) {
if(TRACE10) {
if(++QWE>QWEQWE) {
QWE=0;
Cache.OwnHiding(f);
}
}
- fd++;
}
}
TColStd_Array1OfInteger Index(1, nf);
- fd = &(myDS->FDataArray().ChangeValue(1));
for (f = 1; f <= nf; f++) {
- if(fd->Plane()) Val(f)=10;
- else if(fd->Cylinder()) Val(f)=9;
- else if(fd->Cone()) Val(f)=8;
- else if(fd->Sphere()) Val(f)=7;
- else if(fd->Torus()) Val(f)=6;
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ if (fd.Plane()) Val(f) = 10;
+ else if(fd.Cylinder()) Val(f)=9;
+ else if(fd.Cone()) Val(f)=8;
+ else if(fd.Sphere()) Val(f)=7;
+ else if(fd.Torus()) Val(f)=6;
else Val(f)=0;
- if(fd->Cut()) Val(f)-=10;
- if(fd->Side()) Val(f)-=100;
- if(fd->WithOutL()) Val(f)-=20;
+ if(fd.Cut()) Val(f)-=10;
+ if(fd.Side()) Val(f)-=100;
+ if(fd.WithOutL()) Val(f)-=20;
- Size(f)=fd->Size();
- fd++;
+ Size(f)=fd.Size();
}
for(Standard_Integer tt=1;tt<=nf;tt++) {
}
j = 0;
- HLRBRep_Array1OfFData& FD = myDS->FDataArray();
QWE=0;
for (f = 1; f <= nf; f++) {
Standard_Integer fi = Index(f);
- fd=&(FD.ChangeValue(fi));
- if (fd->Selected()) {
- if (fd->Hiding()) {
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(fi);
+ if (fd.Selected()) {
+ if (fd.Hiding()) {
if(TRACE10 && TRACE==Standard_False) {
if(++QWE>QWEQWE) {
if (myDebug)
#ifdef OCCT_DEBUG
if (myDebug) {
- fd = &(myDS->FDataArray().ChangeValue(1));
nbFSimp = 0;
for (f = 1; f <= nf; f++) {
- if (fd->Selected() && fd->Simple())
+ HLRBRep_FaceData& fd = aFDataArray.ChangeValue(f);
+ if (fd.Selected() && fd.Simple())
nbFSimp++;
- fd++;
}
cout << "\n";