1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 3

Use typed collections instead Handle(Standard_Transient) values.
This commit is contained in:
kgv 2021-05-03 21:00:18 +03:00 committed by bugmaster
parent 114e7a9022
commit c1ce84dcb3
11 changed files with 628 additions and 763 deletions

View File

@ -29,7 +29,6 @@ HLRAlgo_ListIteratorOfListOfBPoint.hxx
HLRAlgo_ListOfBPoint.hxx HLRAlgo_ListOfBPoint.hxx
HLRAlgo_PolyAlgo.cxx HLRAlgo_PolyAlgo.cxx
HLRAlgo_PolyAlgo.hxx HLRAlgo_PolyAlgo.hxx
HLRAlgo_PolyAlgo.lxx
HLRAlgo_PolyData.cxx HLRAlgo_PolyData.cxx
HLRAlgo_PolyData.hxx HLRAlgo_PolyData.hxx
HLRAlgo_PolyData.lxx HLRAlgo_PolyData.lxx
@ -43,7 +42,6 @@ HLRAlgo_PolyInternalSegment.hxx
HLRAlgo_PolyMask.hxx HLRAlgo_PolyMask.hxx
HLRAlgo_PolyShellData.cxx HLRAlgo_PolyShellData.cxx
HLRAlgo_PolyShellData.hxx HLRAlgo_PolyShellData.hxx
HLRAlgo_PolyShellData.lxx
HLRAlgo_Projector.cxx HLRAlgo_Projector.cxx
HLRAlgo_Projector.hxx HLRAlgo_Projector.hxx
HLRAlgo_Projector.lxx HLRAlgo_Projector.lxx

View File

