mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-02 17:46:22 +03:00
OCC22145 Incorrect cutting BRepMesh_FastDiscretFace
This commit is contained in:
parent
4d183a4b4d
commit
703a6abd43
@ -1,7 +1,7 @@
|
||||
// File: BRep_Tool.cxx
|
||||
// Created: Wed Jul 7 15:35:57 1993
|
||||
// Author: Remi LEQUETTE
|
||||
// <rle@phylox>
|
||||
// File: BRep_Tool.cxx
|
||||
// Created: Wed Jul 7 15:35:57 1993
|
||||
// Author: Remi LEQUETTE
|
||||
// <rle@phylox>
|
||||
|
||||
|
||||
#include <BRep_Tool.ixx>
|
||||
@ -54,7 +54,7 @@ static
|
||||
//=======================================================================
|
||||
|
||||
const Handle(Geom_Surface)& BRep_Tool::Surface(const TopoDS_Face& F,
|
||||
TopLoc_Location& L)
|
||||
TopLoc_Location& L)
|
||||
{
|
||||
Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &F.TShape());
|
||||
L = F.Location() * TF->Location();
|
||||
@ -92,7 +92,7 @@ Handle(Geom_Surface) BRep_Tool::Surface(const TopoDS_Face& F)
|
||||
|
||||
const Handle(Poly_Triangulation)&
|
||||
BRep_Tool::Triangulation(const TopoDS_Face& F,
|
||||
TopLoc_Location& L)
|
||||
TopLoc_Location& L)
|
||||
{
|
||||
L = F.Location();
|
||||
return (*((Handle(BRep_TFace)*)&F.TShape()))->Triangulation();
|
||||
@ -132,9 +132,9 @@ static Handle(Geom_Curve) nullCurve;
|
||||
static Handle(Poly_Polygon3D) nullPolygon3D;
|
||||
|
||||
const Handle(Geom_Curve)& BRep_Tool::Curve(const TopoDS_Edge& E,
|
||||
TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
// find the representation
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr
|
||||
@ -162,8 +162,8 @@ const Handle(Geom_Curve)& BRep_Tool::Curve(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Handle(Geom_Curve) BRep_Tool::Curve(const TopoDS_Edge& E,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
Handle(Geom_Curve) C = Curve(E,L,First,Last);
|
||||
@ -211,7 +211,7 @@ Standard_Boolean BRep_Tool::IsGeometric(const TopoDS_Edge& E)
|
||||
//=======================================================================
|
||||
|
||||
const Handle(Poly_Polygon3D)& BRep_Tool::Polygon3D(const TopoDS_Edge& E,
|
||||
TopLoc_Location& L)
|
||||
TopLoc_Location& L)
|
||||
{
|
||||
// find the representation
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr
|
||||
@ -239,9 +239,9 @@ const Handle(Poly_Polygon3D)& BRep_Tool::Polygon3D(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
const TopoDS_Face& F,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
TopLoc_Location l;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,l);
|
||||
@ -267,10 +267,10 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
static Handle(Geom2d_Curve) nullPCurve;
|
||||
|
||||
Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
TopLoc_Location loc = L.Predivided(E.Location());
|
||||
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
|
||||
@ -285,9 +285,9 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
|
||||
GC->Range(First,Last);
|
||||
if (GC->IsCurveOnClosedSurface() && Eisreversed)
|
||||
return GC->PCurve2();
|
||||
return GC->PCurve2();
|
||||
else
|
||||
return GC->PCurve();
|
||||
return GC->PCurve();
|
||||
}
|
||||
itcr.Next();
|
||||
}
|
||||
@ -306,12 +306,11 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
|
||||
if (!GP.IsNull()) {
|
||||
|
||||
static Handle(GeomAdaptor_HCurve) HC;
|
||||
static Handle(GeomAdaptor_HSurface) HS;
|
||||
if (HC.IsNull()) {
|
||||
HC = new GeomAdaptor_HCurve();
|
||||
HS = new GeomAdaptor_HSurface();
|
||||
}
|
||||
Handle(GeomAdaptor_HCurve) HC;
|
||||
Handle(GeomAdaptor_HSurface) HS;
|
||||
|
||||
HC = new GeomAdaptor_HCurve();
|
||||
HS = new GeomAdaptor_HSurface();
|
||||
|
||||
TopLoc_Location LC;
|
||||
|
||||
@ -335,9 +334,9 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
|
||||
Handle(Geom_Curve) ProjOnPlane =
|
||||
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3d,f,l),
|
||||
Plane,
|
||||
Plane->Position().Direction(),
|
||||
Standard_True);
|
||||
Plane,
|
||||
Plane->Position().Direction(),
|
||||
Standard_True);
|
||||
|
||||
GeomAdaptor_Curve& GAC = HC->ChangeCurve();
|
||||
GAC.Load(ProjOnPlane);
|
||||
@ -347,7 +346,7 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
|
||||
if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
|
||||
Handle(Geom2d_TrimmedCurve) TC =
|
||||
(*((Handle(Geom2d_TrimmedCurve)*)&pc));
|
||||
(*((Handle(Geom2d_TrimmedCurve)*)&pc));
|
||||
pc = TC->BasisCurve();
|
||||
}
|
||||
First = f; Last = l;
|
||||
@ -363,11 +362,11 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
Handle(Geom2d_Curve)& C,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
Handle(Geom2d_Curve)& C,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
// find the representation
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr
|
||||
@ -397,12 +396,12 @@ void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
Handle(Geom2d_Curve)& C,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last,
|
||||
const Standard_Integer Index)
|
||||
Handle(Geom2d_Curve)& C,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last,
|
||||
const Standard_Integer Index)
|
||||
{
|
||||
Standard_Integer i = 0;
|
||||
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
|
||||
@ -418,18 +417,18 @@ void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
i++;
|
||||
if (i > Index) break;
|
||||
if (i == Index) {
|
||||
// JMB le 21 Mai 1999
|
||||
// on fait comme dans les autres methodes CurveOnSurface. c.a.d on tient
|
||||
// compte de l'orientation dans le cas des aretes de coutures (renvoi de PCurve2)
|
||||
// sinon on risque de louper des curves ou de ne pas obtenir la bonne.
|
||||
if (GC->IsCurveOnClosedSurface() && Eisreversed)
|
||||
C = GC->PCurve2();
|
||||
else
|
||||
C = GC->PCurve();
|
||||
S = GC->Surface();
|
||||
L = E.Location() * GC->Location();
|
||||
GC->Range(First,Last);
|
||||
return;
|
||||
// JMB le 21 Mai 1999
|
||||
// on fait comme dans les autres methodes CurveOnSurface. c.a.d on tient
|
||||
// compte de l'orientation dans le cas des aretes de coutures (renvoi de PCurve2)
|
||||
// sinon on risque de louper des curves ou de ne pas obtenir la bonne.
|
||||
if (GC->IsCurveOnClosedSurface() && Eisreversed)
|
||||
C = GC->PCurve2();
|
||||
else
|
||||
C = GC->PCurve();
|
||||
S = GC->Surface();
|
||||
L = E.Location() * GC->Location();
|
||||
GC->Range(First,Last);
|
||||
return;
|
||||
}
|
||||
}
|
||||
itcr.Next();
|
||||
@ -448,7 +447,7 @@ void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Handle(Poly_Polygon2D) BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Face& F)
|
||||
{
|
||||
TopLoc_Location l;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,l);
|
||||
@ -474,8 +473,8 @@ static Handle(Poly_Polygon2D) nullPolygon2D;
|
||||
|
||||
Handle(Poly_Polygon2D)
|
||||
BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
{
|
||||
TopLoc_Location l = L.Predivided(E.Location());
|
||||
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
|
||||
@ -488,9 +487,9 @@ Handle(Poly_Polygon2D)
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsPolygonOnSurface(S,l)) {
|
||||
if (cr->IsPolygonOnClosedSurface() && Eisreversed )
|
||||
return cr->Polygon2();
|
||||
return cr->Polygon2();
|
||||
else
|
||||
return cr->Polygon();
|
||||
return cr->Polygon();
|
||||
}
|
||||
itcr.Next();
|
||||
}
|
||||
@ -504,9 +503,9 @@ Handle(Poly_Polygon2D)
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
Handle(Poly_Polygon2D)& P,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L)
|
||||
Handle(Poly_Polygon2D)& P,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L)
|
||||
{
|
||||
// find the representation
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr
|
||||
@ -516,7 +515,7 @@ void BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsPolygonOnSurface()) {
|
||||
const Handle(BRep_PolygonOnSurface)& PS =
|
||||
*((Handle(BRep_PolygonOnSurface)*)&cr);
|
||||
*((Handle(BRep_PolygonOnSurface)*)&cr);
|
||||
P = PS->Polygon();
|
||||
S = PS->Surface();
|
||||
L = E.Location() * PS->Location();
|
||||
@ -536,10 +535,10 @@ void BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
Handle(Poly_Polygon2D)& P,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L,
|
||||
const Standard_Integer Index)
|
||||
Handle(Poly_Polygon2D)& P,
|
||||
Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L,
|
||||
const Standard_Integer Index)
|
||||
{
|
||||
Standard_Integer i = 0;
|
||||
|
||||
@ -551,14 +550,14 @@ void BRep_Tool::PolygonOnSurface(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsPolygonOnSurface()) {
|
||||
const Handle(BRep_PolygonOnSurface)& PS =
|
||||
*((Handle(BRep_PolygonOnSurface)*)&cr);
|
||||
*((Handle(BRep_PolygonOnSurface)*)&cr);
|
||||
i++;
|
||||
if (i > Index) break;
|
||||
if (i == Index) {
|
||||
P = PS->Polygon();
|
||||
S = PS->Surface();
|
||||
L = E.Location() * PS->Location();
|
||||
return;
|
||||
P = PS->Polygon();
|
||||
S = PS->Surface();
|
||||
L = E.Location() * PS->Location();
|
||||
return;
|
||||
}
|
||||
}
|
||||
itcr.Next();
|
||||
@ -580,8 +579,8 @@ static Handle(Poly_PolygonOnTriangulation) nullArray;
|
||||
|
||||
const Handle(Poly_PolygonOnTriangulation)&
|
||||
BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
const Handle(Poly_Triangulation)& T,
|
||||
const TopLoc_Location& L)
|
||||
const Handle(Poly_Triangulation)& T,
|
||||
const TopLoc_Location& L)
|
||||
{
|
||||
TopLoc_Location l = L.Predivided(E.Location());
|
||||
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
|
||||
@ -594,9 +593,9 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if ( cr->IsPolygonOnTriangulation(T,l)) {
|
||||
if ( cr->IsPolygonOnClosedTriangulation() && Eisreversed )
|
||||
return cr->PolygonOnTriangulation2();
|
||||
return cr->PolygonOnTriangulation2();
|
||||
else
|
||||
return cr->PolygonOnTriangulation();
|
||||
return cr->PolygonOnTriangulation();
|
||||
}
|
||||
itcr.Next();
|
||||
}
|
||||
@ -611,9 +610,9 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
|
||||
void
|
||||
BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
Handle(Poly_PolygonOnTriangulation)& P,
|
||||
Handle(Poly_Triangulation)& T,
|
||||
TopLoc_Location& L)
|
||||
Handle(Poly_PolygonOnTriangulation)& P,
|
||||
Handle(Poly_Triangulation)& T,
|
||||
TopLoc_Location& L)
|
||||
{
|
||||
// find the representation
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr
|
||||
@ -623,7 +622,7 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsPolygonOnTriangulation()) {
|
||||
const Handle(BRep_PolygonOnTriangulation)& PT =
|
||||
*((Handle(BRep_PolygonOnTriangulation)*)&cr);
|
||||
*((Handle(BRep_PolygonOnTriangulation)*)&cr);
|
||||
P = PT->PolygonOnTriangulation();
|
||||
T = PT->Triangulation();
|
||||
L = E.Location() * PT->Location();
|
||||
@ -644,10 +643,10 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
|
||||
void
|
||||
BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
Handle(Poly_PolygonOnTriangulation)& P,
|
||||
Handle(Poly_Triangulation)& T,
|
||||
TopLoc_Location& L,
|
||||
const Standard_Integer Index)
|
||||
Handle(Poly_PolygonOnTriangulation)& P,
|
||||
Handle(Poly_Triangulation)& T,
|
||||
TopLoc_Location& L,
|
||||
const Standard_Integer Index)
|
||||
{
|
||||
Standard_Integer i = 0;
|
||||
|
||||
@ -659,14 +658,14 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsPolygonOnTriangulation()) {
|
||||
const Handle(BRep_PolygonOnTriangulation)& PT =
|
||||
*((Handle(BRep_PolygonOnTriangulation)*)&cr);
|
||||
*((Handle(BRep_PolygonOnTriangulation)*)&cr);
|
||||
i++;
|
||||
if (i > Index) break;
|
||||
if (i == Index) {
|
||||
T = PT->Triangulation();
|
||||
P = PT->PolygonOnTriangulation();
|
||||
L = E.Location() * PT->Location();
|
||||
return;
|
||||
T = PT->Triangulation();
|
||||
P = PT->PolygonOnTriangulation();
|
||||
L = E.Location() * PT->Location();
|
||||
return;
|
||||
}
|
||||
}
|
||||
itcr.Next();
|
||||
@ -685,7 +684,7 @@ BRep_Tool::PolygonOnTriangulation(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Face& F)
|
||||
{
|
||||
TopLoc_Location l;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,l);
|
||||
@ -701,8 +700,8 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
{
|
||||
//modified by NIZNHY-PKV Fri Oct 17 12:16:58 2008f
|
||||
if (IsPlane(S)) {
|
||||
@ -719,7 +718,7 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
while (itcr.More()) {
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsCurveOnSurface(S,l) &&
|
||||
cr->IsCurveOnClosedSurface())
|
||||
cr->IsCurveOnClosedSurface())
|
||||
return Standard_True;
|
||||
itcr.Next();
|
||||
}
|
||||
@ -733,7 +732,7 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
const Handle(Poly_Triangulation)& T)
|
||||
const Handle(Poly_Triangulation)& T)
|
||||
{
|
||||
TopLoc_Location l = E.Location();
|
||||
|
||||
@ -744,7 +743,7 @@ Standard_Boolean BRep_Tool::IsClosed(const TopoDS_Edge& E,
|
||||
while (itcr.More()) {
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsPolygonOnTriangulation(T,l) &&
|
||||
cr->IsPolygonOnClosedTriangulation())
|
||||
cr->IsPolygonOnClosedTriangulation())
|
||||
return Standard_True;
|
||||
itcr.Next();
|
||||
}
|
||||
@ -800,8 +799,8 @@ Standard_Boolean BRep_Tool::Degenerated(const TopoDS_Edge& E)
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
// set the range to all the representations
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr
|
||||
@ -812,9 +811,9 @@ void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
if (cr->IsCurve3D()) {
|
||||
const Handle(BRep_Curve3D)& CR = *((Handle(BRep_Curve3D)*)&cr);
|
||||
if (!CR->Curve3D().IsNull()) {
|
||||
First = CR->First();
|
||||
Last = CR->Last();
|
||||
break;
|
||||
First = CR->First();
|
||||
Last = CR->Last();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (cr->IsCurveOnSurface()) {
|
||||
@ -833,10 +832,10 @@ void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
TopLoc_Location l = L.Predivided(E.Location());
|
||||
|
||||
@ -864,9 +863,9 @@ void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
const TopoDS_Face& F,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
|
||||
@ -879,10 +878,10 @@ void BRep_Tool::Range(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::UVPoints(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
gp_Pnt2d& PFirst,
|
||||
gp_Pnt2d& PLast)
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
gp_Pnt2d& PFirst,
|
||||
gp_Pnt2d& PLast)
|
||||
{
|
||||
TopLoc_Location l = L.Predivided(E.Location());
|
||||
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
|
||||
@ -895,9 +894,9 @@ void BRep_Tool::UVPoints(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsCurveOnSurface(S,l)) {
|
||||
if (cr->IsCurveOnClosedSurface() && Eisreversed)
|
||||
(*((Handle(BRep_CurveOnClosedSurface)*)&cr))->UVPoints2(PFirst,PLast);
|
||||
(*((Handle(BRep_CurveOnClosedSurface)*)&cr))->UVPoints2(PFirst,PLast);
|
||||
else
|
||||
(*((Handle(BRep_CurveOnSurface)*)&cr))->UVPoints(PFirst,PLast);
|
||||
(*((Handle(BRep_CurveOnSurface)*)&cr))->UVPoints(PFirst,PLast);
|
||||
return;
|
||||
}
|
||||
itcr.Next();
|
||||
@ -946,9 +945,9 @@ void BRep_Tool::UVPoints(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::UVPoints(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F,
|
||||
gp_Pnt2d& PFirst,
|
||||
gp_Pnt2d& PLast)
|
||||
const TopoDS_Face& F,
|
||||
gp_Pnt2d& PFirst,
|
||||
gp_Pnt2d& PLast)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
|
||||
@ -969,10 +968,10 @@ void BRep_Tool::UVPoints(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
const gp_Pnt2d& PFirst,
|
||||
const gp_Pnt2d& PLast)
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
const gp_Pnt2d& PFirst,
|
||||
const gp_Pnt2d& PLast)
|
||||
{
|
||||
TopLoc_Location l = L.Predivided(E.Location());
|
||||
Standard_Boolean Eisreversed = (E.Orientation() == TopAbs_REVERSED);
|
||||
@ -985,11 +984,11 @@ void BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsCurveOnSurface(S,l)) {
|
||||
if (cr->IsCurveOnClosedSurface() && Eisreversed)
|
||||
(*((Handle(BRep_CurveOnClosedSurface)*) &cr))->
|
||||
SetUVPoints2(PFirst,PLast);
|
||||
(*((Handle(BRep_CurveOnClosedSurface)*) &cr))->
|
||||
SetUVPoints2(PFirst,PLast);
|
||||
else
|
||||
(*((Handle(BRep_CurveOnSurface)*) &cr))->
|
||||
SetUVPoints(PFirst,PLast);
|
||||
(*((Handle(BRep_CurveOnSurface)*) &cr))->
|
||||
SetUVPoints(PFirst,PLast);
|
||||
}
|
||||
itcr.Next();
|
||||
}
|
||||
@ -1001,9 +1000,9 @@ void BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F,
|
||||
const gp_Pnt2d& PFirst,
|
||||
const gp_Pnt2d& PLast)
|
||||
const TopoDS_Face& F,
|
||||
const gp_Pnt2d& PFirst,
|
||||
const gp_Pnt2d& PLast)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
|
||||
@ -1024,8 +1023,8 @@ void BRep_Tool::SetUVPoints(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2)
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2)
|
||||
{
|
||||
TopLoc_Location l1,l2;
|
||||
const Handle(Geom_Surface)& S1 = BRep_Tool::Surface(F1,l1);
|
||||
@ -1039,8 +1038,8 @@ Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
GeomAbs_Shape BRep_Tool::Continuity(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2)
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2)
|
||||
{
|
||||
TopLoc_Location l1,l2;
|
||||
const Handle(Geom_Surface)& S1 = BRep_Tool::Surface(F1,l1);
|
||||
@ -1054,10 +1053,10 @@ GeomAbs_Shape BRep_Tool::Continuity(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const TopLoc_Location& L1,
|
||||
const TopLoc_Location& L2)
|
||||
const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const TopLoc_Location& L1,
|
||||
const TopLoc_Location& L2)
|
||||
{
|
||||
const TopLoc_Location& Eloc = E.Location();
|
||||
TopLoc_Location l1 = L1.Predivided(Eloc);
|
||||
@ -1082,10 +1081,10 @@ Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
GeomAbs_Shape BRep_Tool::Continuity(const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const TopLoc_Location& L1,
|
||||
const TopLoc_Location& L2)
|
||||
const Handle(Geom_Surface)& S1,
|
||||
const Handle(Geom_Surface)& S2,
|
||||
const TopLoc_Location& L1,
|
||||
const TopLoc_Location& L2)
|
||||
{
|
||||
TopLoc_Location l1 = L1.Predivided(E.Location());
|
||||
TopLoc_Location l2 = L2.Predivided(E.Location());
|
||||
@ -1135,7 +1134,7 @@ Standard_Real BRep_Tool::Tolerance(const TopoDS_Vertex& V)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
const TopoDS_Edge& E)
|
||||
const TopoDS_Edge& E)
|
||||
{
|
||||
|
||||
// Search the vertex in the edge
|
||||
@ -1158,13 +1157,13 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
const TopoDS_Shape& Vcur = itv.Value();
|
||||
if (V.IsSame(Vcur)) {
|
||||
if (VF.IsNull()) {
|
||||
VF = Vcur;
|
||||
VF = Vcur;
|
||||
}
|
||||
else {
|
||||
rev = E.Orientation() == TopAbs_REVERSED;
|
||||
if (Vcur.Orientation() == V.Orientation()) {
|
||||
VF = Vcur;
|
||||
}
|
||||
rev = E.Orientation() == TopAbs_REVERSED;
|
||||
if (Vcur.Orientation() == V.Orientation()) {
|
||||
VF = Vcur;
|
||||
}
|
||||
}
|
||||
}
|
||||
itv.Next();
|
||||
@ -1190,30 +1189,30 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
L = L.Predivided(V.Location());
|
||||
if (!C.IsNull() || Degenerated(E)) {
|
||||
BRep_ListIteratorOfListOfPointRepresentation itpr
|
||||
((*((Handle(BRep_TVertex)*) &V.TShape()))->Points());
|
||||
((*((Handle(BRep_TVertex)*) &V.TShape()))->Points());
|
||||
|
||||
while (itpr.More()) {
|
||||
const Handle(BRep_PointRepresentation)& pr = itpr.Value();
|
||||
if (pr->IsPointOnCurve(C,L)) {
|
||||
Standard_Real p = pr->Parameter();
|
||||
Standard_Real res = p;// SVV 4 nov 99 - to avoid warnings on Linux
|
||||
if (!C.IsNull()) {
|
||||
// Closed curves RLE 16 june 94
|
||||
if (Precision::IsNegativeInfinite(f)) return pr->Parameter();//p;
|
||||
if (Precision::IsPositiveInfinite(l)) return pr->Parameter();//p;
|
||||
gp_Pnt Pf = C->Value(f).Transformed(L.Transformation());
|
||||
gp_Pnt Pl = C->Value(l).Transformed(L.Transformation());
|
||||
Standard_Real tol = BRep_Tool::Tolerance(V);
|
||||
if (Pf.Distance(Pl) < tol) {
|
||||
if (Pf.Distance(BRep_Tool::Pnt(V)) < tol) {
|
||||
if (V.Orientation() == TopAbs_FORWARD) res = f;//p = f;
|
||||
else res = l;//p = l;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;//p;
|
||||
}
|
||||
itpr.Next();
|
||||
const Handle(BRep_PointRepresentation)& pr = itpr.Value();
|
||||
if (pr->IsPointOnCurve(C,L)) {
|
||||
Standard_Real p = pr->Parameter();
|
||||
Standard_Real res = p;// SVV 4 nov 99 - to avoid warnings on Linux
|
||||
if (!C.IsNull()) {
|
||||
// Closed curves RLE 16 june 94
|
||||
if (Precision::IsNegativeInfinite(f)) return pr->Parameter();//p;
|
||||
if (Precision::IsPositiveInfinite(l)) return pr->Parameter();//p;
|
||||
gp_Pnt Pf = C->Value(f).Transformed(L.Transformation());
|
||||
gp_Pnt Pl = C->Value(l).Transformed(L.Transformation());
|
||||
Standard_Real tol = BRep_Tool::Tolerance(V);
|
||||
if (Pf.Distance(Pl) < tol) {
|
||||
if (Pf.Distance(BRep_Tool::Pnt(V)) < tol) {
|
||||
if (V.Orientation() == TopAbs_FORWARD) res = f;//p = f;
|
||||
else res = l;//p = l;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;//p;
|
||||
}
|
||||
itpr.Next();
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1224,23 +1223,23 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
BRep_Tool::CurveOnSurface(E,PC,S,L,f,l);
|
||||
L = L.Predivided(V.Location());
|
||||
BRep_ListIteratorOfListOfPointRepresentation itpr
|
||||
((*((Handle(BRep_TVertex)*) &V.TShape()))->Points());
|
||||
((*((Handle(BRep_TVertex)*) &V.TShape()))->Points());
|
||||
|
||||
while (itpr.More()) {
|
||||
const Handle(BRep_PointRepresentation)& pr = itpr.Value();
|
||||
if (pr->IsPointOnCurveOnSurface(PC,S,L)) {
|
||||
Standard_Real p = pr->Parameter();
|
||||
// Closed curves RLE 16 june 94
|
||||
if (PC->IsClosed()) {
|
||||
if ((p == PC->FirstParameter()) ||
|
||||
(p == PC->LastParameter())) {
|
||||
if (V.Orientation() == TopAbs_FORWARD) p = PC->FirstParameter();
|
||||
else p = PC->LastParameter();
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
itpr.Next();
|
||||
const Handle(BRep_PointRepresentation)& pr = itpr.Value();
|
||||
if (pr->IsPointOnCurveOnSurface(PC,S,L)) {
|
||||
Standard_Real p = pr->Parameter();
|
||||
// Closed curves RLE 16 june 94
|
||||
if (PC->IsClosed()) {
|
||||
if ((p == PC->FirstParameter()) ||
|
||||
(p == PC->LastParameter())) {
|
||||
if (V.Orientation() == TopAbs_FORWARD) p = PC->FirstParameter();
|
||||
else p = PC->LastParameter();
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
itpr.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1256,8 +1255,8 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
|
||||
@ -1271,9 +1270,9 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
//=======================================================================
|
||||
|
||||
Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
const TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
{
|
||||
// Search the vertex in the edge
|
||||
|
||||
@ -1285,9 +1284,9 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
if (V.IsSame(itv.Value())) {
|
||||
if (VF.IsNull()) VF = itv.Value();
|
||||
else {
|
||||
rev = E.Orientation() == TopAbs_REVERSED;
|
||||
if (itv.Value().Orientation() == V.Orientation())
|
||||
VF = itv.Value();
|
||||
rev = E.Orientation() == TopAbs_REVERSED;
|
||||
if (itv.Value().Orientation() == V.Orientation())
|
||||
VF = itv.Value();
|
||||
}
|
||||
}
|
||||
itv.Next();
|
||||
@ -1332,23 +1331,23 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
while (itpr.More()) {
|
||||
const Handle(BRep_PointRepresentation)& pr = itpr.Value();
|
||||
if (pr->IsPointOnCurve(C,L1)) {
|
||||
Standard_Real p = pr->Parameter();
|
||||
Standard_Real res = p;
|
||||
if (!C.IsNull()) {
|
||||
// Closed curves RLE 16 june 94
|
||||
if (Precision::IsNegativeInfinite(f)) return res;
|
||||
if (Precision::IsPositiveInfinite(l)) return res;
|
||||
gp_Pnt Pf = C->Value(f).Transformed(L1.Transformation());
|
||||
gp_Pnt Pl = C->Value(l).Transformed(L1.Transformation());
|
||||
Standard_Real tol = BRep_Tool::Tolerance(V);
|
||||
if (Pf.Distance(Pl) < tol) {
|
||||
if (Pf.Distance(BRep_Tool::Pnt(V)) < tol) {
|
||||
if (V.Orientation() == TopAbs_FORWARD) res = f;
|
||||
else res = l;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
Standard_Real p = pr->Parameter();
|
||||
Standard_Real res = p;
|
||||
if (!C.IsNull()) {
|
||||
// Closed curves RLE 16 june 94
|
||||
if (Precision::IsNegativeInfinite(f)) return res;
|
||||
if (Precision::IsPositiveInfinite(l)) return res;
|
||||
gp_Pnt Pf = C->Value(f).Transformed(L1.Transformation());
|
||||
gp_Pnt Pl = C->Value(l).Transformed(L1.Transformation());
|
||||
Standard_Real tol = BRep_Tool::Tolerance(V);
|
||||
if (Pf.Distance(Pl) < tol) {
|
||||
if (Pf.Distance(BRep_Tool::Pnt(V)) < tol) {
|
||||
if (V.Orientation() == TopAbs_FORWARD) res = f;
|
||||
else res = l;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
itpr.Next();
|
||||
}
|
||||
@ -1366,7 +1365,7 @@ Standard_Real BRep_Tool::Parameter(const TopoDS_Vertex& V,
|
||||
//=======================================================================
|
||||
|
||||
gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Face& F)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
|
||||
@ -1378,7 +1377,7 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V,
|
||||
while (itpr.More()) {
|
||||
if (itpr.Value()->IsPointOnSurface(S,L)) {
|
||||
return gp_Pnt2d(itpr.Value()->Parameter(),
|
||||
itpr.Value()->Parameter2());
|
||||
itpr.Value()->Parameter2());
|
||||
}
|
||||
itpr.Next();
|
||||
}
|
||||
|
@ -1,140 +1,139 @@
|
||||
-- File: BRepMesh.cdl
|
||||
-- Created: Wed Sep 22 17:34:57 1993
|
||||
-- Author: Didier PIFFAULT
|
||||
-- <dpf@zerox>
|
||||
---Copyright: Matra Datavision 1993, 1994
|
||||
-- File: BRepMesh.cdl
|
||||
-- Created: Wed Sep 22 17:34:57 1993
|
||||
-- Author: Didier PIFFAULT
|
||||
-- <dpf@zerox>
|
||||
---Copyright: Matra Datavision 1993, 1994
|
||||
|
||||
|
||||
package BRepMesh
|
||||
package BRepMesh
|
||||
|
||||
---Purpose: Instantiated package for the class of packages
|
||||
-- MeshAlgo, and so on ...
|
||||
---Purpose: Instantiated package for the class of packages
|
||||
-- MeshAlgo, and so on ...
|
||||
|
||||
---Level : Advanced.
|
||||
-- All methods of all classes will be advanced.
|
||||
|
||||
|
||||
uses Standard,
|
||||
gp,
|
||||
Bnd,
|
||||
TColStd,
|
||||
TColgp,
|
||||
GCPnts,
|
||||
BRepAdaptor,
|
||||
BRepTopAdaptor,
|
||||
MeshDS,
|
||||
MeshAlgo,
|
||||
TCollection,
|
||||
MMgt,
|
||||
TopoDS,
|
||||
TopAbs,
|
||||
TopExp,
|
||||
TopTools,
|
||||
Poly,
|
||||
Geom2d,
|
||||
GeomAbs,
|
||||
GeomAdaptor
|
||||
gp,
|
||||
Bnd,
|
||||
TColStd,
|
||||
TColgp,
|
||||
GCPnts,
|
||||
BRepAdaptor,
|
||||
BRepTopAdaptor,
|
||||
MeshDS,
|
||||
MeshAlgo,
|
||||
TCollection,
|
||||
MMgt,
|
||||
TopoDS,
|
||||
TopAbs,
|
||||
TopExp,
|
||||
TopTools,
|
||||
Poly,
|
||||
Geom2d,
|
||||
GeomAbs,
|
||||
GeomAdaptor,
|
||||
TopLoc
|
||||
|
||||
|
||||
is
|
||||
|
||||
enumeration Status is
|
||||
---Purpose: Discribes the wires discretisation.
|
||||
NoError,
|
||||
OpenWire,
|
||||
SelfIntersectingWire,
|
||||
Failure,
|
||||
ReMesh
|
||||
|
||||
end Status;
|
||||
|
||||
enumeration FactoryError is
|
||||
FE_NOERROR,
|
||||
FE_LIBRARYNOTFOUND,
|
||||
FE_FUNCTIONNOTFOUND,
|
||||
FE_CANNOTCREATEALGO
|
||||
end FactoryError;
|
||||
|
||||
class Vertex;
|
||||
enumeration Status is
|
||||
---Purpose: Discribes the wires discretisation.
|
||||
NoError,
|
||||
OpenWire,
|
||||
SelfIntersectingWire,
|
||||
Failure,
|
||||
ReMesh
|
||||
end Status;
|
||||
|
||||
enumeration FactoryError is
|
||||
FE_NOERROR,
|
||||
FE_LIBRARYNOTFOUND,
|
||||
FE_FUNCTIONNOTFOUND,
|
||||
FE_CANNOTCREATEALGO
|
||||
end FactoryError;
|
||||
|
||||
class Vertex;
|
||||
|
||||
class Edge;
|
||||
class Edge;
|
||||
|
||||
class Triangle;
|
||||
class Triangle;
|
||||
|
||||
class ShapeTool;
|
||||
|
||||
deferred class DiscretRoot;
|
||||
class DiscretFactory;
|
||||
--
|
||||
pointer PDiscretRoot to DiscretRoot from BRepMesh;
|
||||
--
|
||||
class ShapeTool;
|
||||
|
||||
deferred class DiscretRoot;
|
||||
class DiscretFactory;
|
||||
--
|
||||
pointer PDiscretRoot to DiscretRoot from BRepMesh;
|
||||
--
|
||||
|
||||
class Delaun instantiates Delaunay from MeshAlgo(Vertex from BRepMesh,
|
||||
Edge from BRepMesh,
|
||||
Triangle from BRepMesh);
|
||||
class Delaun instantiates Delaunay from MeshAlgo(Vertex from BRepMesh,
|
||||
Edge from BRepMesh,
|
||||
Triangle from BRepMesh);
|
||||
|
||||
class DataMapOfVertexInteger instantiates DataMap from TCollection
|
||||
(Vertex from TopoDS, Integer from Standard, ShapeMapHasher from TopTools);
|
||||
class DataMapOfVertexInteger instantiates DataMap from TCollection
|
||||
(Vertex from TopoDS, Integer from Standard, ShapeMapHasher from TopTools);
|
||||
|
||||
class ListOfVertex instantiates List from TCollection
|
||||
(Vertex from BRepMesh);
|
||||
class ListOfVertex instantiates List from TCollection
|
||||
(Vertex from BRepMesh);
|
||||
|
||||
class ListOfXY instantiates List from TCollection (XY from gp);
|
||||
|
||||
class DataMapOfIntegerListOfXY instantiates DataMap from TCollection
|
||||
(Integer from Standard, ListOfXY from BRepMesh, MapIntegerHasher from TColStd);
|
||||
class DataMapOfIntegerListOfXY instantiates DataMap from TCollection
|
||||
(Integer from Standard, ListOfXY from BRepMesh, MapIntegerHasher from TColStd);
|
||||
|
||||
|
||||
class VertexHasher instantiates MapHasher from TCollection(Vertex from BRepMesh);
|
||||
class VertexHasher instantiates MapHasher from TCollection(Vertex from BRepMesh);
|
||||
|
||||
class IndexedMapOfVertex instantiates IndexedMap from TCollection
|
||||
(Vertex from BRepMesh, VertexHasher from BRepMesh);
|
||||
class IndexedMapOfVertex instantiates IndexedMap from TCollection
|
||||
(Vertex from BRepMesh, VertexHasher from BRepMesh);
|
||||
|
||||
|
||||
class DataMapOfShapeReal instantiates DataMap from TCollection
|
||||
(Shape from TopoDS,
|
||||
Real from Standard,
|
||||
ShapeMapHasher from TopTools);
|
||||
class DataMapOfShapeReal instantiates DataMap from TCollection
|
||||
(Shape from TopoDS,
|
||||
Real from Standard,
|
||||
ShapeMapHasher from TopTools);
|
||||
|
||||
class BiPoint;
|
||||
|
||||
class Array1OfBiPoint instantiates Array1 from TCollection
|
||||
(BiPoint from BRepMesh);
|
||||
class BiPoint;
|
||||
|
||||
class Array1OfBiPoint instantiates Array1 from TCollection(BiPoint from BRepMesh);
|
||||
|
||||
class FastDiscret;
|
||||
|
||||
class FaceAttribute;
|
||||
|
||||
class DataMapOfFaceAttribute instantiates DataMap from TCollection
|
||||
(Face from TopoDS,
|
||||
FaceAttribute from BRepMesh,
|
||||
ShapeMapHasher from TopTools);
|
||||
private class FastDiscretFace;
|
||||
|
||||
class FastDiscret;
|
||||
|
||||
class FaceAttribute;
|
||||
|
||||
class DataMapOfFaceAttribute instantiates DataMap from TCollection
|
||||
(Face from TopoDS,
|
||||
FaceAttribute from BRepMesh,
|
||||
ShapeMapHasher from TopTools);
|
||||
|
||||
private class Classifier;
|
||||
imported ClassifierPtr; -- smart pointer on Classifier
|
||||
|
||||
private class FastDiscretFace;
|
||||
|
||||
private class Classifier;
|
||||
imported ClassifierPtr; -- smart pointer on Classifier
|
||||
class IncrementalMesh from BRepMesh;
|
||||
---Purpose: meshes faces from a Shape only if necessary.
|
||||
|
||||
class IncrementalMesh from BRepMesh;
|
||||
---Purpose: meshes faces from a Shape only if necessary.
|
||||
---- classes moved from MeshShape
|
||||
class GeomTool;
|
||||
|
||||
---- classes moved from MeshShape
|
||||
class GeomTool;
|
||||
class DataMapOfIntegerPnt instantiates
|
||||
DataMap from TCollection (Integer from Standard,
|
||||
Pnt from gp,
|
||||
MapIntegerHasher from TColStd);
|
||||
|
||||
class DataMapOfIntegerPnt instantiates
|
||||
DataMap from TCollection (Integer from Standard,
|
||||
Pnt from gp,
|
||||
MapIntegerHasher from TColStd);
|
||||
class PairOfPolygon;
|
||||
|
||||
class PairOfPolygon;
|
||||
class DataMapOfShapePairOfPolygon instantiates
|
||||
DataMap from TCollection(Shape from TopoDS,
|
||||
PairOfPolygon from BRepMesh,
|
||||
ShapeMapHasher from TopTools);
|
||||
|
||||
class DataMapOfShapePairOfPolygon instantiates
|
||||
DataMap from TCollection(Shape from TopoDS,
|
||||
PairOfPolygon from BRepMesh,
|
||||
ShapeMapHasher from TopTools);
|
||||
Mesh(S: Shape from TopoDS; d: Real from Standard);
|
||||
---Purpose: call to incremental mesh.
|
||||
|
||||
Mesh(S: Shape from TopoDS; d: Real from Standard);
|
||||
---Purpose: call to incremental mesh.
|
||||
|
||||
|
||||
|
||||
end BRepMesh;
|
||||
|
@ -1,320 +1,301 @@
|
||||
-- File: BRepMesh_FastDiscret.cdl
|
||||
-- Created: Tue Feb 27 14:21:35 1996
|
||||
-- Author: Laurent PAINNOT
|
||||
-- <lpa@nonox>
|
||||
---Copyright: Matra Datavision 1996
|
||||
-- File: BRepMesh_FastDiscret.cdl
|
||||
-- Created: Tue Feb 27 14:21:35 1996
|
||||
-- Author: Laurent PAINNOT
|
||||
-- <lpa@nonox>
|
||||
---Copyright: Matra Datavision 1996
|
||||
|
||||
|
||||
class FastDiscret from BRepMesh inherits TShared from MMgt
|
||||
|
||||
---Purpose: Algorithm to mesh a shape with respect of the
|
||||
-- frontier the deflection and by option the shared
|
||||
-- components.
|
||||
---Purpose: Algorithm to mesh a shape with respect of the
|
||||
-- frontier the deflection and by option the shared
|
||||
-- components.
|
||||
|
||||
|
||||
uses Boolean from Standard,
|
||||
Integer from Standard,
|
||||
Box from Bnd,
|
||||
Real from Standard,
|
||||
Shape from TopoDS,
|
||||
Face from TopoDS,
|
||||
Edge from TopoDS,
|
||||
FaceAttribute from BRepMesh,
|
||||
Vertex from TopoDS,
|
||||
Triangle from BRepMesh,
|
||||
Vertex from BRepMesh,
|
||||
Edge from BRepMesh,
|
||||
ListOfInteger from TColStd,
|
||||
MapOfInteger from TColStd,
|
||||
SequenceOfInteger from TColStd,
|
||||
ListOfReal from TColStd,
|
||||
IndexedMapOfInteger from TColStd,
|
||||
SequenceOfPnt2d from TColgp,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Integer from Standard,
|
||||
Box from Bnd,
|
||||
Real from Standard,
|
||||
Shape from TopoDS,
|
||||
Face from TopoDS,
|
||||
Edge from TopoDS,
|
||||
FaceAttribute from BRepMesh,
|
||||
Vertex from TopoDS,
|
||||
Triangle from BRepMesh,
|
||||
Vertex from BRepMesh,
|
||||
Edge from BRepMesh,
|
||||
ListOfInteger from TColStd,
|
||||
MapOfInteger from TColStd,
|
||||
SequenceOfInteger from TColStd,
|
||||
ListOfReal from TColStd,
|
||||
IndexedMapOfInteger from TColStd,
|
||||
SequenceOfPnt2d from TColgp,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
XY from gp,
|
||||
Pnt2d from gp,
|
||||
DataMapOfIntegerPnt from BRepMesh,
|
||||
DataMapOfIntegerListOfXY from BRepMesh,
|
||||
DataMapOfShapePairOfPolygon from BRepMesh,
|
||||
Delaun from BRepMesh,
|
||||
DataMapOfVertexInteger from BRepMesh,
|
||||
DataStructureOfDelaun from BRepMesh,
|
||||
ListOfVertex from BRepMesh,
|
||||
MapOfShape from TopTools,
|
||||
HSurface from BRepAdaptor,
|
||||
ClassifierPtr from BRepMesh,
|
||||
Pnt2d from gp,
|
||||
DataMapOfIntegerPnt from BRepMesh,
|
||||
DataMapOfIntegerListOfXY from BRepMesh,
|
||||
DataMapOfShapePairOfPolygon from BRepMesh,
|
||||
Delaun from BRepMesh,
|
||||
DataMapOfVertexInteger from BRepMesh,
|
||||
DataStructureOfDelaun from BRepMesh,
|
||||
ListOfVertex from BRepMesh,
|
||||
MapOfShape from TopTools,
|
||||
HSurface from BRepAdaptor,
|
||||
ClassifierPtr from BRepMesh,
|
||||
IndexedMapOfReal from TColStd,
|
||||
Status from BRepMesh,
|
||||
DataMapOfShapeReal from TopTools,
|
||||
ListOfShape from TopTools,
|
||||
Curve from Geom2d,
|
||||
MapOfInteger from MeshDS,
|
||||
BaseAllocator from MeshDS,
|
||||
DataMapOfFaceAttribute from BRepMesh
|
||||
|
||||
Status from BRepMesh,
|
||||
DataMapOfShapeReal from TopTools,
|
||||
ListOfShape from TopTools,
|
||||
Curve from Geom2d,
|
||||
MapOfInteger from MeshDS,
|
||||
BaseAllocator from MeshDS,
|
||||
DataMapOfFaceAttribute from BRepMesh
|
||||
|
||||
is
|
||||
|
||||
is
|
||||
|
||||
Create (defle : Real from Standard;
|
||||
angle : Real from Standard;
|
||||
B : Box from Bnd;
|
||||
withShare : Boolean from Standard=Standard_True;
|
||||
inshape : Boolean from Standard=Standard_False;
|
||||
relative : Boolean from Standard=Standard_False;
|
||||
shapetrigu: Boolean from Standard=Standard_False)
|
||||
returns mutable FastDiscret from BRepMesh;
|
||||
angle : Real from Standard;
|
||||
B : Box from Bnd;
|
||||
withShare : Boolean from Standard=Standard_True;
|
||||
inshape : Boolean from Standard=Standard_False;
|
||||
relative : Boolean from Standard=Standard_False;
|
||||
shapetrigu: Boolean from Standard=Standard_False)
|
||||
returns mutable FastDiscret from BRepMesh;
|
||||
|
||||
|
||||
Create (defle : Real from Standard;
|
||||
shape : Shape from TopoDS;
|
||||
B : Box from Bnd;
|
||||
angle : Real from Standard;
|
||||
withShare : Boolean from Standard=Standard_True;
|
||||
inshape : Boolean from Standard=Standard_False;
|
||||
relative : Boolean from Standard=Standard_False;
|
||||
shapetrigu: Boolean from Standard=Standard_False)
|
||||
---Purpose: if the boolean <relative> is True, the
|
||||
-- deflection used for the polygonalisation of
|
||||
-- each edge will be <defle> * Size of Edge.
|
||||
-- the deflection used for the faces will be the maximum
|
||||
-- deflection of their edges.
|
||||
--
|
||||
-- if <shapetrigu> is True, the triangulation, if exists
|
||||
-- with a correct deflection, can be used to re-triangulate
|
||||
-- the shape.
|
||||
--
|
||||
-- if <inshape> is True, the calculated
|
||||
-- triangulation will be stored in the shape.
|
||||
returns mutable FastDiscret from BRepMesh;
|
||||
Create (defle : Real from Standard;
|
||||
shape : Shape from TopoDS;
|
||||
B : Box from Bnd;
|
||||
angle : Real from Standard;
|
||||
withShare : Boolean from Standard=Standard_True;
|
||||
inshape : Boolean from Standard=Standard_False;
|
||||
relative : Boolean from Standard=Standard_False;
|
||||
shapetrigu: Boolean from Standard=Standard_False)
|
||||
---Purpose: if the boolean <relative> is True, the
|
||||
-- deflection used for the polygonalisation of
|
||||
-- each edge will be <defle> * Size of Edge.
|
||||
-- the deflection used for the faces will be the maximum
|
||||
-- deflection of their edges.
|
||||
--
|
||||
-- if <shapetrigu> is True, the triangulation, if exists
|
||||
-- with a correct deflection, can be used to re-triangulate
|
||||
-- the shape.
|
||||
--
|
||||
-- if <inshape> is True, the calculated
|
||||
-- triangulation will be stored in the shape.
|
||||
returns mutable FastDiscret from BRepMesh;
|
||||
|
||||
|
||||
Perform (me: mutable; shape: Shape from TopoDS) is static;
|
||||
---Purpose: Build triangulation on the whole shape
|
||||
Perform (me: mutable; shape: Shape from TopoDS) is static;
|
||||
---Purpose: Build triangulation on the whole shape
|
||||
|
||||
Add (me: mutable; face: Face from TopoDS) is static;
|
||||
---Purpose: Record a face for further processing.
|
||||
Add (me: mutable; face: Face from TopoDS) is static;
|
||||
---Purpose: Record a face for further processing.
|
||||
|
||||
Process (me; face: Face from TopoDS) is static;
|
||||
---Purpose: Triangulate a face previously recorded for
|
||||
-- processing by call to Add(). Can be executed in
|
||||
-- parallel threads.
|
||||
---C++: alias operator ()
|
||||
Process (me; face: Face from TopoDS) is static;
|
||||
---Purpose: Triangulate a face previously recorded for
|
||||
-- processing by call to Add(). Can be executed in
|
||||
-- parallel threads.
|
||||
---C++: alias operator ()
|
||||
|
||||
InternalVerticesMode(me: mutable) returns Boolean from Standard;
|
||||
---Purpose: Returns mode defining if internal vertices on faces
|
||||
-- are taken into consideration or not. If this mode is equal to true
|
||||
-- that internal vertices on faces are considered during triangulation.
|
||||
-- Default value is equal to false (old behaviour).
|
||||
---C++: return &
|
||||
---C++: inline
|
||||
CurrentFaceStatus(me)
|
||||
returns Status from BRepMesh;
|
||||
|
||||
CurrentFaceStatus(me)
|
||||
returns Status from BRepMesh;
|
||||
|
||||
Add (me : mutable;
|
||||
edge : Edge from TopoDS;
|
||||
face : Face from TopoDS;
|
||||
S : HSurface from BRepAdaptor;
|
||||
C : Curve from Geom2d;
|
||||
defedge: Real from Standard;
|
||||
Add (me : mutable;
|
||||
edge : Edge from TopoDS;
|
||||
face : Face from TopoDS;
|
||||
S : HSurface from BRepAdaptor;
|
||||
C : Curve from Geom2d;
|
||||
defedge: Real from Standard;
|
||||
first : Real from Standard;
|
||||
last : Real from Standard)
|
||||
is static private;
|
||||
|
||||
Add (me : mutable;
|
||||
is static private;
|
||||
|
||||
Add (me : mutable;
|
||||
theVert: Vertex from TopoDS;
|
||||
face : Face from TopoDS;
|
||||
S : HSurface from BRepAdaptor) is private;
|
||||
face : Face from TopoDS;
|
||||
S : HSurface from BRepAdaptor) is private;
|
||||
|
||||
Update (me: mutable;
|
||||
Edge: Edge from TopoDS;
|
||||
Face: Face from TopoDS;
|
||||
Update (me: mutable;
|
||||
Edge : Edge from TopoDS;
|
||||
Face : Face from TopoDS;
|
||||
C : Curve from Geom2d;
|
||||
defedge: Real from Standard;
|
||||
first : Real from Standard;
|
||||
last : Real from Standard)
|
||||
|
||||
returns Boolean is private;
|
||||
|
||||
|
||||
InternalVertices
|
||||
(me : mutable;
|
||||
caro : HSurface from BRepAdaptor;
|
||||
inter : in out ListOfVertex from BRepMesh;
|
||||
defedge : Real from Standard;
|
||||
classifier : ClassifierPtr from BRepMesh)
|
||||
is static private;
|
||||
defedge: Real from Standard;
|
||||
first : Real from Standard;
|
||||
last : Real from Standard)
|
||||
returns Boolean is private;
|
||||
|
||||
|
||||
Control
|
||||
(me : mutable;
|
||||
caro : HSurface from BRepAdaptor;
|
||||
defface : Real from Standard;
|
||||
inter : in out ListOfVertex from BRepMesh;
|
||||
badTri : in out ListOfInteger from TColStd;
|
||||
nulTri : in out ListOfInteger from TColStd;
|
||||
trigu : in out Delaun from BRepMesh;
|
||||
isfirst : Boolean from Standard)
|
||||
returns Real from Standard is static private;
|
||||
InternalVertices
|
||||
(me : mutable;
|
||||
caro : HSurface from BRepAdaptor;
|
||||
inter : in out ListOfVertex from BRepMesh;
|
||||
defedge : Real from Standard;
|
||||
classifier : ClassifierPtr from BRepMesh)
|
||||
is static private;
|
||||
|
||||
|
||||
FindUV(me: mutable; V: Vertex from TopoDS;
|
||||
XY: Pnt2d from gp;
|
||||
ip: Integer from Standard;
|
||||
S : HSurface from BRepAdaptor;
|
||||
mindist: Real from Standard)
|
||||
returns XY from gp is private;
|
||||
Control (me : mutable;
|
||||
caro : HSurface from BRepAdaptor;
|
||||
defface : Real from Standard;
|
||||
inter : in out ListOfVertex from BRepMesh;
|
||||
badTri : in out ListOfInteger from TColStd;
|
||||
nulTri : in out ListOfInteger from TColStd;
|
||||
trigu : in out Delaun from BRepMesh;
|
||||
isfirst : Boolean from Standard)
|
||||
returns Real from Standard is static private;
|
||||
|
||||
AddInShape(me: mutable; face : Face from TopoDS;
|
||||
defedge: Real from Standard)
|
||||
is static private;
|
||||
AddInShape(me: mutable;
|
||||
face : Face from TopoDS;
|
||||
defedge: Real from Standard)
|
||||
is static private;
|
||||
|
||||
|
||||
-- Output :
|
||||
|
||||
|
||||
NbTriangles(me)
|
||||
---Purpose: Gives the number of built triangles.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Triangle (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the triangle of <Index>.
|
||||
---C++: return const &
|
||||
returns Triangle from BRepMesh
|
||||
is static;
|
||||
|
||||
|
||||
NbEdges (me)
|
||||
---Purpose: Gives the number of built Edges
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Edge (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the edge of index <Index>.
|
||||
---C++: return const &
|
||||
returns Edge from BRepMesh
|
||||
is static;
|
||||
|
||||
|
||||
NbVertices (me)
|
||||
---Purpose: Gives the number of built Vertices.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Vertex (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Vertex from BRepMesh
|
||||
is static;
|
||||
|
||||
Pnt (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the location3d of the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
|
||||
VerticesOfDomain
|
||||
(me; Indices : in out MapOfInteger from MeshDS)
|
||||
---Purpose: Gives the list of indices of the vertices
|
||||
is static;
|
||||
|
||||
|
||||
EdgesOfDomain
|
||||
(me; Indices : in out MapOfInteger from MeshDS)
|
||||
---Purpose: Gives the list of indices of the edges
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
TrianglesOfDomain(me; Indices: in out MapOfInteger from MeshDS)
|
||||
---Purpose: Gives the list of indices of the triangles
|
||||
---C++: inline
|
||||
NbTriangles(me)
|
||||
---Purpose: Gives the number of built triangles.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
|
||||
NbPoint3d (me)
|
||||
---Purpose: Gives the number of different location in 3d
|
||||
-- space. It is different of the number of
|
||||
-- vertices if there is more than one surface.
|
||||
-- Even for one surface, the number can be different
|
||||
-- if an edge is shared.
|
||||
---C++: inline
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Point3d (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the 3d space location of the vertex <Index>.
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
Triangle (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the triangle of <Index>.
|
||||
---C++: return const &
|
||||
returns Triangle from BRepMesh
|
||||
is static;
|
||||
|
||||
|
||||
GetDeflection(me)
|
||||
---Purpose: returns the deflection value.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
GetAngle(me)
|
||||
---Purpose: returns the deflection value.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
WithShare(me)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
InShape(me)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
NbEdges (me)
|
||||
---Purpose: Gives the number of built Edges
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Edge (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the edge of index <Index>.
|
||||
---C++: return const &
|
||||
returns Edge from BRepMesh
|
||||
is static;
|
||||
|
||||
NbVertices (me)
|
||||
---Purpose: Gives the number of built Vertices.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Vertex (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Vertex from BRepMesh
|
||||
is static;
|
||||
|
||||
Pnt (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the location3d of the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
|
||||
VerticesOfDomain
|
||||
(me; Indices : in out MapOfInteger from MeshDS)
|
||||
---Purpose: Gives the list of indices of the vertices
|
||||
is static;
|
||||
|
||||
|
||||
EdgesOfDomain
|
||||
(me; Indices : in out MapOfInteger from MeshDS)
|
||||
---Purpose: Gives the list of indices of the edges
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
TrianglesOfDomain(me; Indices: in out MapOfInteger from MeshDS)
|
||||
---Purpose: Gives the list of indices of the triangles
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
NbPoint3d (me)
|
||||
---Purpose: Gives the number of different location in 3d
|
||||
-- space. It is different of the number of
|
||||
-- vertices if there is more than one surface.
|
||||
-- Even for one surface, the number can be different
|
||||
-- if an edge is shared.
|
||||
---C++: inline
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Point3d (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the 3d space location of the vertex <Index>.
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
|
||||
|
||||
GetDeflection(me)
|
||||
---Purpose: returns the deflection value.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
GetAngle(me)
|
||||
---Purpose: returns the deflection value.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
WithShare(me)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
InShape(me)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
ShapeTrigu(me)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
GetFaceAttribute(me;
|
||||
face : Face from TopoDS;
|
||||
fattrib : in out FaceAttribute from BRepMesh)
|
||||
---Purpose: returns the face deflection value.
|
||||
returns Boolean from Standard;
|
||||
|
||||
RemoveFaceAttribute(me : mutable;
|
||||
face : Face from TopoDS);
|
||||
---Purpose: remove face attribute as useless to free locate memory
|
||||
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
GetFaceAttribute(me;
|
||||
face : Face from TopoDS;
|
||||
fattrib : in out FaceAttribute from BRepMesh)
|
||||
---Purpose: returns the face deflection value.
|
||||
returns Boolean from Standard;
|
||||
|
||||
RemoveFaceAttribute(me : mutable;
|
||||
face : Face from TopoDS);
|
||||
---Purpose: remove face attribute as useless to free locate memory
|
||||
|
||||
GetMapOfDefEdge(me)
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
returns DataMapOfShapeReal from TopTools;
|
||||
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
returns DataMapOfShapeReal from TopTools;
|
||||
|
||||
fields
|
||||
myangle : Real from Standard;
|
||||
mydeflection : Real from Standard;
|
||||
mydtotale : Real from Standard;
|
||||
myWithShare : Boolean from Standard;
|
||||
vertices : DataMapOfVertexInteger from BRepMesh;
|
||||
edges : DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
internaledges: DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
nbLocat : Integer from Standard;
|
||||
Location3d : DataMapOfIntegerPnt from BRepMesh;
|
||||
structure : DataStructureOfDelaun from BRepMesh;
|
||||
mapattrib : DataMapOfFaceAttribute from BRepMesh;
|
||||
myvemap : IndexedMapOfInteger from TColStd;
|
||||
mylocation2d : DataMapOfIntegerListOfXY from BRepMesh;
|
||||
myrelative : Boolean from Standard;
|
||||
myshapetrigu : Boolean from Standard;
|
||||
myinshape : Boolean from Standard;
|
||||
myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices
|
||||
myfacestate : Status from BRepMesh;
|
||||
mapdefle : DataMapOfShapeReal from TopTools;
|
||||
mynottriangulated : ListOfShape from TopTools;
|
||||
myAllocator : BaseAllocator from MeshDS;
|
||||
|
||||
myAngle : Real from Standard;
|
||||
myDeflection : Real from Standard;
|
||||
myDtotale : Real from Standard;
|
||||
myWithShare : Boolean from Standard;
|
||||
myVertices : DataMapOfVertexInteger from BRepMesh;
|
||||
myEdges : DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
myInternaledges: DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
myNbLocat : Integer from Standard;
|
||||
myLocation3d : DataMapOfIntegerPnt from BRepMesh;
|
||||
myStructure : DataStructureOfDelaun from BRepMesh;
|
||||
myMapattrib : DataMapOfFaceAttribute from BRepMesh;
|
||||
myVemap : IndexedMapOfInteger from TColStd;
|
||||
myLocation2d : DataMapOfIntegerListOfXY from BRepMesh;
|
||||
myRelative : Boolean from Standard;
|
||||
myShapetrigu : Boolean from Standard;
|
||||
myInshape : Boolean from Standard;
|
||||
myFacestate : Status from BRepMesh;
|
||||
myMapdefle : DataMapOfShapeReal from TopTools;
|
||||
myNottriangulated : ListOfShape from TopTools;
|
||||
myAllocator : BaseAllocator from MeshDS;
|
||||
|
||||
end FastDiscret;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,21 +1,11 @@
|
||||
// File: BRepMesh_FastDiscret.lxx
|
||||
// Created: Fri Sep 26 16:39:53 2003
|
||||
// Author: Open CASCADE Support
|
||||
// <support@opencascade.com>
|
||||
// Copyright: Open CASCADE 2003
|
||||
// File: BRepMesh_FastDiscret.lxx
|
||||
// Created: Fri Sep 26 16:39:53 2003
|
||||
// Author: Open CASCADE Support
|
||||
// <support@opencascade.com>
|
||||
// Copyright: Open CASCADE 2003
|
||||
|
||||
#include <BRepMesh_DataStructureOfDelaun.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : InternalVerticesMode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean& BRepMesh_FastDiscret::InternalVerticesMode ()
|
||||
{
|
||||
return myInternalVerticesMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetDeflection
|
||||
//purpose :
|
||||
@ -23,7 +13,7 @@ inline Standard_Boolean& BRepMesh_FastDiscret::InternalVerticesMode ()
|
||||
|
||||
inline Standard_Real BRepMesh_FastDiscret::GetDeflection() const
|
||||
{
|
||||
return mydeflection;
|
||||
return myDeflection;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -33,7 +23,7 @@ inline Standard_Real BRepMesh_FastDiscret::GetDeflection() const
|
||||
|
||||
inline Standard_Real BRepMesh_FastDiscret::GetAngle() const
|
||||
{
|
||||
return myangle;
|
||||
return myAngle;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -43,7 +33,7 @@ inline Standard_Real BRepMesh_FastDiscret::GetAngle() const
|
||||
|
||||
inline const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge() const
|
||||
{
|
||||
return mapdefle;
|
||||
return myMapdefle;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -53,7 +43,7 @@ inline const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge(
|
||||
|
||||
inline void BRepMesh_FastDiscret::EdgesOfDomain(MeshDS_MapOfInteger& Indices) const
|
||||
{
|
||||
Indices = structure->LinkOfDomain();
|
||||
Indices = myStructure->LinkOfDomain();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -63,7 +53,7 @@ inline void BRepMesh_FastDiscret::EdgesOfDomain(MeshDS_MapOfInteger& Indices) c
|
||||
|
||||
inline void BRepMesh_FastDiscret::TrianglesOfDomain(MeshDS_MapOfInteger& Indices) const
|
||||
{
|
||||
Indices = structure->ElemOfDomain();
|
||||
Indices = myStructure->ElemOfDomain();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -73,7 +63,7 @@ inline void BRepMesh_FastDiscret::TrianglesOfDomain(MeshDS_MapOfInteger& Indice
|
||||
|
||||
inline Standard_Integer BRepMesh_FastDiscret::NbPoint3d() const
|
||||
{
|
||||
return nbLocat;
|
||||
return myNbLocat;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -83,7 +73,7 @@ inline Standard_Integer BRepMesh_FastDiscret::NbPoint3d() const
|
||||
|
||||
inline const gp_Pnt& BRepMesh_FastDiscret::Point3d(const Standard_Integer Index) const
|
||||
{
|
||||
return Location3d(Index);
|
||||
return myLocation3d(Index);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -103,7 +93,7 @@ inline Standard_Boolean BRepMesh_FastDiscret::WithShare() const
|
||||
|
||||
inline Standard_Boolean BRepMesh_FastDiscret::InShape() const
|
||||
{
|
||||
return myinshape;
|
||||
return myInshape;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -113,5 +103,5 @@ inline Standard_Boolean BRepMesh_FastDiscret::InShape() const
|
||||
|
||||
inline Standard_Boolean BRepMesh_FastDiscret::ShapeTrigu() const
|
||||
{
|
||||
return myshapetrigu;
|
||||
return myShapetrigu;
|
||||
}
|
||||
|
@ -1,165 +1,158 @@
|
||||
-- File: BRepMesh_FastDiscretFace.cdl
|
||||
-- Created: Tue Oct 28 14:10:54 2008
|
||||
-- Author:
|
||||
-- <epa@TOSTEX>
|
||||
---Copyright: Matra Datavision 2008
|
||||
-- File: BRepMesh_FastDiscretFace.cdl
|
||||
-- Created: Tue Oct 28 14:10:54 2008
|
||||
-- Author:
|
||||
-- <epa@TOSTEX>
|
||||
---Copyright: Matra Datavision 2008
|
||||
|
||||
private class FastDiscretFace from BRepMesh inherits TShared from MMgt
|
||||
|
||||
---Purpose: Algorithm to mesh a face with respect of the
|
||||
-- frontier the deflection and by option the shared
|
||||
-- components.
|
||||
---Purpose: Algorithm to mesh a face with respect of the
|
||||
-- frontier the deflection and by option the shared
|
||||
-- components.
|
||||
|
||||
|
||||
uses Boolean from Standard,
|
||||
Integer from Standard,
|
||||
Real from Standard,
|
||||
Face from TopoDS,
|
||||
Edge from TopoDS,
|
||||
Vertex from TopoDS,
|
||||
ListOfShape from TopTools,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
Integer from Standard,
|
||||
Real from Standard,
|
||||
Face from TopoDS,
|
||||
Edge from TopoDS,
|
||||
Vertex from TopoDS,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
XY from gp,
|
||||
HSurface from BRepAdaptor,
|
||||
Delaun from BRepMesh,
|
||||
DataStructureOfDelaun from BRepMesh,
|
||||
DataMapOfVertexInteger from BRepMesh,
|
||||
DataMapOfIntegerListOfXY from BRepMesh,
|
||||
DataMapOfShapeReal from TopTools,
|
||||
ListOfVertex from BRepMesh,
|
||||
ClassifierPtr from BRepMesh,
|
||||
Triangle from BRepMesh,
|
||||
Edge from BRepMesh,
|
||||
Vertex from BRepMesh,
|
||||
Status from BRepMesh,
|
||||
FaceAttribute from BRepMesh,
|
||||
Curve from Geom2d,
|
||||
ListOfInteger from TColStd,
|
||||
BaseAllocator from MeshDS,
|
||||
MapOfInteger from MeshDS,
|
||||
DataMapOfIntegerPnt from BRepMesh,
|
||||
IndexedMapOfInteger from TColStd,
|
||||
HSurface from BRepAdaptor,
|
||||
Delaun from BRepMesh,
|
||||
DataStructureOfDelaun from BRepMesh,
|
||||
DataMapOfVertexInteger from BRepMesh,
|
||||
DataMapOfIntegerListOfXY from BRepMesh,
|
||||
DataMapOfShapeReal from TopTools,
|
||||
ListOfVertex from BRepMesh,
|
||||
ClassifierPtr from BRepMesh,
|
||||
Triangle from BRepMesh,
|
||||
Edge from BRepMesh,
|
||||
Vertex from BRepMesh,
|
||||
FaceAttribute from BRepMesh,
|
||||
ListOfInteger from TColStd,
|
||||
BaseAllocator from MeshDS,
|
||||
DataMapOfIntegerPnt from BRepMesh,
|
||||
IndexedMapOfInteger from TColStd,
|
||||
IndexedMapOfReal from TColStd,
|
||||
DataMapOfShapePairOfPolygon from BRepMesh
|
||||
|
||||
DataMapOfShapePairOfPolygon from BRepMesh,
|
||||
Triangulation from Poly,
|
||||
Location from TopLoc
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create (angle : Real from Standard;
|
||||
withShare : Boolean from Standard=Standard_True;
|
||||
inshape : Boolean from Standard=Standard_False;
|
||||
shapetrigu : Boolean from Standard=Standard_False)
|
||||
returns mutable FastDiscretFace from BRepMesh;
|
||||
Create (theAngle : Real from Standard;
|
||||
theWithShare : Boolean from Standard=Standard_True)
|
||||
returns mutable FastDiscretFace from BRepMesh;
|
||||
|
||||
|
||||
|
||||
|
||||
Add (me : mutable;
|
||||
face : Face from TopoDS;
|
||||
attrib : FaceAttribute from BRepMesh;
|
||||
mapdefle : DataMapOfShapeReal from TopTools)
|
||||
is static;
|
||||
Add (me : mutable;
|
||||
theFace : Face from TopoDS;
|
||||
theAttrib : FaceAttribute from BRepMesh;
|
||||
theMapDefle : DataMapOfShapeReal from TopTools)
|
||||
is static;
|
||||
|
||||
|
||||
Add (me : mutable;
|
||||
theVert: Vertex from TopoDS;
|
||||
face : Face from TopoDS;
|
||||
S : HSurface from BRepAdaptor) is private;
|
||||
|
||||
Update (me: mutable;
|
||||
Edge: Edge from TopoDS;
|
||||
Face: Face from TopoDS;
|
||||
C : Curve from Geom2d;
|
||||
defedge: Real from Standard;
|
||||
first : Real from Standard;
|
||||
last : Real from Standard)
|
||||
|
||||
returns Boolean;
|
||||
|
||||
|
||||
Add (me : mutable;
|
||||
theVert : Vertex from TopoDS;
|
||||
theFace : Face from TopoDS;
|
||||
theSFace : HSurface from BRepAdaptor) is private;
|
||||
|
||||
RestoreStructureFromTriangulation
|
||||
(me: mutable;
|
||||
theEdge : Edge from TopoDS;
|
||||
theFace : Face from TopoDS;
|
||||
theSurf : HSurface from BRepAdaptor;
|
||||
theTrigu : Triangulation from Poly;
|
||||
theDefEdge : Real from Standard;
|
||||
theLoc : Location from TopLoc)
|
||||
returns Boolean from Standard is protected;
|
||||
|
||||
|
||||
InternalVertices
|
||||
(me : mutable;
|
||||
caro : HSurface from BRepAdaptor;
|
||||
inter : in out ListOfVertex from BRepMesh;
|
||||
defedge : Real from Standard;
|
||||
classifier : ClassifierPtr from BRepMesh)
|
||||
is static private;
|
||||
InternalVertices (me : mutable;
|
||||
theCaro : HSurface from BRepAdaptor;
|
||||
theInternalV : in out ListOfVertex from BRepMesh;
|
||||
theDefFace : Real from Standard;
|
||||
theClassifier : ClassifierPtr from BRepMesh)
|
||||
is static private;
|
||||
|
||||
|
||||
Control
|
||||
(me : mutable;
|
||||
caro : HSurface from BRepAdaptor;
|
||||
defface : Real from Standard;
|
||||
inter : in out ListOfVertex from BRepMesh;
|
||||
badTri : in out ListOfInteger from TColStd;
|
||||
nulTri : in out ListOfInteger from TColStd;
|
||||
trigu : in out Delaun from BRepMesh;
|
||||
isfirst : Boolean from Standard)
|
||||
returns Real from Standard is static;
|
||||
Control (me : mutable;
|
||||
theCaro : HSurface from BRepAdaptor;
|
||||
theDefFace : Real from Standard;
|
||||
theInternalV : in out ListOfVertex from BRepMesh;
|
||||
theBadTriangles : in out ListOfInteger from TColStd;
|
||||
theNulTriangles : in out ListOfInteger from TColStd;
|
||||
theTrigu : in out Delaun from BRepMesh;
|
||||
theIsFirst : Boolean from Standard)
|
||||
returns Real from Standard is static;
|
||||
|
||||
FindUV(me: mutable; V: Vertex from TopoDS;
|
||||
XY: Pnt2d from gp;
|
||||
ip: Integer from Standard;
|
||||
S : HSurface from BRepAdaptor;
|
||||
mindist: Real from Standard)
|
||||
returns XY from gp;
|
||||
FindUV (myclass;
|
||||
theV : Vertex from TopoDS;
|
||||
theXY : Pnt2d from gp;
|
||||
theIp : Integer from Standard;
|
||||
theSFace : HSurface from BRepAdaptor;
|
||||
theMinDist : Real from Standard;
|
||||
theLocation2dMap: in out DataMapOfIntegerListOfXY from BRepMesh)
|
||||
returns XY from gp;
|
||||
|
||||
AddInShape(me: mutable; face : Face from TopoDS;
|
||||
defedge: Real from Standard)
|
||||
is static private;
|
||||
AddInShape (me: mutable;
|
||||
theFace : Face from TopoDS;
|
||||
theDefFace: Real from Standard)
|
||||
is static private;
|
||||
|
||||
|
||||
-- Output :
|
||||
|
||||
Triangle (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the triangle of <Index>.
|
||||
---C++: return const &
|
||||
returns Triangle from BRepMesh
|
||||
is static;
|
||||
Triangle (me;
|
||||
theIndex : Integer from Standard)
|
||||
---Purpose: Gives the triangle of <Index>.
|
||||
---C++: return const &
|
||||
returns Triangle from BRepMesh
|
||||
is static;
|
||||
|
||||
Edge (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the edge of index <Index>.
|
||||
---C++: return const &
|
||||
returns Edge from BRepMesh
|
||||
is static;
|
||||
Edge (me;
|
||||
theIndex : Integer from Standard)
|
||||
---Purpose: Gives the edge of index <Index>.
|
||||
---C++: return const &
|
||||
returns Edge from BRepMesh
|
||||
is static;
|
||||
|
||||
|
||||
Vertex (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Vertex from BRepMesh
|
||||
is static;
|
||||
Vertex (me;
|
||||
theIndex : Integer from Standard)
|
||||
---Purpose: Gives the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Vertex from BRepMesh
|
||||
is static;
|
||||
|
||||
Pnt (me;
|
||||
Index : Integer from Standard)
|
||||
---Purpose: Gives the location3d of the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
Pnt (me;
|
||||
theIndex : Integer from Standard)
|
||||
---Purpose: Gives the location3d of the vertex of <Index>.
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
|
||||
fields
|
||||
angle : Real from Standard;
|
||||
WithShare : Boolean from Standard;
|
||||
vertices : DataMapOfVertexInteger from BRepMesh;
|
||||
edges : DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
internaledges: DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
nbLocat : Integer from Standard;
|
||||
Location3d : DataMapOfIntegerPnt from BRepMesh;
|
||||
structure : DataStructureOfDelaun from BRepMesh;
|
||||
mylistver : ListOfVertex from BRepMesh;
|
||||
myvemap : IndexedMapOfInteger from TColStd;
|
||||
mylocation2d : DataMapOfIntegerListOfXY from BRepMesh;
|
||||
myattrib : FaceAttribute from BRepMesh;
|
||||
myshapetrigu : Boolean from Standard;
|
||||
myinshape : Boolean from Standard;
|
||||
myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices
|
||||
myUParam : IndexedMapOfReal from TColStd;
|
||||
myVParam : IndexedMapOfReal from TColStd;
|
||||
myAllocator : BaseAllocator from MeshDS;
|
||||
myAngle : Real from Standard;
|
||||
myWithShare : Boolean from Standard;
|
||||
myVertices : DataMapOfVertexInteger from BRepMesh;
|
||||
myInternaledges : DataMapOfShapePairOfPolygon from BRepMesh;
|
||||
myNbLocat : Integer from Standard;
|
||||
myLocation3d : DataMapOfIntegerPnt from BRepMesh;
|
||||
myStructure : DataStructureOfDelaun from BRepMesh;
|
||||
myListver : ListOfVertex from BRepMesh;
|
||||
myVemap : IndexedMapOfInteger from TColStd;
|
||||
myLocation2d : DataMapOfIntegerListOfXY from BRepMesh;
|
||||
myAttrib : FaceAttribute from BRepMesh;
|
||||
myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices
|
||||
myUParam : IndexedMapOfReal from TColStd;
|
||||
myVParam : IndexedMapOfReal from TColStd;
|
||||
myAllocator : BaseAllocator from MeshDS;
|
||||
|
||||
end FastDiscretFace;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user