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