@ -14,25 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#ifndef No_Exception #include <HLRAlgo_PolyAlgo.hxx>
//#define No_Exception
#endif
#include <HLRAlgo_BiPoint.hxx> #include <HLRAlgo_BiPoint.hxx>
#include <HLRAlgo_EdgeStatus.hxx> #include <HLRAlgo_EdgeStatus.hxx>
#include <HLRAlgo_ListOfBPoint.hxx> #include <HLRAlgo_ListOfBPoint.hxx>
#include <HLRAlgo_PolyAlgo.hxx>
#include <HLRAlgo_PolyShellData.hxx> #include <HLRAlgo_PolyShellData.hxx>
#include <HLRAlgo_PolyMask.hxx> #include <HLRAlgo_PolyMask.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,Standard_Transient)
//static Standard_Integer ERROR = Standard_False;
//======================================================================= //=======================================================================
//function : HLRAlgo_PolyAlgo //function : HLRAlgo_PolyAlgo
//purpose : //purpose :
@ -51,21 +43,19 @@ HLRAlgo_PolyAlgo::HLRAlgo_PolyAlgo ()
//function : Init //function : Init
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyAlgo::Init (const Standard_Integer theNbShells)
void {
HLRAlgo_PolyAlgo::Init (const Handle(TColStd_HArray1OfTransient)& HShell) myHShell.Resize (1, theNbShells, false);
{ myHShell = HShell; } }
//======================================================================= //=======================================================================
//function : Clear //function : Clear
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyAlgo::Clear() void HLRAlgo_PolyAlgo::Clear()
{ {
if (!myHShell.IsNull()) { NCollection_Array1<Handle(HLRAlgo_PolyShellData)> anEmpty;
myHShell.Nullify(); myHShell.Move (anEmpty);
}
myNbrShell = 0; myNbrShell = 0;
} }
@ -76,7 +66,7 @@ void HLRAlgo_PolyAlgo::Clear ()
void HLRAlgo_PolyAlgo::Update () void HLRAlgo_PolyAlgo::Update ()
{ {
Standard_Integer i,j; Standard_Integer j;
Standard_Integer nxMin,nyMin,nzMin,nxMax,nyMax,nzMax; Standard_Integer nxMin,nyMin,nzMin,nxMax,nyMax,nzMax;
Standard_Real xShellMin,yShellMin,zShellMin; Standard_Real xShellMin,yShellMin,zShellMin;
Standard_Real xShellMax,yShellMax,zShellMax; Standard_Real xShellMax,yShellMax,zShellMax;
@ -88,14 +78,12 @@ void HLRAlgo_PolyAlgo::Update ()
Standard_Real xSegmnMax,ySegmnMax,zSegmnMax; Standard_Real xSegmnMax,ySegmnMax,zSegmnMax;
Standard_Real Big = Precision::Infinite(); Standard_Real Big = Precision::Infinite();
HLRAlgo_PolyData::Box aBox(Big, Big, Big, -Big, -Big, -Big); HLRAlgo_PolyData::Box aBox(Big, Big, Big, -Big, -Big, -Big);
TColStd_Array1OfTransient& Shell = myHShell->ChangeArray1();
myNbrShell = Shell.Upper();
Handle(HLRAlgo_PolyShellData)* psd1 =
(Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
for (i = 1; i <= myNbrShell; i++) { myNbrShell = myHShell.Size();
(*psd1)->UpdateGlobalMinMax(aBox); for (Standard_Integer aShellIter = myHShell.Lower(); aShellIter <= myHShell.Upper(); ++aShellIter)
psd1++; {
const Handle(HLRAlgo_PolyShellData)& aPsd = myHShell.ChangeValue (aShellIter);
aPsd->UpdateGlobalMinMax (aBox);
} }
Standard_Real dx = aBox.XMax - aBox.XMin; Standard_Real dx = aBox.XMax - aBox.XMin;
@ -114,11 +102,10 @@ void HLRAlgo_PolyAlgo::Update ()
Standard_Real DecaY = - aBox.YMin + precad; Standard_Real DecaY = - aBox.YMin + precad;
Standard_Real DecaZ = - aBox.ZMin + precad; Standard_Real DecaZ = - aBox.ZMin + precad;
Handle(HLRAlgo_PolyShellData)* psd2 = for (Standard_Integer aShellIter = myHShell.Lower(); aShellIter <= myHShell.Upper(); ++aShellIter)
(Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1)); {
const Handle(HLRAlgo_PolyShellData)& aPsd = myHShell.ChangeValue (aShellIter);
for (i = 1; i <= myNbrShell; i++) { HLRAlgo_PolyShellData::ShellIndices& aShellIndices = aPsd->Indices();
HLRAlgo_PolyShellData::ShellIndices& aShellIndices = (*psd2)->Indices();
xShellMin = Big; xShellMin = Big;
yShellMin = Big; yShellMin = Big;
zShellMin = Big; zShellMin = Big;
@ -126,9 +113,8 @@ void HLRAlgo_PolyAlgo::Update ()
yShellMax = -Big; yShellMax = -Big;
zShellMax = -Big; zShellMax = -Big;
for (mySegListIt.Initialize((*psd2)->Edges()); for (mySegListIt.Initialize (aPsd->Edges()); mySegListIt.More(); mySegListIt.Next())
mySegListIt.More(); {
mySegListIt.Next()) {
HLRAlgo_BiPoint& BP = mySegListIt.Value(); HLRAlgo_BiPoint& BP = mySegListIt.Value();
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points(); HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices(); HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices();
@ -157,14 +143,14 @@ void HLRAlgo_PolyAlgo::Update ()
if (zShellMin > zSegmnMin) zShellMin = zSegmnMin; if (zShellMin > zSegmnMin) zShellMin = zSegmnMin;
if (zShellMax < zSegmnMax) zShellMax = zSegmnMax; if (zShellMax < zSegmnMax) zShellMax = zSegmnMax;
} }
TColStd_Array1OfTransient& Polyg = (*psd2)->PolyData(); NCollection_Array1<Handle(HLRAlgo_PolyData)>& aPolyg = aPsd->PolyData();
Standard_Integer nbFace = Polyg.Upper(); const Standard_Integer nbFace = aPolyg.Upper();
Standard_Integer nbFaHi = 0; Standard_Integer nbFaHi = 0;
Handle(HLRAlgo_PolyData)* pd = NULL; for (j = 1; j <= nbFace; j++)
if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1)); {
const Handle(HLRAlgo_PolyData)& aPd = aPolyg.ChangeValue (j);
for (j = 1; j <= nbFace; j++) { if (aPd->Hiding())
if ((*pd)->Hiding()) { {
nbFaHi++; nbFaHi++;
xPolyTMin = Big; xPolyTMin = Big;
yPolyTMin = Big; yPolyTMin = Big;
@ -177,18 +163,18 @@ void HLRAlgo_PolyAlgo::Update ()
Standard_Real dn,dnx,dny,dnz,dx1,dy1,dz1,dx2,dy2,dz2,dx3,dy3; Standard_Real dn,dnx,dny,dnz,dx1,dy1,dz1,dx2,dy2,dz2,dx3,dy3;
Standard_Real adx1,ady1,adx2,ady2,adx3,ady3; Standard_Real adx1,ady1,adx2,ady2,adx3,ady3;
Standard_Real a =0.,b =0.,c =0.,d =0.; Standard_Real a =0.,b =0.,c =0.,d =0.;
HLRAlgo_PolyData::FaceIndices& PolyTIndices = (*pd)->Indices(); HLRAlgo_PolyData::FaceIndices& PolyTIndices = aPd->Indices();
TColgp_Array1OfXYZ & Nodes = (*pd)->Nodes(); TColgp_Array1OfXYZ & Nodes = aPd->Nodes();
HLRAlgo_Array1OfTData& TData = (*pd)->TData(); HLRAlgo_Array1OfTData& TData = aPd->TData();
HLRAlgo_Array1OfPHDat& PHDat = (*pd)->PHDat(); HLRAlgo_Array1OfPHDat& PHDat = aPd->PHDat();
Standard_Integer nbT = TData.Upper(); Standard_Integer nbT = TData.Upper();
HLRAlgo_TriangleData* TD = &(TData.ChangeValue(1));
for (otheri = 1; otheri <= nbT; otheri++) { for (otheri = 1; otheri <= nbT; otheri++) {
if (TD->Flags & HLRAlgo_PolyMask_FMskHiding) { HLRAlgo_TriangleData& aTD = TData.ChangeValue (otheri);
const gp_XYZ& P1 = Nodes(TD->Node1); if (aTD.Flags & HLRAlgo_PolyMask_FMskHiding) {
const gp_XYZ& P2 = Nodes(TD->Node2); const gp_XYZ& P1 = Nodes.Value (aTD.Node1);
const gp_XYZ& P3 = Nodes(TD->Node3); const gp_XYZ& P2 = Nodes.Value (aTD.Node2);
const gp_XYZ& P3 = Nodes.Value (aTD.Node3);
X1 = P1.X(); X1 = P1.X();
Y1 = P1.Y(); Y1 = P1.Y();
Z1 = P1.Z(); Z1 = P1.Z();
@ -258,12 +244,12 @@ void HLRAlgo_PolyAlgo::Update ()
ady3 = dy3; ady3 = dy3;
if (dx3 < 0) adx3 = -dx3; if (dx3 < 0) adx3 = -dx3;
if (dy3 < 0) ady3 = -dy3; if (dy3 < 0) ady3 = -dy3;
if (adx1 > ady1) TD->Flags |= HLRAlgo_PolyMask_EMskGrALin1; if (adx1 > ady1) aTD.Flags |= HLRAlgo_PolyMask_EMskGrALin1;
else TD->Flags &= ~HLRAlgo_PolyMask_EMskGrALin1; else aTD.Flags &= ~HLRAlgo_PolyMask_EMskGrALin1;
if (adx2 > ady2) TD->Flags |= HLRAlgo_PolyMask_EMskGrALin2; if (adx2 > ady2) aTD.Flags |= HLRAlgo_PolyMask_EMskGrALin2;
else TD->Flags &= ~HLRAlgo_PolyMask_EMskGrALin2; else aTD.Flags &= ~HLRAlgo_PolyMask_EMskGrALin2;
if (adx3 > ady3) TD->Flags |= HLRAlgo_PolyMask_EMskGrALin3; if (adx3 > ady3) aTD.Flags |= HLRAlgo_PolyMask_EMskGrALin3;
else TD->Flags &= ~HLRAlgo_PolyMask_EMskGrALin3; else aTD.Flags &= ~HLRAlgo_PolyMask_EMskGrALin3;
if (xPolyTMin > xTrianMin) xPolyTMin = xTrianMin; if (xPolyTMin > xTrianMin) xPolyTMin = xTrianMin;
if (xPolyTMax < xTrianMax) xPolyTMax = xTrianMax; if (xPolyTMax < xTrianMax) xPolyTMax = xTrianMax;
if (yPolyTMin > yTrianMin) yPolyTMin = yTrianMin; if (yPolyTMin > yTrianMin) yPolyTMin = yTrianMin;
@ -271,7 +257,6 @@ void HLRAlgo_PolyAlgo::Update ()
if (zPolyTMin > zTrianMin) zPolyTMin = zTrianMin; if (zPolyTMin > zTrianMin) zPolyTMin = zTrianMin;
if (zPolyTMax < zTrianMax) zPolyTMax = zTrianMax; if (zPolyTMax < zTrianMax) zPolyTMax = zTrianMax;
} }
TD++;
} }
nxMin = (Standard_Integer)((DecaX + xPolyTMin) * SurDX); nxMin = (Standard_Integer)((DecaX + xPolyTMin) * SurDX);
nyMin = (Standard_Integer)((DecaY + yPolyTMin) * SurDY); nyMin = (Standard_Integer)((DecaY + yPolyTMin) * SurDY);
@ -292,7 +277,6 @@ void HLRAlgo_PolyAlgo::Update ()
if (zShellMin > zPolyTMin) zShellMin = zPolyTMin; if (zShellMin > zPolyTMin) zShellMin = zPolyTMin;
if (zShellMax < zPolyTMax) zShellMax = zPolyTMax; if (zShellMax < zPolyTMax) zShellMax = zPolyTMax;
} }
pd++;
} }
if (nbFaHi > 0) { if (nbFaHi > 0) {
nxMin = (Standard_Integer)((DecaX + xShellMin) * SurDX); nxMin = (Standard_Integer)((DecaX + xShellMin) * SurDX);
@ -307,26 +291,23 @@ void HLRAlgo_PolyAlgo::Update ()
aShellIndices.Max = nyMax + (nxMax << 11); aShellIndices.Max = nyMax + (nxMax << 11);
aShellIndices.Max <<= 10; aShellIndices.Max <<= 10;
aShellIndices.Max += nzMax; aShellIndices.Max += nzMax;
(*psd2)->UpdateHiding(nbFaHi); aPsd->UpdateHiding(nbFaHi);
TColStd_Array1OfTransient& PolHi = (*psd2)->HidingPolyData(); Standard_Integer aHiddenIndex = 1;
pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1)); for (j = 1; j <= nbFace; j++)
Handle(HLRAlgo_PolyData)* phd = {
(Handle(HLRAlgo_PolyData)*)&(PolHi.ChangeValue(1)); const Handle(HLRAlgo_PolyData)& aPd = aPolyg.ChangeValue (j);
if (aPd->Hiding())
for (j = 1; j <= nbFace; j++) { {
if ((*pd)->Hiding()) { aPsd->HidingPolyData().SetValue (aHiddenIndex++, aPd);
*phd = *pd;
phd++;
}
pd++;
} }
} }
else { }
(*psd2)->UpdateHiding(0); else
{
aPsd->UpdateHiding (0);
aShellIndices.Min = 0; aShellIndices.Min = 0;
aShellIndices.Max = 0; aShellIndices.Max = 0;
} }
psd2++;
} }
} }
@ -334,28 +315,25 @@ void HLRAlgo_PolyAlgo::Update ()
//function : NextHide //function : NextHide
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyAlgo::NextHide() void HLRAlgo_PolyAlgo::NextHide()
{ {
myFound = Standard_False; myFound = Standard_False;
if (myCurShell != 0) { if (myCurShell != 0)
{
mySegListIt.Next(); mySegListIt.Next();
if (mySegListIt.More()) myFound = Standard_True; if (mySegListIt.More()) myFound = Standard_True;
} }
if (!myFound) {
if (!myFound)
{
myCurShell++; myCurShell++;
//POP ADN pour que cela marche sur WNT while (myCurShell <= myNbrShell && !myFound)
// while (myCurShell <= myNbrShell && !myFound) { {
// mySegListIt.Initialize((*(Handle(HLRAlgo_PolyShellData)*)& const Handle(HLRAlgo_PolyShellData)& aData = myHShell.ChangeValue (myCurShell);
// (myHShell->ChangeValue(myCurShell))) mySegListIt.Initialize (aData->Edges());
// ->Edges()); if (mySegListIt.More()) { myFound = Standard_True; }
while (myCurShell <= myNbrShell && !myFound) { else { myCurShell++; }
Handle(HLRAlgo_PolyShellData) data =
Handle(HLRAlgo_PolyShellData)::DownCast(myHShell->Value(myCurShell));
mySegListIt.Initialize(data->Edges());
if (mySegListIt.More()) myFound = Standard_True;
else myCurShell++;
} }
} }
} }
@ -364,56 +342,55 @@ void HLRAlgo_PolyAlgo::NextHide ()
//function : Hide //function : Hide
//purpose : //purpose :
//======================================================================= //=======================================================================
HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Hide (HLRAlgo_EdgeStatus& theStatus,
HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Hide ( Standard_Integer& theIndex,
HLRAlgo_EdgeStatus& status, Standard_Boolean& theReg1,
Standard_Integer& Index, Standard_Boolean& theRegn,
Standard_Boolean& reg1, Standard_Boolean& theOutl,
Standard_Boolean& regn, Standard_Boolean& theIntl)
Standard_Boolean& outl,
Standard_Boolean& intl)
{ {
HLRAlgo_BiPoint& BP = mySegListIt.Value(); HLRAlgo_BiPoint& aBP = mySegListIt.Value();
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points(); HLRAlgo_BiPoint::PointsT& aPoints = aBP.Points();
HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices(); HLRAlgo_BiPoint::IndicesT& anIndices = aBP.Indices();
status = HLRAlgo_EdgeStatus(0.,(Standard_ShortReal)myTriangle.TolParam,1.,(Standard_ShortReal)myTriangle.TolParam); theStatus = HLRAlgo_EdgeStatus (0.0, (Standard_ShortReal)myTriangle.TolParam,
Index = theIndices.ShapeIndex; 1.0, (Standard_ShortReal)myTriangle.TolParam);
reg1 = BP.Rg1Line(); theIndex = anIndices.ShapeIndex;
regn = BP.RgNLine(); theReg1 = aBP.Rg1Line();
outl = BP.OutLine(); theRegn = aBP.RgNLine();
intl = BP.IntLine(); theOutl = aBP.OutLine();
if (BP.Hidden()) theIntl = aBP.IntLine();
status.HideAll(); if (aBP.Hidden())
else { {
Standard_Boolean HidingShell; theStatus.HideAll();
TColStd_Array1OfTransient& Shell = myHShell->ChangeArray1(); return aPoints;
Handle(HLRAlgo_PolyShellData)* psd = }
(Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
for (Standard_Integer s = 1; s <= myNbrShell; s++) { for (Standard_Integer s = 1; s <= myNbrShell; s++)
if ((*psd)->Hiding()) { {
HLRAlgo_PolyShellData::ShellIndices& aShellIndices = (*psd)->Indices(); const Handle(HLRAlgo_PolyShellData)& aPsd = myHShell.ChangeValue (s);
if (((aShellIndices.Max - theIndices.MinSeg) & 0x80100200) == 0 && if (!aPsd->Hiding())
((theIndices.MaxSeg - aShellIndices.Min) & 0x80100000) == 0) { {
HidingShell = (s == myCurShell); continue;
TColStd_Array1OfTransient& Face = (*psd)->HidingPolyData(); }
Standard_Integer nbFace = Face.Upper();
Handle(HLRAlgo_PolyData)* pd =
(Handle(HLRAlgo_PolyData)*)&(Face.ChangeValue(1));
for (Standard_Integer f = 1; f <= nbFace; f++) { HLRAlgo_PolyShellData::ShellIndices& aShellIndices = aPsd->Indices();
(*pd)->HideByPolyData(aPoints, if (((aShellIndices.Max - anIndices.MinSeg) & 0x80100200) == 0 &&
((anIndices.MaxSeg - aShellIndices.Min) & 0x80100000) == 0)
{
const Standard_Boolean isHidingShell = (s == myCurShell);
NCollection_Array1<Handle(HLRAlgo_PolyData)>& aFace = aPsd->HidingPolyData();
const Standard_Integer nbFace = aFace.Upper();
for (Standard_Integer f = 1; f <= nbFace; f++)
{
const Handle(HLRAlgo_PolyData)& aPd = aFace.ChangeValue (f);
aPd->HideByPolyData (aPoints,
myTriangle, myTriangle,
theIndices, anIndices,
HidingShell, isHidingShell,
status); theStatus);
pd++;
} }
} }
} }
psd++;
}
}
return aPoints; return aPoints;
} }
@ -429,15 +406,15 @@ void HLRAlgo_PolyAlgo::NextShow ()
mySegListIt.Next(); mySegListIt.Next();
if (mySegListIt.More()) myFound = Standard_True; if (mySegListIt.More()) myFound = Standard_True;
} }
if (!myFound) { if (!myFound)
{
myCurShell++; myCurShell++;
while (myCurShell <= myNbrShell && !myFound) { while (myCurShell <= myNbrShell && !myFound)
mySegListIt.Initialize((*(Handle(HLRAlgo_PolyShellData)*)& {
(myHShell->ChangeValue(myCurShell))) mySegListIt.Initialize (myHShell.ChangeValue (myCurShell)->Edges());
->Edges()); if (mySegListIt.More()) { myFound = Standard_True; }
if (mySegListIt.More()) myFound = Standard_True; else { myCurShell++; }
else myCurShell++;
} }
} }
} }
@ -464,4 +441,3 @@ HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Show (
intl = BP.IntLine(); intl = BP.IntLine();
return aPoints; return aPoints;
} }

