mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0032292: Coding Rules - improve HLRBRep_PolyAlgo readability part 3
Use typed collections instead Handle(Standard_Transient) values.
This commit is contained in:
parent
114e7a9022
commit
c1ce84dcb3
@ -29,7 +29,6 @@ HLRAlgo_ListIteratorOfListOfBPoint.hxx
|
||||
HLRAlgo_ListOfBPoint.hxx
|
||||
HLRAlgo_PolyAlgo.cxx
|
||||
HLRAlgo_PolyAlgo.hxx
|
||||
HLRAlgo_PolyAlgo.lxx
|
||||
HLRAlgo_PolyData.cxx
|
||||
HLRAlgo_PolyData.hxx
|
||||
HLRAlgo_PolyData.lxx
|
||||
@ -43,7 +42,6 @@ HLRAlgo_PolyInternalSegment.hxx
|
||||
HLRAlgo_PolyMask.hxx
|
||||
HLRAlgo_PolyShellData.cxx
|
||||
HLRAlgo_PolyShellData.hxx
|
||||
HLRAlgo_PolyShellData.lxx
|
||||
HLRAlgo_Projector.cxx
|
||||
HLRAlgo_Projector.hxx
|
||||
HLRAlgo_Projector.lxx
|
||||
|
@ -14,25 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef No_Exception
|
||||
//#define No_Exception
|
||||
#endif
|
||||
|
||||
#include <HLRAlgo_PolyAlgo.hxx>
|
||||
|
||||
#include <HLRAlgo_BiPoint.hxx>
|
||||
#include <HLRAlgo_EdgeStatus.hxx>
|
||||
#include <HLRAlgo_ListOfBPoint.hxx>
|
||||
#include <HLRAlgo_PolyAlgo.hxx>
|
||||
#include <HLRAlgo_PolyShellData.hxx>
|
||||
#include <HLRAlgo_PolyMask.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,Standard_Transient)
|
||||
|
||||
//static Standard_Integer ERROR = Standard_False;
|
||||
|
||||
//=======================================================================
|
||||
//function : HLRAlgo_PolyAlgo
|
||||
//purpose :
|
||||
@ -49,23 +41,21 @@ HLRAlgo_PolyAlgo::HLRAlgo_PolyAlgo ()
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void
|
||||
HLRAlgo_PolyAlgo::Init (const Handle(TColStd_HArray1OfTransient)& HShell)
|
||||
{ myHShell = HShell; }
|
||||
void HLRAlgo_PolyAlgo::Init (const Standard_Integer theNbShells)
|
||||
{
|
||||
myHShell.Resize (1, theNbShells, false);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void HLRAlgo_PolyAlgo::Clear ()
|
||||
void HLRAlgo_PolyAlgo::Clear()
|
||||
{
|
||||
if (!myHShell.IsNull()) {
|
||||
myHShell.Nullify();
|
||||
}
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyShellData)> anEmpty;
|
||||
myHShell.Move (anEmpty);
|
||||
myNbrShell = 0;
|
||||
}
|
||||
|
||||
@ -76,7 +66,7 @@ void HLRAlgo_PolyAlgo::Clear ()
|
||||
|
||||
void HLRAlgo_PolyAlgo::Update ()
|
||||
{
|
||||
Standard_Integer i,j;
|
||||
Standard_Integer j;
|
||||
Standard_Integer nxMin,nyMin,nzMin,nxMax,nyMax,nzMax;
|
||||
Standard_Real xShellMin,yShellMin,zShellMin;
|
||||
Standard_Real xShellMax,yShellMax,zShellMax;
|
||||
@ -88,14 +78,12 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
Standard_Real xSegmnMax,ySegmnMax,zSegmnMax;
|
||||
Standard_Real Big = Precision::Infinite();
|
||||
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++) {
|
||||
(*psd1)->UpdateGlobalMinMax(aBox);
|
||||
psd1++;
|
||||
myNbrShell = myHShell.Size();
|
||||
for (Standard_Integer aShellIter = myHShell.Lower(); aShellIter <= myHShell.Upper(); ++aShellIter)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyShellData)& aPsd = myHShell.ChangeValue (aShellIter);
|
||||
aPsd->UpdateGlobalMinMax (aBox);
|
||||
}
|
||||
|
||||
Standard_Real dx = aBox.XMax - aBox.XMin;
|
||||
@ -114,11 +102,10 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
Standard_Real DecaY = - aBox.YMin + precad;
|
||||
Standard_Real DecaZ = - aBox.ZMin + precad;
|
||||
|
||||
Handle(HLRAlgo_PolyShellData)* psd2 =
|
||||
(Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
|
||||
|
||||
for (i = 1; i <= myNbrShell; i++) {
|
||||
HLRAlgo_PolyShellData::ShellIndices& aShellIndices = (*psd2)->Indices();
|
||||
for (Standard_Integer aShellIter = myHShell.Lower(); aShellIter <= myHShell.Upper(); ++aShellIter)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyShellData)& aPsd = myHShell.ChangeValue (aShellIter);
|
||||
HLRAlgo_PolyShellData::ShellIndices& aShellIndices = aPsd->Indices();
|
||||
xShellMin = Big;
|
||||
yShellMin = Big;
|
||||
zShellMin = Big;
|
||||
@ -126,9 +113,8 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
yShellMax = -Big;
|
||||
zShellMax = -Big;
|
||||
|
||||
for (mySegListIt.Initialize((*psd2)->Edges());
|
||||
mySegListIt.More();
|
||||
mySegListIt.Next()) {
|
||||
for (mySegListIt.Initialize (aPsd->Edges()); mySegListIt.More(); mySegListIt.Next())
|
||||
{
|
||||
HLRAlgo_BiPoint& BP = mySegListIt.Value();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
|
||||
HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices();
|
||||
@ -157,14 +143,14 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
if (zShellMin > zSegmnMin) zShellMin = zSegmnMin;
|
||||
if (zShellMax < zSegmnMax) zShellMax = zSegmnMax;
|
||||
}
|
||||
TColStd_Array1OfTransient& Polyg = (*psd2)->PolyData();
|
||||
Standard_Integer nbFace = Polyg.Upper();
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyData)>& aPolyg = aPsd->PolyData();
|
||||
const Standard_Integer nbFace = aPolyg.Upper();
|
||||
Standard_Integer nbFaHi = 0;
|
||||
Handle(HLRAlgo_PolyData)* pd = NULL;
|
||||
if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1));
|
||||
|
||||
for (j = 1; j <= nbFace; j++) {
|
||||
if ((*pd)->Hiding()) {
|
||||
for (j = 1; j <= nbFace; j++)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyData)& aPd = aPolyg.ChangeValue (j);
|
||||
if (aPd->Hiding())
|
||||
{
|
||||
nbFaHi++;
|
||||
xPolyTMin = 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 adx1,ady1,adx2,ady2,adx3,ady3;
|
||||
Standard_Real a =0.,b =0.,c =0.,d =0.;
|
||||
HLRAlgo_PolyData::FaceIndices& PolyTIndices = (*pd)->Indices();
|
||||
TColgp_Array1OfXYZ & Nodes = (*pd)->Nodes();
|
||||
HLRAlgo_Array1OfTData& TData = (*pd)->TData();
|
||||
HLRAlgo_Array1OfPHDat& PHDat = (*pd)->PHDat();
|
||||
HLRAlgo_PolyData::FaceIndices& PolyTIndices = aPd->Indices();
|
||||
TColgp_Array1OfXYZ & Nodes = aPd->Nodes();
|
||||
HLRAlgo_Array1OfTData& TData = aPd->TData();
|
||||
HLRAlgo_Array1OfPHDat& PHDat = aPd->PHDat();
|
||||
Standard_Integer nbT = TData.Upper();
|
||||
HLRAlgo_TriangleData* TD = &(TData.ChangeValue(1));
|
||||
|
||||
for (otheri = 1; otheri <= nbT; otheri++) {
|
||||
if (TD->Flags & HLRAlgo_PolyMask_FMskHiding) {
|
||||
const gp_XYZ& P1 = Nodes(TD->Node1);
|
||||
const gp_XYZ& P2 = Nodes(TD->Node2);
|
||||
const gp_XYZ& P3 = Nodes(TD->Node3);
|
||||
HLRAlgo_TriangleData& aTD = TData.ChangeValue (otheri);
|
||||
if (aTD.Flags & HLRAlgo_PolyMask_FMskHiding) {
|
||||
const gp_XYZ& P1 = Nodes.Value (aTD.Node1);
|
||||
const gp_XYZ& P2 = Nodes.Value (aTD.Node2);
|
||||
const gp_XYZ& P3 = Nodes.Value (aTD.Node3);
|
||||
X1 = P1.X();
|
||||
Y1 = P1.Y();
|
||||
Z1 = P1.Z();
|
||||
@ -258,12 +244,12 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
ady3 = dy3;
|
||||
if (dx3 < 0) adx3 = -dx3;
|
||||
if (dy3 < 0) ady3 = -dy3;
|
||||
if (adx1 > ady1) TD->Flags |= HLRAlgo_PolyMask_EMskGrALin1;
|
||||
else TD->Flags &= ~HLRAlgo_PolyMask_EMskGrALin1;
|
||||
if (adx2 > ady2) TD->Flags |= HLRAlgo_PolyMask_EMskGrALin2;
|
||||
else TD->Flags &= ~HLRAlgo_PolyMask_EMskGrALin2;
|
||||
if (adx3 > ady3) TD->Flags |= HLRAlgo_PolyMask_EMskGrALin3;
|
||||
else TD->Flags &= ~HLRAlgo_PolyMask_EMskGrALin3;
|
||||
if (adx1 > ady1) aTD.Flags |= HLRAlgo_PolyMask_EMskGrALin1;
|
||||
else aTD.Flags &= ~HLRAlgo_PolyMask_EMskGrALin1;
|
||||
if (adx2 > ady2) aTD.Flags |= HLRAlgo_PolyMask_EMskGrALin2;
|
||||
else aTD.Flags &= ~HLRAlgo_PolyMask_EMskGrALin2;
|
||||
if (adx3 > ady3) aTD.Flags |= HLRAlgo_PolyMask_EMskGrALin3;
|
||||
else aTD.Flags &= ~HLRAlgo_PolyMask_EMskGrALin3;
|
||||
if (xPolyTMin > xTrianMin) xPolyTMin = xTrianMin;
|
||||
if (xPolyTMax < xTrianMax) xPolyTMax = xTrianMax;
|
||||
if (yPolyTMin > yTrianMin) yPolyTMin = yTrianMin;
|
||||
@ -271,7 +257,6 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
if (zPolyTMin > zTrianMin) zPolyTMin = zTrianMin;
|
||||
if (zPolyTMax < zTrianMax) zPolyTMax = zTrianMax;
|
||||
}
|
||||
TD++;
|
||||
}
|
||||
nxMin = (Standard_Integer)((DecaX + xPolyTMin) * SurDX);
|
||||
nyMin = (Standard_Integer)((DecaY + yPolyTMin) * SurDY);
|
||||
@ -292,7 +277,6 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
if (zShellMin > zPolyTMin) zShellMin = zPolyTMin;
|
||||
if (zShellMax < zPolyTMax) zShellMax = zPolyTMax;
|
||||
}
|
||||
pd++;
|
||||
}
|
||||
if (nbFaHi > 0) {
|
||||
nxMin = (Standard_Integer)((DecaX + xShellMin) * SurDX);
|
||||
@ -307,26 +291,23 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
aShellIndices.Max = nyMax + (nxMax << 11);
|
||||
aShellIndices.Max <<= 10;
|
||||
aShellIndices.Max += nzMax;
|
||||
(*psd2)->UpdateHiding(nbFaHi);
|
||||
TColStd_Array1OfTransient& PolHi = (*psd2)->HidingPolyData();
|
||||
pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1));
|
||||
Handle(HLRAlgo_PolyData)* phd =
|
||||
(Handle(HLRAlgo_PolyData)*)&(PolHi.ChangeValue(1));
|
||||
|
||||
for (j = 1; j <= nbFace; j++) {
|
||||
if ((*pd)->Hiding()) {
|
||||
*phd = *pd;
|
||||
phd++;
|
||||
}
|
||||
pd++;
|
||||
aPsd->UpdateHiding(nbFaHi);
|
||||
Standard_Integer aHiddenIndex = 1;
|
||||
for (j = 1; j <= nbFace; j++)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyData)& aPd = aPolyg.ChangeValue (j);
|
||||
if (aPd->Hiding())
|
||||
{
|
||||
aPsd->HidingPolyData().SetValue (aHiddenIndex++, aPd);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
(*psd2)->UpdateHiding(0);
|
||||
else
|
||||
{
|
||||
aPsd->UpdateHiding (0);
|
||||
aShellIndices.Min = 0;
|
||||
aShellIndices.Max = 0;
|
||||
}
|
||||
psd2++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,84 +315,80 @@ void HLRAlgo_PolyAlgo::Update ()
|
||||
//function : NextHide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void HLRAlgo_PolyAlgo::NextHide ()
|
||||
void HLRAlgo_PolyAlgo::NextHide()
|
||||
{
|
||||
myFound = Standard_False;
|
||||
if (myCurShell != 0) {
|
||||
if (myCurShell != 0)
|
||||
{
|
||||
mySegListIt.Next();
|
||||
if (mySegListIt.More()) myFound = Standard_True;
|
||||
}
|
||||
if (!myFound) {
|
||||
|
||||
if (!myFound)
|
||||
{
|
||||
myCurShell++;
|
||||
|
||||
//POP ADN pour que cela marche sur WNT
|
||||
// while (myCurShell <= myNbrShell && !myFound) {
|
||||
// mySegListIt.Initialize((*(Handle(HLRAlgo_PolyShellData)*)&
|
||||
// (myHShell->ChangeValue(myCurShell)))
|
||||
// ->Edges());
|
||||
while (myCurShell <= myNbrShell && !myFound) {
|
||||
Handle(HLRAlgo_PolyShellData) data =
|
||||
Handle(HLRAlgo_PolyShellData)::DownCast(myHShell->Value(myCurShell));
|
||||
mySegListIt.Initialize(data->Edges());
|
||||
if (mySegListIt.More()) myFound = Standard_True;
|
||||
else myCurShell++;
|
||||
while (myCurShell <= myNbrShell && !myFound)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyShellData)& aData = myHShell.ChangeValue (myCurShell);
|
||||
mySegListIt.Initialize (aData->Edges());
|
||||
if (mySegListIt.More()) { myFound = Standard_True; }
|
||||
else { myCurShell++; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Hide
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Hide (
|
||||
HLRAlgo_EdgeStatus& status,
|
||||
Standard_Integer& Index,
|
||||
Standard_Boolean& reg1,
|
||||
Standard_Boolean& regn,
|
||||
Standard_Boolean& outl,
|
||||
Standard_Boolean& intl)
|
||||
HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Hide (HLRAlgo_EdgeStatus& theStatus,
|
||||
Standard_Integer& theIndex,
|
||||
Standard_Boolean& theReg1,
|
||||
Standard_Boolean& theRegn,
|
||||
Standard_Boolean& theOutl,
|
||||
Standard_Boolean& theIntl)
|
||||
{
|
||||
HLRAlgo_BiPoint& BP = mySegListIt.Value();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
|
||||
HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices();
|
||||
status = HLRAlgo_EdgeStatus(0.,(Standard_ShortReal)myTriangle.TolParam,1.,(Standard_ShortReal)myTriangle.TolParam);
|
||||
Index = theIndices.ShapeIndex;
|
||||
reg1 = BP.Rg1Line();
|
||||
regn = BP.RgNLine();
|
||||
outl = BP.OutLine();
|
||||
intl = BP.IntLine();
|
||||
if (BP.Hidden())
|
||||
status.HideAll();
|
||||
else {
|
||||
Standard_Boolean HidingShell;
|
||||
TColStd_Array1OfTransient& Shell = myHShell->ChangeArray1();
|
||||
Handle(HLRAlgo_PolyShellData)* psd =
|
||||
(Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
|
||||
|
||||
for (Standard_Integer s = 1; s <= myNbrShell; s++) {
|
||||
if ((*psd)->Hiding()) {
|
||||
HLRAlgo_PolyShellData::ShellIndices& aShellIndices = (*psd)->Indices();
|
||||
if (((aShellIndices.Max - theIndices.MinSeg) & 0x80100200) == 0 &&
|
||||
((theIndices.MaxSeg - aShellIndices.Min) & 0x80100000) == 0) {
|
||||
HidingShell = (s == myCurShell);
|
||||
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++) {
|
||||
(*pd)->HideByPolyData(aPoints,
|
||||
myTriangle,
|
||||
theIndices,
|
||||
HidingShell,
|
||||
status);
|
||||
pd++;
|
||||
}
|
||||
}
|
||||
HLRAlgo_BiPoint& aBP = mySegListIt.Value();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = aBP.Points();
|
||||
HLRAlgo_BiPoint::IndicesT& anIndices = aBP.Indices();
|
||||
theStatus = HLRAlgo_EdgeStatus (0.0, (Standard_ShortReal)myTriangle.TolParam,
|
||||
1.0, (Standard_ShortReal)myTriangle.TolParam);
|
||||
theIndex = anIndices.ShapeIndex;
|
||||
theReg1 = aBP.Rg1Line();
|
||||
theRegn = aBP.RgNLine();
|
||||
theOutl = aBP.OutLine();
|
||||
theIntl = aBP.IntLine();
|
||||
if (aBP.Hidden())
|
||||
{
|
||||
theStatus.HideAll();
|
||||
return aPoints;
|
||||
}
|
||||
|
||||
for (Standard_Integer s = 1; s <= myNbrShell; s++)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyShellData)& aPsd = myHShell.ChangeValue (s);
|
||||
if (!aPsd->Hiding())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
HLRAlgo_PolyShellData::ShellIndices& aShellIndices = aPsd->Indices();
|
||||
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,
|
||||
anIndices,
|
||||
isHidingShell,
|
||||
theStatus);
|
||||
}
|
||||
psd++;
|
||||
}
|
||||
}
|
||||
return aPoints;
|
||||
@ -429,15 +406,15 @@ void HLRAlgo_PolyAlgo::NextShow ()
|
||||
mySegListIt.Next();
|
||||
if (mySegListIt.More()) myFound = Standard_True;
|
||||
}
|
||||
if (!myFound) {
|
||||
if (!myFound)
|
||||
{
|
||||
myCurShell++;
|
||||
|
||||
while (myCurShell <= myNbrShell && !myFound) {
|
||||
mySegListIt.Initialize((*(Handle(HLRAlgo_PolyShellData)*)&
|
||||
(myHShell->ChangeValue(myCurShell)))
|
||||
->Edges());
|
||||
if (mySegListIt.More()) myFound = Standard_True;
|
||||
else myCurShell++;
|
||||
while (myCurShell <= myNbrShell && !myFound)
|
||||
{
|
||||
mySegListIt.Initialize (myHShell.ChangeValue (myCurShell)->Edges());
|
||||
if (mySegListIt.More()) { myFound = Standard_True; }
|
||||
else { myCurShell++; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -464,4 +441,3 @@ HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Show (
|
||||
intl = BP.IntLine();
|
||||
return aPoints;
|
||||
}
|
||||
|
||||
|
@ -17,21 +17,12 @@
|
||||
#ifndef _HLRAlgo_PolyAlgo_HeaderFile
|
||||
#define _HLRAlgo_PolyAlgo_HeaderFile
|
||||
|
||||
#include <NCollection_Array1.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 <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <TColStd_Array1OfTransient.hxx>
|
||||
|
||||
class HLRAlgo_EdgeStatus;
|
||||
|
||||
class HLRAlgo_PolyShellData;
|
||||
|
||||
class HLRAlgo_PolyAlgo;
|
||||
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyAlgo, Standard_Transient)
|
||||
@ -42,64 +33,65 @@ class HLRAlgo_PolyAlgo : public Standard_Transient
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT HLRAlgo_PolyAlgo();
|
||||
|
||||
Standard_EXPORT void Init (const Handle(TColStd_HArray1OfTransient)& HShell);
|
||||
|
||||
TColStd_Array1OfTransient& PolyShell() const;
|
||||
|
||||
|
||||
Standard_EXPORT void Init (const Standard_Integer theNbShells);
|
||||
|
||||
const NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& PolyShell() const { return myHShell; }
|
||||
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& ChangePolyShell() { return myHShell; }
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
|
||||
//! Prepare all the data to process the algo.
|
||||
Standard_EXPORT void Update();
|
||||
|
||||
void InitHide();
|
||||
|
||||
Standard_Boolean MoreHide() const;
|
||||
|
||||
|
||||
void InitHide()
|
||||
{
|
||||
myCurShell = 0;
|
||||
NextHide();
|
||||
}
|
||||
|
||||
Standard_Boolean MoreHide() const { return myFound; }
|
||||
|
||||
Standard_EXPORT void NextHide();
|
||||
|
||||
|
||||
//! 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);
|
||||
|
||||
void InitShow();
|
||||
|
||||
Standard_Boolean MoreShow() const;
|
||||
|
||||
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()
|
||||
{
|
||||
myCurShell = 0;
|
||||
NextShow();
|
||||
}
|
||||
|
||||
Standard_Boolean MoreShow() const { return myFound; }
|
||||
|
||||
Standard_EXPORT void NextShow();
|
||||
|
||||
|
||||
//! 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)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HArray1OfTransient) myHShell;
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyShellData)> myHShell;
|
||||
HLRAlgo_PolyData::Triangle myTriangle;
|
||||
HLRAlgo_ListIteratorOfListOfBPoint mySegListIt;
|
||||
Standard_Integer myNbrShell;
|
||||
Standard_Integer myCurShell;
|
||||
Standard_Boolean myFound;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <HLRAlgo_PolyAlgo.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _HLRAlgo_PolyAlgo_HeaderFile
|
||||
|
@ -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; }
|
||||
|
@ -59,29 +59,24 @@ HLRAlgo_PolyInternalData::HLRAlgo_PolyInternalData
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateLinks
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
(HLRAlgo_Array1OfTData*& TData,
|
||||
HLRAlgo_Array1OfPISeg*& PISeg,
|
||||
HLRAlgo_Array1OfPINod*& PINod)
|
||||
void HLRAlgo_PolyInternalData::UpdateLinks (HLRAlgo_Array1OfTData& theTData,
|
||||
HLRAlgo_Array1OfPISeg& thePISeg,
|
||||
HLRAlgo_Array1OfPINod& thePINod)
|
||||
{
|
||||
Standard_Integer i,n1,n2;
|
||||
Standard_Integer n1,n2;
|
||||
Standard_Integer find,iiii,icsv = 0;
|
||||
HLRAlgo_PolyInternalSegment* aSegIndices = NULL;
|
||||
|
||||
Standard_Boolean newSeg = Standard_False;
|
||||
HLRAlgo_TriangleData* TD =
|
||||
&(((HLRAlgo_Array1OfTData*)TData)->ChangeValue(1));
|
||||
|
||||
for (i = 1; i <= myNbTData; i++) {
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& A1 =
|
||||
PINod->ChangeValue(TD->Node1)->Indices();
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& A2 =
|
||||
PINod->ChangeValue(TD->Node2)->Indices();
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& A3 =
|
||||
PINod->ChangeValue(TD->Node3)->Indices();
|
||||
Standard_Boolean newSeg = Standard_False;
|
||||
for (Standard_Integer i = 1; i <= myNbTData; i++)
|
||||
{
|
||||
HLRAlgo_TriangleData* TD = &theTData.ChangeValue (i);
|
||||
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& A1 = thePINod.ChangeValue(TD->Node1)->Indices();
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& A2 = thePINod.ChangeValue(TD->Node2)->Indices();
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& A3 = thePINod.ChangeValue(TD->Node3)->Indices();
|
||||
|
||||
{
|
||||
n1 = TD->Node1;
|
||||
@ -99,7 +94,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
find = 0;
|
||||
|
||||
while (iiii != 0 && find == 0) {
|
||||
aSegIndices = &PISeg->ChangeValue(iiii);
|
||||
aSegIndices = &thePISeg.ChangeValue (iiii);
|
||||
if (aSegIndices->LstSg1 == n1) {
|
||||
if (aSegIndices->LstSg2 == n2) find = iiii;
|
||||
else iiii = aSegIndices->NxtSg1;
|
||||
@ -129,7 +124,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
if (iiii != 0) {
|
||||
|
||||
while (iiii != 0) {
|
||||
aSegIndices = &PISeg->ChangeValue(iiii);
|
||||
aSegIndices = &thePISeg.ChangeValue (iiii);
|
||||
if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
|
||||
else { icsv = 2; iiii = aSegIndices->NxtSg2; }
|
||||
}
|
||||
@ -140,7 +135,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
}
|
||||
}
|
||||
if (newSeg) {
|
||||
aSegIndices = &PISeg->ChangeValue(myNbPISeg);
|
||||
aSegIndices = &thePISeg.ChangeValue (myNbPISeg);
|
||||
aSegIndices->LstSg1 = n1;
|
||||
aSegIndices->LstSg2 = n2;
|
||||
aSegIndices->Conex1 = i;
|
||||
@ -166,7 +161,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
find = 0;
|
||||
|
||||
while (iiii != 0 && find == 0) {
|
||||
aSegIndices = &PISeg->ChangeValue(iiii);
|
||||
aSegIndices = &thePISeg.ChangeValue (iiii);
|
||||
if (aSegIndices->LstSg1 == n1) {
|
||||
if (aSegIndices->LstSg2 == n2) find = iiii;
|
||||
else iiii = aSegIndices->NxtSg1;
|
||||
@ -196,7 +191,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
if (iiii != 0) {
|
||||
|
||||
while (iiii != 0) {
|
||||
aSegIndices = &PISeg->ChangeValue(iiii);
|
||||
aSegIndices = &thePISeg.ChangeValue (iiii);
|
||||
if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
|
||||
else { icsv = 2; iiii = aSegIndices->NxtSg2; }
|
||||
}
|
||||
@ -207,7 +202,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
}
|
||||
}
|
||||
if (newSeg) {
|
||||
aSegIndices = &PISeg->ChangeValue(myNbPISeg);
|
||||
aSegIndices = &thePISeg.ChangeValue (myNbPISeg);
|
||||
aSegIndices->LstSg1 = n1;
|
||||
aSegIndices->LstSg2 = n2;
|
||||
aSegIndices->Conex1 = i;
|
||||
@ -233,7 +228,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
find = 0;
|
||||
|
||||
while (iiii != 0 && find == 0) {
|
||||
aSegIndices = &PISeg->ChangeValue(iiii);
|
||||
aSegIndices = &thePISeg.ChangeValue (iiii);
|
||||
if (aSegIndices->LstSg1 == n1) {
|
||||
if (aSegIndices->LstSg2 == n2) find = iiii;
|
||||
else iiii = aSegIndices->NxtSg1;
|
||||
@ -263,7 +258,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
if (iiii != 0) {
|
||||
|
||||
while (iiii != 0) {
|
||||
aSegIndices = &PISeg->ChangeValue(iiii);
|
||||
aSegIndices = &thePISeg.ChangeValue (iiii);
|
||||
if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
|
||||
else { icsv = 2; iiii = aSegIndices->NxtSg2; }
|
||||
}
|
||||
@ -274,7 +269,7 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
}
|
||||
}
|
||||
if (newSeg) {
|
||||
aSegIndices = &PISeg->ChangeValue(myNbPISeg);
|
||||
aSegIndices = &thePISeg.ChangeValue (myNbPISeg);
|
||||
aSegIndices->LstSg1 = n1;
|
||||
aSegIndices->LstSg2 = n2;
|
||||
aSegIndices->Conex1 = i;
|
||||
@ -283,40 +278,35 @@ void HLRAlgo_PolyInternalData::UpdateLinks
|
||||
aSegIndices->NxtSg2 = 0;
|
||||
}
|
||||
}
|
||||
TD++;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AddNode
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer
|
||||
HLRAlgo_PolyInternalData::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_Integer HLRAlgo_PolyInternalData::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_Real coef2 = 1 - coef1;
|
||||
IncPINod(PINod1,PINod2);
|
||||
Standard_Real coef2 = 1 - theCoef1;
|
||||
IncPINod (thePINod1, thePINod2);
|
||||
Standard_Integer ip3 = myNbPINod;
|
||||
Handle(HLRAlgo_PolyInternalNode)* pip3 =
|
||||
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(ip3));
|
||||
*pip3 = new HLRAlgo_PolyInternalNode();
|
||||
HLRAlgo_PolyInternalNode::NodeData& Nod3RValues = (*pip3)->Data();
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& aNodeIndices = (*pip3)->Indices();
|
||||
Handle(HLRAlgo_PolyInternalNode)& pip3 = thePINod1->ChangeValue(ip3);
|
||||
pip3 = new HLRAlgo_PolyInternalNode();
|
||||
HLRAlgo_PolyInternalNode::NodeData& Nod3RValues = pip3->Data();
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& aNodeIndices = pip3->Indices();
|
||||
aNodeIndices.NdSg = 0;
|
||||
aNodeIndices.Flag = 0;
|
||||
Nod3RValues.Point = gp_XYZ(X3, Y3, Z3);
|
||||
Nod3RValues.UV = coef2 * Nod1RValues.UV + coef1 * Nod2RValues.UV;
|
||||
Nod3RValues.Scal = Nod1RValues.Scal * coef2 + Nod2RValues.Scal * coef1;
|
||||
const gp_XYZ aXYZ = coef2 * Nod1RValues.Normal + coef1 * Nod2RValues.Normal;
|
||||
Nod3RValues.Point = gp_XYZ (theX3, theY3, theZ3);
|
||||
Nod3RValues.UV = coef2 * theNod1RValues.UV + theCoef1 * theNod2RValues.UV;
|
||||
Nod3RValues.Scal = theNod1RValues.Scal * coef2 + theNod2RValues.Scal * theCoef1;
|
||||
const gp_XYZ aXYZ = coef2 * theNod1RValues.Normal + theCoef1 * theNod2RValues.Normal;
|
||||
const Standard_Real aNorm = aXYZ.Modulus();
|
||||
|
||||
if (aNorm > 0) {
|
||||
@ -749,13 +739,13 @@ void HLRAlgo_PolyInternalData::IncPISeg(
|
||||
|
||||
//=======================================================================
|
||||
//function : IncPINod
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void HLRAlgo_PolyInternalData::IncPINod(
|
||||
HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_Array1OfPINod*& PINod2)
|
||||
void HLRAlgo_PolyInternalData::IncPINod (HLRAlgo_Array1OfPINod*& PINod1,
|
||||
HLRAlgo_Array1OfPINod*& PINod2)
|
||||
{
|
||||
if (myNbPINod >= myMxPINod) {
|
||||
if (myNbPINod >= myMxPINod)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
std::cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << std::endl;
|
||||
@ -763,8 +753,7 @@ void HLRAlgo_PolyInternalData::IncPINod(
|
||||
Standard_Integer i,j,k;
|
||||
j = myMxPINod;
|
||||
k = 2 * j;
|
||||
Handle(HLRAlgo_HArray1OfPINod) NwPINod =
|
||||
new HLRAlgo_HArray1OfPINod(0,k);
|
||||
Handle(HLRAlgo_HArray1OfPINod) NwPINod = new HLRAlgo_HArray1OfPINod(0,k);
|
||||
HLRAlgo_Array1OfPINod& oPINod = myPINod->ChangeArray1();
|
||||
HLRAlgo_Array1OfPINod& nPINod = NwPINod->ChangeArray1();
|
||||
Handle(HLRAlgo_PolyInternalNode)* ON = &(oPINod.ChangeValue(1));
|
||||
|
@ -43,21 +43,39 @@ public:
|
||||
|
||||
|
||||
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 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 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 (HLRAlgo_Array1OfTData& theTData,
|
||||
HLRAlgo_Array1OfPISeg& thePISeg,
|
||||
HLRAlgo_Array1OfPINod& thePINod);
|
||||
|
||||
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 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 IncTData (HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfTData*& TData2);
|
||||
|
||||
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 DecPISeg();
|
||||
@ -89,14 +107,8 @@ public:
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyInternalData,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer myNbTData;
|
||||
Standard_Integer myNbPISeg;
|
||||
Standard_Integer myNbPINod;
|
||||
@ -109,10 +121,8 @@ private:
|
||||
Handle(HLRAlgo_HArray1OfPISeg) myPISeg;
|
||||
Handle(HLRAlgo_HArray1OfPINod) myPINod;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <HLRAlgo_PolyInternalData.lxx>
|
||||
|
||||
|
||||
|
@ -14,36 +14,26 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef No_Exception
|
||||
//#define No_Exception
|
||||
#endif
|
||||
|
||||
#include <HLRAlgo_PolyShellData.hxx>
|
||||
|
||||
#include <HLRAlgo_BiPoint.hxx>
|
||||
#include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
|
||||
#include <HLRAlgo_PolyData.hxx>
|
||||
#include <HLRAlgo_PolyShellData.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : HLRAlgo_PolyShellData
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
HLRAlgo_PolyShellData::
|
||||
HLRAlgo_PolyShellData (const Standard_Integer nbFace)
|
||||
: myPolyg(0,nbFace)
|
||||
HLRAlgo_PolyShellData::HLRAlgo_PolyShellData (const Standard_Integer nbFace)
|
||||
: myPolyg (1, nbFace)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateGlobalMinMax
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void
|
||||
HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
|
||||
void HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
|
||||
{
|
||||
HLRAlgo_ListIteratorOfListOfBPoint it;
|
||||
|
||||
@ -75,25 +65,26 @@ HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox)
|
||||
else if (theBox.ZMax < aPoints.PntP1.Z()) theBox.ZMax = aPoints.PntP1.Z();
|
||||
}
|
||||
}
|
||||
Standard_Integer nbFace = myPolyg.Upper();
|
||||
Handle(HLRAlgo_PolyData)* pd = NULL;
|
||||
if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(myPolyg.ChangeValue(1));
|
||||
|
||||
for (Standard_Integer i = 1; i <= nbFace; i++) {
|
||||
(*pd)->UpdateGlobalMinMax(theBox);
|
||||
pd++;
|
||||
for (Standard_Integer i = myPolyg.Lower(); i <= myPolyg.Upper(); i++)
|
||||
{
|
||||
const Handle(HLRAlgo_PolyData)& aPd = myPolyg.ChangeValue (i);
|
||||
aPd->UpdateGlobalMinMax (theBox);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateHiding
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void HLRAlgo_PolyShellData::
|
||||
UpdateHiding (const Standard_Integer nbHiding)
|
||||
void HLRAlgo_PolyShellData::UpdateHiding (const Standard_Integer nbHiding)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -17,16 +17,11 @@
|
||||
#ifndef _HLRAlgo_PolyShellData_HeaderFile
|
||||
#define _HLRAlgo_PolyShellData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <NCollection_Array1.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_Boolean.hxx>
|
||||
|
||||
#include <HLRAlgo_ListOfBPoint.hxx>
|
||||
#include <HLRAlgo_PolyData.hxx>
|
||||
|
||||
class HLRAlgo_PolyShellData;
|
||||
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyShellData, Standard_Transient)
|
||||
@ -41,52 +36,34 @@ public:
|
||||
Standard_Integer Min, Max;
|
||||
};
|
||||
|
||||
|
||||
Standard_EXPORT HLRAlgo_PolyShellData(const Standard_Integer nbFace);
|
||||
|
||||
Standard_EXPORT void UpdateGlobalMinMax (HLRAlgo_PolyData::Box& theBox);
|
||||
|
||||
Standard_EXPORT void UpdateHiding (const Standard_Integer nbHiding);
|
||||
|
||||
Standard_Boolean Hiding() const;
|
||||
|
||||
TColStd_Array1OfTransient& PolyData();
|
||||
|
||||
TColStd_Array1OfTransient& HidingPolyData();
|
||||
|
||||
HLRAlgo_ListOfBPoint& Edges();
|
||||
|
||||
ShellIndices& Indices()
|
||||
{
|
||||
return myIndices;
|
||||
}
|
||||
|
||||
Standard_Boolean Hiding() const { return !myHPolHi.IsEmpty(); }
|
||||
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyData)>& PolyData() { return myPolyg; }
|
||||
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyData)>& HidingPolyData() { return myHPolHi; }
|
||||
|
||||
HLRAlgo_ListOfBPoint& Edges() { return mySegList; }
|
||||
|
||||
ShellIndices& Indices()
|
||||
{
|
||||
return myIndices;
|
||||
}
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyShellData,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
ShellIndices myIndices;
|
||||
TColStd_Array1OfTransient myPolyg;
|
||||
Handle(TColStd_HArray1OfTransient) myHPolHi;
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyData)> myPolyg;
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyData)> myHPolHi;
|
||||
HLRAlgo_ListOfBPoint mySegList;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <HLRAlgo_PolyShellData.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _HLRAlgo_PolyShellData_HeaderFile
|
||||
|
@ -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
@ -29,7 +29,6 @@
|
||||
#include <HLRAlgo_PolyInternalNode.hxx>
|
||||
#include <HLRAlgo_Projector.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_Array1OfTransient.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
@ -189,22 +188,63 @@ private:
|
||||
Standard_EXPORT TopoDS_Shape MakeShape() const;
|
||||
|
||||
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 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 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_Boolean AverageNormal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, gp_XYZ& theNormal) const
|
||||
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 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 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 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 InitBiPointsWithConnexity (const Standard_Integer e, TopoDS_Edge& E, HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID, TopTools_ListOfShape& LS, const Standard_Boolean connex);
|
||||
|
||||
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 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, const GeomAbs_Shape rg, 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;
|
||||
@ -216,17 +256,35 @@ 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_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 CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID);
|
||||
|
||||
|
||||
Standard_EXPORT void InsertOnOutLine (NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
|
||||
|
||||
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 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 UpdateAroundNode (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, 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 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 Standard_Boolean Triangles (const Standard_Integer ip1, const Standard_Integer ip2, HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_Array1OfPISeg*& PISeg, Standard_Integer& iTri1, Standard_Integer& iTri2) const;
|
||||
@ -236,13 +294,18 @@ private:
|
||||
Standard_EXPORT void UVNode (HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, const Standard_Real coef1, Standard_Real& U3, Standard_Real& V3) 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 UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& List, const TColStd_Array1OfTransient& PID, const Standard_Boolean closed);
|
||||
|
||||
Standard_EXPORT void UpdatePolyData (TColStd_Array1OfTransient& PD, TColStd_Array1OfTransient& PID, const Standard_Boolean closed);
|
||||
|
||||
|
||||
Standard_EXPORT void UpdateOutLines (HLRAlgo_ListOfBPoint& theList,
|
||||
NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
|
||||
|
||||
Standard_EXPORT void UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& theList,
|
||||
const NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
|
||||
const Standard_Boolean theIsClosed);
|
||||
|
||||
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;
|
||||
|
||||
void TMultiply(gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user