View File

@ -17,21 +17,12 @@
#ifndef _HLRAlgo_PolyAlgo_HeaderFile #ifndef _HLRAlgo_PolyAlgo_HeaderFile
#define _HLRAlgo_PolyAlgo_HeaderFile #define _HLRAlgo_PolyAlgo_HeaderFile
#include <NCollection_Array1.hxx>
#include <HLRAlgo_PolyData.hxx> #include <HLRAlgo_PolyData.hxx>
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray1OfTransient.hxx>
#include <Standard_Real.hxx>
#include <HLRAlgo_ListIteratorOfListOfBPoint.hxx> #include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Transient.hxx>
#include <TColStd_Array1OfTransient.hxx>
class HLRAlgo_EdgeStatus; class HLRAlgo_EdgeStatus;
class HLRAlgo_PolyShellData;
class HLRAlgo_PolyAlgo; class HLRAlgo_PolyAlgo;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyAlgo, Standard_Transient) DEFINE_STANDARD_HANDLE(HLRAlgo_PolyAlgo, Standard_Transient)
@ -42,64 +33,65 @@ class HLRAlgo_PolyAlgo : public Standard_Transient
public: public:
Standard_EXPORT HLRAlgo_PolyAlgo(); Standard_EXPORT HLRAlgo_PolyAlgo();
Standard_EXPORT void Init (const Handle(TColStd_HArray1OfTransient)& HShell); Standard_EXPORT void Init (const Standard_Integer theNbShells);
TColStd_Array1OfTransient& PolyShell() const; const NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& PolyShell() const { return myHShell; }
NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& ChangePolyShell() { return myHShell; }
Standard_EXPORT void Clear(); Standard_EXPORT void Clear();
//! Prepare all the data to process the algo. //! Prepare all the data to process the algo.
Standard_EXPORT void Update(); Standard_EXPORT void Update();
void InitHide(); void InitHide()
{
myCurShell = 0;
NextHide();
}
Standard_Boolean MoreHide() const; Standard_Boolean MoreHide() const { return myFound; }
Standard_EXPORT void NextHide(); Standard_EXPORT void NextHide();
//! process hiding between <Pt1> and <Pt2>. //! process hiding between <Pt1> and <Pt2>.
Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide (HLRAlgo_EdgeStatus& status, Standard_Integer& Index, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl); Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide (HLRAlgo_EdgeStatus& status,
Standard_Integer& Index,
Standard_Boolean& reg1,
Standard_Boolean& regn,
Standard_Boolean& outl,
Standard_Boolean& intl);
void InitShow(); void InitShow()
{
myCurShell = 0;
NextShow();
}
Standard_Boolean MoreShow() const; Standard_Boolean MoreShow() const { return myFound; }
Standard_EXPORT void NextShow(); Standard_EXPORT void NextShow();
//! process hiding between <Pt1> and <Pt2>. //! process hiding between <Pt1> and <Pt2>.
Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show (Standard_Integer& Index, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl); Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show (Standard_Integer& Index,
Standard_Boolean& reg1,
Standard_Boolean& regn,
Standard_Boolean& outl,
Standard_Boolean& intl);
DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,Standard_Transient) DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,Standard_Transient)
protected:
private: private:
NCollection_Array1<Handle(HLRAlgo_PolyShellData)> myHShell;
Handle(TColStd_HArray1OfTransient) myHShell;
HLRAlgo_PolyData::Triangle myTriangle; HLRAlgo_PolyData::Triangle myTriangle;
HLRAlgo_ListIteratorOfListOfBPoint mySegListIt; HLRAlgo_ListIteratorOfListOfBPoint mySegListIt;
Standard_Integer myNbrShell; Standard_Integer myNbrShell;
Standard_Integer myCurShell; Standard_Integer myCurShell;
Standard_Boolean myFound; Standard_Boolean myFound;
}; };
#include <HLRAlgo_PolyAlgo.lxx>
#endif // _HLRAlgo_PolyAlgo_HeaderFile #endif // _HLRAlgo_PolyAlgo_HeaderFile

View File

@ -1,64 +0,0 @@
// Created on: 1995-06-20
// Created by: Christophe MARION
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TColStd_HArray1OfTransient.hxx>
//=======================================================================
//function : PolyShell
//purpose :
//=======================================================================
inline TColStd_Array1OfTransient & HLRAlgo_PolyAlgo::PolyShell () const
{ return myHShell->ChangeArray1(); }
//=======================================================================
//function : InitHide
//purpose :
//=======================================================================
inline void HLRAlgo_PolyAlgo::InitHide ()
{
myCurShell = 0;
NextHide();
}
//=======================================================================
//function : MoreHide
//purpose :
//=======================================================================
inline Standard_Boolean HLRAlgo_PolyAlgo::MoreHide () const
{ return myFound; }
//=======================================================================
//function : InitShow
//purpose :
//=======================================================================
inline void HLRAlgo_PolyAlgo::InitShow ()
{
myCurShell = 0;
NextShow();
}
//=======================================================================
//function : MoreShow
//purpose :
//=======================================================================
inline Standard_Boolean HLRAlgo_PolyAlgo::MoreShow () const
{ return myFound; }

View File

@ -61,27 +61,22 @@ HLRAlgo_PolyInternalData::HLRAlgo_PolyInternalData
//function : UpdateLinks //function : UpdateLinks
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyInternalData::UpdateLinks (HLRAlgo_Array1OfTData& theTData,
void HLRAlgo_PolyInternalData::UpdateLinks HLRAlgo_Array1OfPISeg& thePISeg,
(HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPINod& thePINod)
HLRAlgo_Array1OfPISeg*& PISeg,
HLRAlgo_Array1OfPINod*& PINod)
{ {
Standard_Integer i,n1,n2; Standard_Integer n1,n2;
Standard_Integer find,iiii,icsv = 0; Standard_Integer find,iiii,icsv = 0;
HLRAlgo_PolyInternalSegment* aSegIndices = NULL; HLRAlgo_PolyInternalSegment* aSegIndices = NULL;
Standard_Boolean newSeg = Standard_False; Standard_Boolean newSeg = Standard_False;
HLRAlgo_TriangleData* TD = for (Standard_Integer i = 1; i <= myNbTData; i++)
&(((HLRAlgo_Array1OfTData*)TData)->ChangeValue(1)); {
HLRAlgo_TriangleData* TD = &theTData.ChangeValue (i);
for (i = 1; i <= myNbTData; i++) { HLRAlgo_PolyInternalNode::NodeIndices& A1 = thePINod.ChangeValue(TD->Node1)->Indices();
HLRAlgo_PolyInternalNode::NodeIndices& A1 = HLRAlgo_PolyInternalNode::NodeIndices& A2 = thePINod.ChangeValue(TD->Node2)->Indices();
PINod->ChangeValue(TD->Node1)->Indices(); HLRAlgo_PolyInternalNode::NodeIndices& A3 = thePINod.ChangeValue(TD->Node3)->Indices();
HLRAlgo_PolyInternalNode::NodeIndices& A2 =
PINod->ChangeValue(TD->Node2)->Indices();
HLRAlgo_PolyInternalNode::NodeIndices& A3 =
PINod->ChangeValue(TD->Node3)->Indices();
{ {
n1 = TD->Node1; n1 = TD->Node1;
@ -99,7 +94,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
find = 0; find = 0;
while (iiii != 0 && find == 0) { while (iiii != 0 && find == 0) {
aSegIndices = &PISeg->ChangeValue(iiii); aSegIndices = &thePISeg.ChangeValue (iiii);
if (aSegIndices->LstSg1 == n1) { if (aSegIndices->LstSg1 == n1) {
if (aSegIndices->LstSg2 == n2) find = iiii; if (aSegIndices->LstSg2 == n2) find = iiii;
else iiii = aSegIndices->NxtSg1; else iiii = aSegIndices->NxtSg1;
@ -129,7 +124,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
if (iiii != 0) { if (iiii != 0) {
while (iiii != 0) { while (iiii != 0) {
aSegIndices = &PISeg->ChangeValue(iiii); aSegIndices = &thePISeg.ChangeValue (iiii);
if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; } if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
else { icsv = 2; iiii = aSegIndices->NxtSg2; } else { icsv = 2; iiii = aSegIndices->NxtSg2; }
} }
@ -140,7 +135,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
} }
} }
if (newSeg) { if (newSeg) {
aSegIndices = &PISeg->ChangeValue(myNbPISeg); aSegIndices = &thePISeg.ChangeValue (myNbPISeg);
aSegIndices->LstSg1 = n1; aSegIndices->LstSg1 = n1;
aSegIndices->LstSg2 = n2; aSegIndices->LstSg2 = n2;
aSegIndices->Conex1 = i; aSegIndices->Conex1 = i;
@ -166,7 +161,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
find = 0; find = 0;
while (iiii != 0 && find == 0) { while (iiii != 0 && find == 0) {
aSegIndices = &PISeg->ChangeValue(iiii); aSegIndices = &thePISeg.ChangeValue (iiii);
if (aSegIndices->LstSg1 == n1) { if (aSegIndices->LstSg1 == n1) {
if (aSegIndices->LstSg2 == n2) find = iiii; if (aSegIndices->LstSg2 == n2) find = iiii;
else iiii = aSegIndices->NxtSg1; else iiii = aSegIndices->NxtSg1;
@ -196,7 +191,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
if (iiii != 0) { if (iiii != 0) {
while (iiii != 0) { while (iiii != 0) {
aSegIndices = &PISeg->ChangeValue(iiii); aSegIndices = &thePISeg.ChangeValue (iiii);
if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; } if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
else { icsv = 2; iiii = aSegIndices->NxtSg2; } else { icsv = 2; iiii = aSegIndices->NxtSg2; }
} }
@ -207,7 +202,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
} }
} }
if (newSeg) { if (newSeg) {
aSegIndices = &PISeg->ChangeValue(myNbPISeg); aSegIndices = &thePISeg.ChangeValue (myNbPISeg);
aSegIndices->LstSg1 = n1; aSegIndices->LstSg1 = n1;
aSegIndices->LstSg2 = n2; aSegIndices->LstSg2 = n2;
aSegIndices->Conex1 = i; aSegIndices->Conex1 = i;
@ -233,7 +228,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
find = 0; find = 0;
while (iiii != 0 && find == 0) { while (iiii != 0 && find == 0) {
aSegIndices = &PISeg->ChangeValue(iiii); aSegIndices = &thePISeg.ChangeValue (iiii);
if (aSegIndices->LstSg1 == n1) { if (aSegIndices->LstSg1 == n1) {
if (aSegIndices->LstSg2 == n2) find = iiii; if (aSegIndices->LstSg2 == n2) find = iiii;
else iiii = aSegIndices->NxtSg1; else iiii = aSegIndices->NxtSg1;
@ -263,7 +258,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
if (iiii != 0) { if (iiii != 0) {
while (iiii != 0) { while (iiii != 0) {
aSegIndices = &PISeg->ChangeValue(iiii); aSegIndices = &thePISeg.ChangeValue (iiii);
if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; } if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
else { icsv = 2; iiii = aSegIndices->NxtSg2; } else { icsv = 2; iiii = aSegIndices->NxtSg2; }
} }
@ -274,7 +269,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
} }
} }
if (newSeg) { if (newSeg) {
aSegIndices = &PISeg->ChangeValue(myNbPISeg); aSegIndices = &thePISeg.ChangeValue (myNbPISeg);
aSegIndices->LstSg1 = n1; aSegIndices->LstSg1 = n1;
aSegIndices->LstSg2 = n2; aSegIndices->LstSg2 = n2;
aSegIndices->Conex1 = i; aSegIndices->Conex1 = i;
@ -283,7 +278,6 @@ void HLRAlgo_PolyInternalData::UpdateLinks
aSegIndices->NxtSg2 = 0; aSegIndices->NxtSg2 = 0;
} }
} }
TD++;
} }
} }
@ -291,32 +285,28 @@ void HLRAlgo_PolyInternalData::UpdateLinks
//function : AddNode //function : AddNode
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer HLRAlgo_PolyInternalData::AddNode (HLRAlgo_PolyInternalNode::NodeData& theNod1RValues,
Standard_Integer HLRAlgo_PolyInternalNode::NodeData& theNod2RValues,
HLRAlgo_PolyInternalData::AddNode ( HLRAlgo_Array1OfPINod*& thePINod1,
HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_Array1OfPINod*& thePINod2,
HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, const Standard_Real theCoef1,
HLRAlgo_Array1OfPINod*& PINod1, const Standard_Real theX3,
HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real theY3,
const Standard_Real coef1, const Standard_Real theZ3)
const Standard_Real X3,
const Standard_Real Y3,
const Standard_Real Z3)
{ {
Standard_Real coef2 = 1 - coef1; Standard_Real coef2 = 1 - theCoef1;
IncPINod(PINod1,PINod2); IncPINod (thePINod1, thePINod2);
Standard_Integer ip3 = myNbPINod; Standard_Integer ip3 = myNbPINod;
Handle(HLRAlgo_PolyInternalNode)* pip3 = Handle(HLRAlgo_PolyInternalNode)& pip3 = thePINod1->ChangeValue(ip3);
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(ip3)); pip3 = new HLRAlgo_PolyInternalNode();
*pip3 = new HLRAlgo_PolyInternalNode(); HLRAlgo_PolyInternalNode::NodeData& Nod3RValues = pip3->Data();
HLRAlgo_PolyInternalNode::NodeData& Nod3RValues = (*pip3)->Data(); HLRAlgo_PolyInternalNode::NodeIndices& aNodeIndices = pip3->Indices();
HLRAlgo_PolyInternalNode::NodeIndices& aNodeIndices = (*pip3)->Indices();
aNodeIndices.NdSg = 0; aNodeIndices.NdSg = 0;
aNodeIndices.Flag = 0; aNodeIndices.Flag = 0;
Nod3RValues.Point = gp_XYZ(X3, Y3, Z3); Nod3RValues.Point = gp_XYZ (theX3, theY3, theZ3);
Nod3RValues.UV = coef2 * Nod1RValues.UV + coef1 * Nod2RValues.UV; Nod3RValues.UV = coef2 * theNod1RValues.UV + theCoef1 * theNod2RValues.UV;
Nod3RValues.Scal = Nod1RValues.Scal * coef2 + Nod2RValues.Scal * coef1; Nod3RValues.Scal = theNod1RValues.Scal * coef2 + theNod2RValues.Scal * theCoef1;
const gp_XYZ aXYZ = coef2 * Nod1RValues.Normal + coef1 * Nod2RValues.Normal; const gp_XYZ aXYZ = coef2 * theNod1RValues.Normal + theCoef1 * theNod2RValues.Normal;
const Standard_Real aNorm = aXYZ.Modulus(); const Standard_Real aNorm = aXYZ.Modulus();
if (aNorm > 0) { if (aNorm > 0) {
@ -751,11 +741,11 @@ void HLRAlgo_PolyInternalData::IncPISeg(
//function : IncPINod //function : IncPINod
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyInternalData::IncPINod (HLRAlgo_Array1OfPINod*& PINod1,
void HLRAlgo_PolyInternalData::IncPINod( HLRAlgo_Array1OfPINod*& PINod2)
HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_Array1OfPINod*& PINod2) {
if (myNbPINod >= myMxPINod)
{ {
if (myNbPINod >= myMxPINod) {
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
if (HLRAlgo_PolyInternalData_TRACE) if (HLRAlgo_PolyInternalData_TRACE)
std::cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << std::endl; std::cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << std::endl;
@ -763,8 +753,7 @@ void HLRAlgo_PolyInternalData::IncPINod(
Standard_Integer i,j,k; Standard_Integer i,j,k;
j = myMxPINod; j = myMxPINod;
k = 2 * j; k = 2 * j;
Handle(HLRAlgo_HArray1OfPINod) NwPINod = Handle(HLRAlgo_HArray1OfPINod) NwPINod = new HLRAlgo_HArray1OfPINod(0,k);
new HLRAlgo_HArray1OfPINod(0,k);
HLRAlgo_Array1OfPINod& oPINod = myPINod->ChangeArray1(); HLRAlgo_Array1OfPINod& oPINod = myPINod->ChangeArray1();
HLRAlgo_Array1OfPINod& nPINod = NwPINod->ChangeArray1(); HLRAlgo_Array1OfPINod& nPINod = NwPINod->ChangeArray1();
Handle(HLRAlgo_PolyInternalNode)* ON = &(oPINod.ChangeValue(1)); Handle(HLRAlgo_PolyInternalNode)* ON = &(oPINod.ChangeValue(1));

View File

@ -44,11 +44,28 @@ public:
Standard_EXPORT HLRAlgo_PolyInternalData(const Standard_Integer nbNod, const Standard_Integer nbTri); Standard_EXPORT HLRAlgo_PolyInternalData(const Standard_Integer nbNod, const Standard_Integer nbTri);
Standard_EXPORT void UpdateLinks (HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod); Standard_EXPORT void UpdateLinks (HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPISeg& thePISeg,
HLRAlgo_Array1OfPINod& thePINod);
Standard_EXPORT Standard_Integer AddNode (HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real coef1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3); Standard_EXPORT Standard_Integer AddNode (HLRAlgo_PolyInternalNode::NodeData& theNod1RValues,
HLRAlgo_PolyInternalNode::NodeData& theNod2RValues,
HLRAlgo_Array1OfPINod*& thePINod1,
HLRAlgo_Array1OfPINod*& thePINod2,
const Standard_Real theCoef1,
const Standard_Real theX3,
const Standard_Real theY3,
const Standard_Real theZ3);
Standard_EXPORT void UpdateLinks (const Standard_Integer ip1, const Standard_Integer ip2, const Standard_Integer ip3, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_Array1OfPINod*& PINod2); Standard_EXPORT void UpdateLinks (const Standard_Integer theIp1,
const Standard_Integer theIp2,
const Standard_Integer theIp3,
HLRAlgo_Array1OfTData*& theTData1,
HLRAlgo_Array1OfTData*& theTData2,
HLRAlgo_Array1OfPISeg*& thePISeg1,
HLRAlgo_Array1OfPISeg*& thePISeg2,
HLRAlgo_Array1OfPINod*& thePINod1,
HLRAlgo_Array1OfPINod*& thePINod2);
Standard_EXPORT void Dump() const; Standard_EXPORT void Dump() const;
@ -56,7 +73,8 @@ public:
Standard_EXPORT void IncPISeg (HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPISeg*& PISeg2); Standard_EXPORT void IncPISeg (HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPISeg*& PISeg2);
Standard_EXPORT void IncPINod (HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_Array1OfPINod*& PINod2); Standard_EXPORT void IncPINod (HLRAlgo_Array1OfPINod*& thePINod1,
HLRAlgo_Array1OfPINod*& thePINod2);
void DecTData(); void DecTData();
@ -89,14 +107,8 @@ public:
DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyInternalData,Standard_Transient) DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyInternalData,Standard_Transient)
protected:
private: private:
Standard_Integer myNbTData; Standard_Integer myNbTData;
Standard_Integer myNbPISeg; Standard_Integer myNbPISeg;
Standard_Integer myNbPINod; Standard_Integer myNbPINod;
@ -109,10 +121,8 @@ private:
Handle(HLRAlgo_HArray1OfPISeg) myPISeg; Handle(HLRAlgo_HArray1OfPISeg) myPISeg;
Handle(HLRAlgo_HArray1OfPINod) myPINod; Handle(HLRAlgo_HArray1OfPINod) myPINod;
}; };
#include <HLRAlgo_PolyInternalData.lxx> #include <HLRAlgo_PolyInternalData.lxx>

View File

@ -14,16 +14,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#ifndef No_Exception #include <HLRAlgo_PolyShellData.hxx>
//#define No_Exception
#endif
#include <HLRAlgo_BiPoint.hxx> #include <HLRAlgo_BiPoint.hxx>
#include <HLRAlgo_ListIteratorOfListOfBPoint.hxx> #include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
#include <HLRAlgo_PolyData.hxx>
#include <HLRAlgo_PolyShellData.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient)
@ -31,19 +25,15 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient)
//function : HLRAlgo_PolyShellData //function : HLRAlgo_PolyShellData
//purpose : //purpose :
//======================================================================= //=======================================================================
HLRAlgo_PolyShellData::HLRAlgo_PolyShellData (const Standard_Integer nbFace)
HLRAlgo_PolyShellData:: : myPolyg (1, nbFace)
HLRAlgo_PolyShellData (const Standard_Integer nbFace)
: myPolyg(0,nbFace)
{} {}
//======================================================================= //=======================================================================
//function : UpdateGlobalMinMax //function : UpdateGlobalMinMax
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
void
HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
{ {
HLRAlgo_ListIteratorOfListOfBPoint it; HLRAlgo_ListIteratorOfListOfBPoint it;
@ -75,13 +65,10 @@ HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
else if (theBox.ZMax < aPoints.PntP1.Z()) theBox.ZMax = aPoints.PntP1.Z(); else if (theBox.ZMax < aPoints.PntP1.Z()) theBox.ZMax = aPoints.PntP1.Z();
} }
} }
Standard_Integer nbFace = myPolyg.Upper(); for (Standard_Integer i = myPolyg.Lower(); i <= myPolyg.Upper(); i++)
Handle(HLRAlgo_PolyData)* pd = NULL; {
if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(myPolyg.ChangeValue(1)); const Handle(HLRAlgo_PolyData)& aPd = myPolyg.ChangeValue (i);
aPd->UpdateGlobalMinMax (theBox);
for (Standard_Integer i = 1; i <= nbFace; i++) {
(*pd)->UpdateGlobalMinMax(theBox);
pd++;
} }
} }
@ -89,11 +76,15 @@ HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
//function : UpdateHiding //function : UpdateHiding
//purpose : //purpose :
//======================================================================= //=======================================================================
void HLRAlgo_PolyShellData::UpdateHiding (const Standard_Integer nbHiding)
void HLRAlgo_PolyShellData::
UpdateHiding (const Standard_Integer nbHiding)
{ {
if (nbHiding > 0) if (nbHiding > 0)
myHPolHi = new TColStd_HArray1OfTransient(1,nbHiding); {
else myHPolHi.Nullify(); myHPolHi.Resize (1, nbHiding, false);
}
else
{
NCollection_Array1<Handle(HLRAlgo_PolyData)> anEmpty;
myHPolHi.Move (anEmpty);
}
} }

View File

@ -17,16 +17,11 @@
#ifndef _HLRAlgo_PolyShellData_HeaderFile #ifndef _HLRAlgo_PolyShellData_HeaderFile
#define _HLRAlgo_PolyShellData_HeaderFile #define _HLRAlgo_PolyShellData_HeaderFile
#include <Standard.hxx> #include <NCollection_Array1.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TColStd_HArray1OfTransient.hxx>
#include <HLRAlgo_ListOfBPoint.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
#include <Standard_Boolean.hxx> #include <HLRAlgo_ListOfBPoint.hxx>
#include <HLRAlgo_PolyData.hxx>
class HLRAlgo_PolyShellData; class HLRAlgo_PolyShellData;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyShellData, Standard_Transient) DEFINE_STANDARD_HANDLE(HLRAlgo_PolyShellData, Standard_Transient)
@ -41,52 +36,34 @@ public:
Standard_Integer Min, Max; Standard_Integer Min, Max;
}; };
Standard_EXPORT HLRAlgo_PolyShellData(const Standard_Integer nbFace); Standard_EXPORT HLRAlgo_PolyShellData(const Standard_Integer nbFace);
Standard_EXPORT void UpdateGlobalMinMax (HLRAlgo_PolyData::Box& theBox); Standard_EXPORT void UpdateGlobalMinMax (HLRAlgo_PolyData::Box& theBox);
Standard_EXPORT void UpdateHiding (const Standard_Integer nbHiding); Standard_EXPORT void UpdateHiding (const Standard_Integer nbHiding);
Standard_Boolean Hiding() const; Standard_Boolean Hiding() const { return !myHPolHi.IsEmpty(); }
TColStd_Array1OfTransient& PolyData(); NCollection_Array1<Handle(HLRAlgo_PolyData)>& PolyData() { return myPolyg; }
TColStd_Array1OfTransient& HidingPolyData(); NCollection_Array1<Handle(HLRAlgo_PolyData)>& HidingPolyData() { return myHPolHi; }
HLRAlgo_ListOfBPoint& Edges(); HLRAlgo_ListOfBPoint& Edges() { return mySegList; }
ShellIndices& Indices() ShellIndices& Indices()
{ {
return myIndices; return myIndices;
} }
DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient) DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient)
protected:
private: private:
ShellIndices myIndices; ShellIndices myIndices;
TColStd_Array1OfTransient myPolyg; NCollection_Array1<Handle(HLRAlgo_PolyData)> myPolyg;
Handle(TColStd_HArray1OfTransient) myHPolHi; NCollection_Array1<Handle(HLRAlgo_PolyData)> myHPolHi;
HLRAlgo_ListOfBPoint mySegList; HLRAlgo_ListOfBPoint mySegList;
}; };
#include <HLRAlgo_PolyShellData.lxx>
#endif // _HLRAlgo_PolyShellData_HeaderFile #endif // _HLRAlgo_PolyShellData_HeaderFile

View File

@ -1,53 +0,0 @@
// Created on: 1995-05-05
// Created by: Christophe MARION
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TColStd_HArray1OfTransient.hxx>
//=======================================================================
//function : Hiding
//purpose :
//=======================================================================
inline Standard_Boolean
HLRAlgo_PolyShellData::Hiding () const
{ return !myHPolHi.IsNull(); }
//=======================================================================
//function : PolyData
//purpose :
//=======================================================================
inline TColStd_Array1OfTransient &
HLRAlgo_PolyShellData::PolyData ()
{ return myPolyg; }
//=======================================================================
//function : HidingPolyData
//purpose :
//=======================================================================
inline TColStd_Array1OfTransient &
HLRAlgo_PolyShellData::HidingPolyData ()
{ return myHPolHi->ChangeArray1(); }
//=======================================================================
//function : Edges
//purpose :
//=======================================================================
inline HLRAlgo_ListOfBPoint &
HLRAlgo_PolyShellData::Edges ()
{ return mySegList; }

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,6 @@
#include <HLRAlgo_PolyInternalNode.hxx> #include <HLRAlgo_PolyInternalNode.hxx>
#include <HLRAlgo_Projector.hxx> #include <HLRAlgo_Projector.hxx>
#include <TColStd_Array1OfInteger.hxx> #include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TopTools_IndexedMapOfShape.hxx> #include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx> #include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx> #include <TopTools_MapOfShape.hxx>
@ -190,20 +189,61 @@ private:
Standard_EXPORT Standard_Integer InitShape (const TopoDS_Shape& Shape, Standard_Boolean& IsoledF, Standard_Boolean& IsoledE); Standard_EXPORT Standard_Integer InitShape (const TopoDS_Shape& Shape, Standard_Boolean& IsoledF, Standard_Boolean& IsoledE);
Standard_EXPORT void StoreShell (const TopoDS_Shape& Shape, Standard_Integer& iShell, TColStd_Array1OfTransient& Shell, const Standard_Boolean IsoledF, const Standard_Boolean IsoledE, TColStd_Array1OfInteger& ES, TColStd_Array1OfTransient& PD, TColStd_Array1OfTransient& PID, TopTools_MapOfShape& ShapeMap1, TopTools_MapOfShape& ShapeMap2); Standard_EXPORT void StoreShell (const TopoDS_Shape& theShape,
Standard_Integer& theIShell,
NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& theShell,
const Standard_Boolean theIsoledF,
const Standard_Boolean theIsoledE,
TColStd_Array1OfInteger& theES,
NCollection_Array1<Handle(HLRAlgo_PolyData)>& thePD,
NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
TopTools_MapOfShape& theShapeMap1,
TopTools_MapOfShape& theShapeMap2);
Standard_EXPORT Standard_Boolean Normal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodIndices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, const Standard_Boolean orient) const; Standard_EXPORT Standard_Boolean Normal (const Standard_Integer theINode,
HLRAlgo_PolyInternalNode::NodeIndices& theNodIndices,
HLRAlgo_PolyInternalNode::NodeData& theNod1RValues,
HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPISeg& thePISeg,
HLRAlgo_Array1OfPINod& thePINod,
const Standard_Boolean orient) const;
Standard_EXPORT Standard_Boolean AverageNormal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; Standard_EXPORT Standard_Boolean AverageNormal (const Standard_Integer theINode,
HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices,
HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPISeg& thePISeg,
HLRAlgo_Array1OfPINod& thePINod,
Standard_Real& theX,
Standard_Real& theY,
Standard_Real& theZ) const;
Standard_Boolean AverageNormal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, gp_XYZ& theNormal) const Standard_Boolean AverageNormal (const Standard_Integer theINode,
HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices,
HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPISeg& thePISeg,
HLRAlgo_Array1OfPINod& thePINod,
gp_XYZ& theNormal) const
{ {
return AverageNormal (iNode, theNodeIndices, TData, PISeg, PINod, theNormal.ChangeCoord(1), theNormal.ChangeCoord(2), theNormal.ChangeCoord(3)); return AverageNormal (theINode, theNodeIndices, theTData, thePISeg, thePINod,
theNormal.ChangeCoord(1), theNormal.ChangeCoord(2), theNormal.ChangeCoord(3));
} }
Standard_EXPORT void AddNormalOnTriangle (const Standard_Integer iTri, const Standard_Integer iNode, Standard_Integer& jNode, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPINod*& PINod, Standard_Real& X, Standard_Real& Y, Standard_Real& Z, Standard_Boolean& OK) const; Standard_EXPORT void AddNormalOnTriangle (const Standard_Integer theITri,
const Standard_Integer theINode,
Standard_Integer& theJNode,
HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPINod& thePINod,
Standard_Real& theX,
Standard_Real& theY,
Standard_Real& theZ,
Standard_Boolean& theOK) const;
Standard_EXPORT void InitBiPointsWithConnexity (const Standard_Integer e, TopoDS_Edge& E, HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID, TopTools_ListOfShape& LS, const Standard_Boolean connex); Standard_EXPORT void InitBiPointsWithConnexity (const Standard_Integer theIEdge,
TopoDS_Edge& theEdge,
HLRAlgo_ListOfBPoint& theList,
NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
TopTools_ListOfShape& theLS,
const Standard_Boolean theIsConnex);
Standard_EXPORT void Interpolation (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1) const; Standard_EXPORT void Interpolation (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1) const;
@ -217,15 +257,33 @@ private:
Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Real X4, const Standard_Real Y4, const Standard_Real Z4, const Standard_Real XT4, const Standard_Real YT4, const Standard_Real ZT4, const Standard_Real coef4, const Standard_Real U4, const Standard_Boolean insP4, const Standard_Boolean mP4P1, const Standard_Integer flag) const; Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Real X4, const Standard_Real Y4, const Standard_Real Z4, const Standard_Real XT4, const Standard_Real YT4, const Standard_Real ZT4, const Standard_Real coef4, const Standard_Real U4, const Standard_Boolean insP4, const Standard_Boolean mP4P1, const Standard_Integer flag) const;
Standard_EXPORT void InsertOnOutLine (TColStd_Array1OfTransient& PID); Standard_EXPORT void InsertOnOutLine (NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
Standard_EXPORT void CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID); Standard_EXPORT void CheckFrBackTriangles (HLRAlgo_ListOfBPoint& theList,
NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
Standard_EXPORT void FindEdgeOnTriangle (const HLRAlgo_TriangleData& theTriangle, const Standard_Integer ip1, const Standard_Integer ip2, Standard_Integer& jtrouv, Standard_Boolean& isDirect) const; Standard_EXPORT void FindEdgeOnTriangle (const HLRAlgo_TriangleData& theTriangle, const Standard_Integer ip1, const Standard_Integer ip2, Standard_Integer& jtrouv, Standard_Boolean& isDirect) const;
Standard_EXPORT void ChangeNode (const Standard_Integer ip1, const Standard_Integer ip2, HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod2Indices, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, const Standard_Real coef1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Boolean first, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod) const; Standard_EXPORT void ChangeNode (const Standard_Integer theIp1,
const Standard_Integer theIp2,
HLRAlgo_PolyInternalNode::NodeIndices& theNod1Indices,
HLRAlgo_PolyInternalNode::NodeData& theNod1RValues,
HLRAlgo_PolyInternalNode::NodeIndices& theNod2Indices,
HLRAlgo_PolyInternalNode::NodeData& theNod2RValues,
const Standard_Real theCoef1,
const Standard_Real theX3,
const Standard_Real theY3,
const Standard_Real theZ3,
const Standard_Boolean theIsFirst,
HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPISeg& thePISeg,
HLRAlgo_Array1OfPINod& thePINod) const;
Standard_EXPORT void UpdateAroundNode (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData* TData, HLRAlgo_Array1OfPISeg* PISeg, HLRAlgo_Array1OfPINod* PINod) const; Standard_EXPORT void UpdateAroundNode (const Standard_Integer theINode,
HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices,
HLRAlgo_Array1OfTData& theTData,
HLRAlgo_Array1OfPISeg& thePISeg,
HLRAlgo_Array1OfPINod& thePINod) const;
Standard_EXPORT void OrientTriangle (const Standard_Integer iTri, HLRAlgo_TriangleData& theTriangle, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices3, HLRAlgo_PolyInternalNode::NodeData& Nod3RValues) const; Standard_EXPORT void OrientTriangle (const Standard_Integer iTri, HLRAlgo_TriangleData& theTriangle, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices3, HLRAlgo_PolyInternalNode::NodeData& Nod3RValues) const;
@ -237,11 +295,16 @@ private:
Standard_EXPORT void CheckDegeneratedSegment (HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod2Indices, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues) const; Standard_EXPORT void CheckDegeneratedSegment (HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod2Indices, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues) const;
Standard_EXPORT void UpdateOutLines (HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID); Standard_EXPORT void UpdateOutLines (HLRAlgo_ListOfBPoint& theList,
NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
Standard_EXPORT void UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& List, const TColStd_Array1OfTransient& PID, const Standard_Boolean closed); Standard_EXPORT void UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& theList,
const NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
const Standard_Boolean theIsClosed);
Standard_EXPORT void UpdatePolyData (TColStd_Array1OfTransient& PD, TColStd_Array1OfTransient& PID, const Standard_Boolean closed); Standard_EXPORT void UpdatePolyData (NCollection_Array1<Handle(HLRAlgo_PolyData)>& thePD,
NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
const Standard_Boolean theClosed);
Standard_EXPORT void TMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const; Standard_EXPORT void TMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const;