mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a5f4ef48dd |
@@ -74,6 +74,7 @@ void BRepAlgo_Loop::Init(const TopoDS_Face& F)
|
||||
{
|
||||
myConstEdges.Clear();
|
||||
myEdges .Clear();
|
||||
myNewEdges .Clear();
|
||||
myVerOnEdges.Clear();
|
||||
myNewWires .Clear();
|
||||
myNewFaces .Clear();
|
||||
@@ -140,7 +141,7 @@ void BRepAlgo_Loop::AddEdge (TopoDS_Edge& E,
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : AddConstEdges
|
||||
//function : AddConstEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
@@ -149,6 +150,16 @@ void BRepAlgo_Loop::AddConstEdge (const TopoDS_Edge& E)
|
||||
myConstEdges.Append(E);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AddNewEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void BRepAlgo_Loop::AddNewEdge (const TopoDS_Edge& theEdge)
|
||||
{
|
||||
myNewEdges.Append(theEdge);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : AddConstEdges
|
||||
//purpose :
|
||||
@@ -429,64 +440,66 @@ static void StoreInMVE (const TopoDS_Face& F,
|
||||
TopoDS_Edge& E,
|
||||
TopTools_IndexedDataMapOfShapeListOfShape& MVE,
|
||||
Standard_Boolean& YaCouture,
|
||||
TopTools_DataMapOfShapeShape& VerticesForSubstitute )
|
||||
TopTools_DataMapOfShapeShape& /*VerticesForSubstitute*/ )
|
||||
{
|
||||
TopoDS_Vertex V1, V2, V;
|
||||
TopTools_ListOfShape Empty;
|
||||
|
||||
|
||||
/*
|
||||
Standard_Real Tol = 0.001; //5.e-05; //5.e-07;
|
||||
// gp_Pnt P1, P2, P;
|
||||
gp_Pnt P1, P;
|
||||
BRep_Builder BB;
|
||||
for (Standard_Integer iV = 1; iV <= MVE.Extent(); iV++)
|
||||
{
|
||||
V = TopoDS::Vertex(MVE.FindKey(iV));
|
||||
P = BRep_Tool::Pnt( V );
|
||||
TopTools_ListOfShape VList;
|
||||
TopoDS_Iterator VerExp( E );
|
||||
for (; VerExp.More(); VerExp.Next())
|
||||
VList.Append( VerExp.Value() );
|
||||
TopTools_ListIteratorOfListOfShape itl( VList );
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
V = TopoDS::Vertex(MVE.FindKey(iV));
|
||||
P = BRep_Tool::Pnt( V );
|
||||
TopTools_ListOfShape VList;
|
||||
TopoDS_Iterator VerExp( E );
|
||||
for (; VerExp.More(); VerExp.Next())
|
||||
VList.Append( VerExp.Value() );
|
||||
TopTools_ListIteratorOfListOfShape itl( VList );
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
V1 = TopoDS::Vertex( itl.Value() );
|
||||
P1 = BRep_Tool::Pnt( V1 );
|
||||
if (P.IsEqual( P1, Tol ) && !V.IsSame(V1))
|
||||
{
|
||||
V.Orientation( V1.Orientation() );
|
||||
if (VerticesForSubstitute.IsBound( V1 ))
|
||||
{
|
||||
TopoDS_Shape OldNewV = VerticesForSubstitute( V1 );
|
||||
if (! OldNewV.IsSame( V ))
|
||||
{
|
||||
VerticesForSubstitute.Bind( OldNewV, V );
|
||||
VerticesForSubstitute( V1 ) = V;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (VerticesForSubstitute.IsBound( V ))
|
||||
{
|
||||
TopoDS_Shape NewNewV = VerticesForSubstitute( V );
|
||||
if (! NewNewV.IsSame( V1 ))
|
||||
VerticesForSubstitute.Bind( V1, NewNewV );
|
||||
}
|
||||
else
|
||||
{
|
||||
VerticesForSubstitute.Bind( V1, V );
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeShape mapit( VerticesForSubstitute );
|
||||
for (; mapit.More(); mapit.Next())
|
||||
if (mapit.Value().IsSame( V1 ))
|
||||
VerticesForSubstitute( mapit.Key() ) = V;
|
||||
}
|
||||
}
|
||||
E.Free( Standard_True );
|
||||
BB.Remove( E, V1 );
|
||||
BB.Add( E, V );
|
||||
}
|
||||
}
|
||||
V1 = TopoDS::Vertex( itl.Value() );
|
||||
P1 = BRep_Tool::Pnt( V1 );
|
||||
if (P.IsEqual( P1, Tol ) && !V.IsSame(V1))
|
||||
{
|
||||
V.Orientation( V1.Orientation() );
|
||||
if (VerticesForSubstitute.IsBound( V1 ))
|
||||
{
|
||||
TopoDS_Shape OldNewV = VerticesForSubstitute( V1 );
|
||||
if (! OldNewV.IsSame( V ))
|
||||
{
|
||||
VerticesForSubstitute.Bind( OldNewV, V );
|
||||
VerticesForSubstitute( V1 ) = V;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (VerticesForSubstitute.IsBound( V ))
|
||||
{
|
||||
TopoDS_Shape NewNewV = VerticesForSubstitute( V );
|
||||
if (! NewNewV.IsSame( V1 ))
|
||||
VerticesForSubstitute.Bind( V1, NewNewV );
|
||||
}
|
||||
else
|
||||
{
|
||||
VerticesForSubstitute.Bind( V1, V );
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeShape mapit( VerticesForSubstitute );
|
||||
for (; mapit.More(); mapit.Next())
|
||||
if (mapit.Value().IsSame( V1 ))
|
||||
VerticesForSubstitute( mapit.Key() ) = V;
|
||||
}
|
||||
}
|
||||
E.Free( Standard_True );
|
||||
BB.Remove( E, V1 );
|
||||
BB.Add( E, V );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
TopExp::Vertices(E,V1,V2);
|
||||
if( V1.IsNull() && V2.IsNull() ){ YaCouture = Standard_False; return; }
|
||||
if (!MVE.Contains(V1)) {
|
||||
@@ -494,10 +507,10 @@ static void StoreInMVE (const TopoDS_Face& F,
|
||||
}
|
||||
MVE.ChangeFromKey(V1).Append(E);
|
||||
if (!V1.IsSame(V2)) {
|
||||
if (!MVE.Contains(V2)) {
|
||||
MVE.Add(V2,Empty);
|
||||
}
|
||||
MVE.ChangeFromKey(V2).Append(E);
|
||||
if (!MVE.Contains(V2)) {
|
||||
MVE.Add(V2,Empty);
|
||||
}
|
||||
MVE.ChangeFromKey(V2).Append(E);
|
||||
}
|
||||
TopLoc_Location L ;
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F,L);
|
||||
@@ -546,51 +559,67 @@ void BRepAlgo_Loop::Perform()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//------------------------------------------------
|
||||
// Cut edges
|
||||
//------------------------------------------------
|
||||
for (itl.Initialize(myEdges); itl.More(); itl.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(itl.Value());
|
||||
TopTools_ListOfShape LCE;
|
||||
const TopTools_ListOfShape* pVertices = myVerOnEdges.Seek (anEdge);
|
||||
if (pVertices)
|
||||
{
|
||||
CutEdge (anEdge, *pVertices, LCE);
|
||||
myCutEdges.Bind(anEdge, LCE);
|
||||
}
|
||||
}
|
||||
//-----------------------------------
|
||||
// Construction map vertex => edges
|
||||
//-----------------------------------
|
||||
TopTools_IndexedDataMapOfShapeListOfShape MVE;
|
||||
|
||||
// add cut edges.
|
||||
TopTools_MapOfShape Emap;
|
||||
for (itl.Initialize(myEdges); itl.More(); itl.Next())
|
||||
TopTools_IndexedDataMapOfShapeListOfShape MVE;
|
||||
|
||||
if (myNewEdges.IsEmpty())
|
||||
{
|
||||
const TopTools_ListOfShape* pLCE = myCutEdges.Seek (itl.Value());
|
||||
if (pLCE)
|
||||
//------------------------------------------------
|
||||
// Cut edges
|
||||
//------------------------------------------------
|
||||
for (itl.Initialize(myEdges); itl.More(); itl.Next())
|
||||
{
|
||||
for (itl1.Initialize(*pLCE); itl1.More(); itl1.Next()) {
|
||||
TopoDS_Edge& E = TopoDS::Edge(itl1.Value());
|
||||
if (!Emap.Add(E))
|
||||
continue;
|
||||
StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute);
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(itl.Value());
|
||||
TopTools_ListOfShape LCE;
|
||||
const TopTools_ListOfShape* pVertices = myVerOnEdges.Seek (anEdge);
|
||||
if (pVertices)
|
||||
{
|
||||
CutEdge (anEdge, *pVertices, LCE);
|
||||
myCutEdges.Bind(anEdge, LCE);
|
||||
}
|
||||
}
|
||||
//-----------------------------------
|
||||
// Construction map vertex => edges
|
||||
//-----------------------------------
|
||||
|
||||
// add cut edges.
|
||||
TopTools_MapOfShape Emap;
|
||||
for (itl.Initialize(myEdges); itl.More(); itl.Next())
|
||||
{
|
||||
const TopTools_ListOfShape* pLCE = myCutEdges.Seek (itl.Value());
|
||||
if (pLCE)
|
||||
{
|
||||
for (itl1.Initialize(*pLCE); itl1.More(); itl1.Next()) {
|
||||
TopoDS_Edge& E = TopoDS::Edge(itl1.Value());
|
||||
if (!Emap.Add(E))
|
||||
continue;
|
||||
StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add const edges
|
||||
// Sewn edges can be doubled or not in myConstEdges
|
||||
// => call only once StoreInMVE which should double them
|
||||
TopTools_MapOfShape DejaVu;
|
||||
for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) {
|
||||
TopoDS_Edge& E = TopoDS::Edge(itl.Value());
|
||||
if (DejaVu.Add(E))
|
||||
StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute);
|
||||
}
|
||||
} //if (myNewEdges.IsEmpty())
|
||||
else
|
||||
{
|
||||
TopTools_MapOfShape Emap;
|
||||
for (itl.Initialize(myNewEdges); itl.More(); itl.Next())
|
||||
{
|
||||
TopoDS_Edge& anEdge = TopoDS::Edge(itl.Value());
|
||||
if (!Emap.Add(anEdge))
|
||||
continue;
|
||||
StoreInMVE(myFace,anEdge,MVE,YaCouture,myVerticesForSubstitute);
|
||||
}
|
||||
}
|
||||
|
||||
// add const edges
|
||||
// Sewn edges can be doubled or not in myConstEdges
|
||||
// => call only once StoreInMVE which should double them
|
||||
TopTools_MapOfShape DejaVu;
|
||||
for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) {
|
||||
TopoDS_Edge& E = TopoDS::Edge(itl.Value());
|
||||
if (DejaVu.Add(E))
|
||||
StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute);
|
||||
}
|
||||
|
||||
#ifdef DRAW
|
||||
if (AffichLoop) {
|
||||
std::cout <<"NewLoop"<<std::endl;
|
||||
@@ -711,22 +740,22 @@ void BRepAlgo_Loop::Perform()
|
||||
#endif
|
||||
}
|
||||
|
||||
PurgeNewEdges(myCutEdges,UsedEdges);
|
||||
//PurgeNewEdges(myCutEdges,UsedEdges);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CutEdges
|
||||
//function : CutEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
|
||||
const TopTools_ListOfShape& VOnE,
|
||||
TopTools_ListOfShape& NE ) const
|
||||
TopTools_ListOfShape& NE ) const
|
||||
{
|
||||
TopoDS_Shape aLocalE = E.Oriented(TopAbs_FORWARD);
|
||||
TopoDS_Edge WE = TopoDS::Edge(aLocalE);
|
||||
|
||||
Standard_Real U1,U2;
|
||||
//Standard_Real U1,U2;
|
||||
TopoDS_Vertex V1,V2;
|
||||
TopTools_SequenceOfShape SV;
|
||||
TopTools_ListIteratorOfListOfShape it(VOnE);
|
||||
@@ -793,6 +822,44 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
|
||||
if (!VL.IsNull() && !VL.IsSame(SV.Last ())) SV.Append (VL);
|
||||
}
|
||||
|
||||
//Split the edge
|
||||
TopoDS_Vertex aFirstVertex = TopoDS::Vertex(SV(1)), aLastVertex;
|
||||
for (Standard_Integer ii = 2; ii <= SV.Length(); ii++)
|
||||
{
|
||||
aLastVertex = TopoDS::Vertex(SV(ii));
|
||||
aFirstVertex.Orientation(TopAbs_FORWARD);
|
||||
aLastVertex.Orientation(TopAbs_REVERSED);
|
||||
|
||||
TopoDS_Edge aNewEdge = TopoDS::Edge(WE.EmptyCopied());
|
||||
B.Add (aNewEdge, aFirstVertex);
|
||||
B.Add (aNewEdge, aLastVertex);
|
||||
|
||||
aFirstVertex.Orientation(TopAbs_INTERNAL);
|
||||
aLastVertex.Orientation(TopAbs_INTERNAL);
|
||||
|
||||
Standard_Real aFirst, aLast;
|
||||
if (aFirstVertex.IsSame(VF))
|
||||
aFirst = f;
|
||||
else
|
||||
aFirst = BRep_Tool::Parameter(aFirstVertex, WE);
|
||||
if (aLastVertex.IsSame(VL))
|
||||
aLast = l;
|
||||
else
|
||||
aLast = BRep_Tool::Parameter(aLastVertex, WE);
|
||||
|
||||
if (aLast - aFirst > Precision::Confusion())
|
||||
{
|
||||
B.Range (aNewEdge, aFirst, aLast);
|
||||
NE.Append(aNewEdge.Oriented(E.Orientation()));
|
||||
aFirstVertex = aLastVertex;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout <<"!!!"<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
while (!SV.IsEmpty()) {
|
||||
while (!SV.IsEmpty() &&
|
||||
SV.First().Orientation() != TopAbs_FORWARD) {
|
||||
@@ -844,28 +911,31 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
|
||||
NE.Append(NewEdge.Oriented(E.Orientation()));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//Remove edges with size <= tolerance
|
||||
/*
|
||||
Standard_Real Tol = 0.001; //5.e-05; //5.e-07;
|
||||
it.Initialize(NE);
|
||||
while (it.More())
|
||||
{
|
||||
// skl : I change "E" to "EE"
|
||||
TopoDS_Edge EE = TopoDS::Edge( it.Value() );
|
||||
Standard_Real fpar, lpar;
|
||||
BRep_Tool::Range( EE, fpar, lpar );
|
||||
if (lpar - fpar <= Precision::Confusion())
|
||||
NE.Remove(it);
|
||||
else
|
||||
{
|
||||
// skl : I change "E" to "EE"
|
||||
TopoDS_Edge EE = TopoDS::Edge( it.Value() );
|
||||
Standard_Real fpar, lpar;
|
||||
BRep_Tool::Range( EE, fpar, lpar );
|
||||
if (lpar - fpar <= Precision::Confusion())
|
||||
NE.Remove(it);
|
||||
gp_Pnt2d pf, pl;
|
||||
BRep_Tool::UVPoints( EE, myFace, pf, pl );
|
||||
if (pf.Distance(pl) <= Tol && !BRep_Tool::IsClosed(EE))
|
||||
NE.Remove(it);
|
||||
else
|
||||
{
|
||||
gp_Pnt2d pf, pl;
|
||||
BRep_Tool::UVPoints( EE, myFace, pf, pl );
|
||||
if (pf.Distance(pl) <= Tol && !BRep_Tool::IsClosed(EE))
|
||||
NE.Remove(it);
|
||||
else
|
||||
it.Next();
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -52,12 +52,21 @@ public:
|
||||
//! Add <E> as const edge, E can be in the result.
|
||||
Standard_EXPORT void AddConstEdge (const TopoDS_Edge& E);
|
||||
|
||||
//! Add a new edge
|
||||
Standard_EXPORT void AddNewEdge (const TopoDS_Edge& theEdge);
|
||||
|
||||
//! Add <LE> as a set of const edges.
|
||||
Standard_EXPORT void AddConstEdges (const TopTools_ListOfShape& LE);
|
||||
|
||||
//! Sets the Image Vertex - Vertex
|
||||
Standard_EXPORT void SetImageVV (const BRepAlgo_Image& theImageVV);
|
||||
|
||||
//! Returns TRUE if new edges are not empty
|
||||
Standard_EXPORT Standard_Boolean HasNewEdges ()
|
||||
{
|
||||
return (!myNewEdges.IsEmpty());
|
||||
}
|
||||
|
||||
//! Make loops.
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
@@ -105,6 +114,7 @@ private:
|
||||
TopoDS_Face myFace;
|
||||
TopTools_ListOfShape myConstEdges;
|
||||
TopTools_ListOfShape myEdges;
|
||||
TopTools_ListOfShape myNewEdges;
|
||||
TopTools_DataMapOfShapeListOfShape myVerOnEdges;
|
||||
TopTools_ListOfShape myNewWires;
|
||||
TopTools_ListOfShape myNewFaces;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <BRepPrimAPI_MakePrism.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
@@ -48,6 +49,7 @@
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <ChFi3d.hxx>
|
||||
|
||||
static void CorrectOrientationOfTangent(gp_Vec& TangVec,
|
||||
@@ -58,6 +60,24 @@ static void CorrectOrientationOfTangent(gp_Vec& TangVec,
|
||||
if (aVertex.IsSame(Vlast))
|
||||
TangVec.Reverse();
|
||||
}
|
||||
|
||||
static Standard_Boolean IsTangentEdges(const TopoDS_Vertex& theVertex,
|
||||
const TopoDS_Edge& theEdge1,
|
||||
const TopoDS_Edge& theEdge2,
|
||||
const Standard_Real theAngle)
|
||||
{
|
||||
Standard_Real aParOnEdge1 = BRep_Tool::Parameter(theVertex, theEdge1);
|
||||
Standard_Real aParOnEdge2 = BRep_Tool::Parameter(theVertex, theEdge2);
|
||||
BRepAdaptor_Curve aBAcurve1(theEdge1), aBAcurve2(theEdge2);
|
||||
gp_Vec aVec1, aVec2;
|
||||
aVec1 = aBAcurve1.DN(aParOnEdge1, 1);
|
||||
CorrectOrientationOfTangent(aVec1, theVertex, theEdge1);
|
||||
aVec2 = aBAcurve2.DN(aParOnEdge2, 1);
|
||||
CorrectOrientationOfTangent(aVec2, theVertex, theEdge2);
|
||||
Standard_Boolean IsOpposite = aVec2.IsOpposite(aVec1, theAngle);
|
||||
return IsOpposite;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepOffset_Analyse
|
||||
//purpose :
|
||||
@@ -83,12 +103,15 @@ BRepOffset_Analyse::BRepOffset_Analyse(const TopoDS_Shape& S,
|
||||
//function : EdgeAnlyse
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static void EdgeAnalyse(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2,
|
||||
const Standard_Real SinTol,
|
||||
BRepOffset_ListOfInterval& LI)
|
||||
Standard_Boolean BRepOffset_Analyse::EdgeAnalyse(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2,
|
||||
const Standard_Real SinTol)
|
||||
{
|
||||
BRepOffset_ListOfInterval& LI = myMapEdgeType (E);
|
||||
|
||||
Standard_Boolean IsSmooth = Standard_False;
|
||||
|
||||
Standard_Real f,l;
|
||||
BRep_Tool::Range(E, F1, f, l);
|
||||
BRepOffset_Interval I;
|
||||
@@ -111,16 +134,98 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
|
||||
else
|
||||
ConnectType = ChFi3d::DefineConnectType(E, F1, F2, SinTol, Standard_False);
|
||||
}
|
||||
else
|
||||
else if (myJoinType == GeomAbs_Arc/* || myIsOpenShell*/)
|
||||
{
|
||||
if (ChFi3d::IsTangentFaces(E, F1, F2)) //weak condition
|
||||
ConnectType = ChFiDS_Tangential;
|
||||
else
|
||||
ConnectType = ChFi3d::DefineConnectType(E, F1, F2, SinTol, Standard_False);
|
||||
}
|
||||
else //join type in Intersection
|
||||
{
|
||||
ConnectType = ChFi3d::DefineConnectType(E, F1, F2, SinTol, Standard_False);
|
||||
|
||||
Standard_Boolean IsEdgeNearSingularity = Standard_False;
|
||||
TopoDS_Face FF [2] = {F1, F2};
|
||||
TopoDS_Vertex aV [2];
|
||||
TopExp::Vertices(E, aV[0], aV[1]);
|
||||
for (Standard_Integer ii = 0; ii < 2; ii++)
|
||||
{
|
||||
TopExp_Explorer anExplo (FF[ii], TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anExplo.Current());
|
||||
if (BRep_Tool::Degenerated(anEdge))
|
||||
{
|
||||
TopoDS_Vertex aVdeg1, aVdeg2;
|
||||
TopExp::Vertices(anEdge, aVdeg1, aVdeg2);
|
||||
if (aVdeg1.IsSame(aV[0]) || aVdeg1.IsSame(aV[1]) ||
|
||||
aVdeg2.IsSame(aV[0]) || aVdeg2.IsSame(aV[1]))
|
||||
{
|
||||
IsEdgeNearSingularity = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Standard_Boolean IsChain = Standard_False;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aVEmap;
|
||||
TopExp::MapShapesAndUniqueAncestors(F1, TopAbs_VERTEX, TopAbs_EDGE, aVEmap);
|
||||
for (Standard_Integer ii = 0; ii < 2; ii++)
|
||||
{
|
||||
const TopTools_ListOfShape& aElist = aVEmap.FindFromKey(aV[ii]);
|
||||
TopTools_ListIteratorOfListOfShape itl(aElist);
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(itl.Value());
|
||||
if (anEdge.IsSame(E))
|
||||
continue;
|
||||
if (F1.IsSame(F2))
|
||||
IsChain = BRepTools::IsReallyClosed(anEdge, F1);
|
||||
else
|
||||
{
|
||||
TopExp_Explorer anExplo(F2, TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Shape& anEdgeOnF2 = anExplo.Current();
|
||||
if (anEdge.IsSame(anEdgeOnF2))
|
||||
{
|
||||
IsChain = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (IsChain)
|
||||
break;
|
||||
}
|
||||
|
||||
//Temporary
|
||||
Standard_Boolean IsTang = Standard_False;
|
||||
if (ConnectType == ChFiDS_Tangential)
|
||||
{
|
||||
IsTang = Standard_True;
|
||||
#ifdef OCCT_DEBUG
|
||||
std::cout <<"edge is tangent"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
///////////
|
||||
|
||||
if (ConnectType != ChFiDS_Tangential &&
|
||||
ChFi3d::IsTangentFaces(E, F1, F2)) //weak condition
|
||||
IsSmooth = Standard_True;
|
||||
|
||||
if (IsSmooth && (IsEdgeNearSingularity || IsChain))
|
||||
{
|
||||
ConnectType = ChFiDS_Tangential;
|
||||
IsSmooth = Standard_False;
|
||||
}
|
||||
}
|
||||
|
||||
I.Type(ConnectType);
|
||||
LI.Append(I);
|
||||
|
||||
return IsSmooth;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -143,6 +248,8 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S,
|
||||
const Standard_Real Angle)
|
||||
{
|
||||
myShape = S;
|
||||
myIsOpenShell = Standard_False;
|
||||
mySmoothEdges.Clear();
|
||||
myNewFaces .Clear();
|
||||
myGenerated.Clear();
|
||||
myReplacement.Clear();
|
||||
@@ -154,7 +261,25 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S,
|
||||
// Build ancestors.
|
||||
BuildAncestors (S,myAncestors);
|
||||
|
||||
TopTools_ListOfShape aLETang;
|
||||
//Define status of boundary
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aEFmap;
|
||||
TopExp::MapShapesAndAncestors (S, TopAbs_EDGE, TopAbs_FACE, aEFmap);
|
||||
for (Standard_Integer ii = 1; ii <= aEFmap.Extent(); ii++)
|
||||
{
|
||||
const TopTools_ListOfShape& aElist = aEFmap(ii);
|
||||
if (aElist.Extent() == 1)
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(aEFmap.FindKey(ii));
|
||||
if (!BRep_Tool::Degenerated(anEdge))
|
||||
{
|
||||
myIsOpenShell = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TopTools_ListOfShape aLETang;
|
||||
TopTools_SequenceOfShape aSeqEtang;
|
||||
|
||||
TopExp_Explorer Exp(S.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
|
||||
for ( ; Exp.More(); Exp.Next()) {
|
||||
@@ -170,12 +295,18 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S,
|
||||
if (L.Extent() == 2) {
|
||||
const TopoDS_Face& F1 = TopoDS::Face (L.First());
|
||||
const TopoDS_Face& F2 = TopoDS::Face (L.Last());
|
||||
EdgeAnalyse (E, F1, F2, SinTol, myMapEdgeType (E));
|
||||
Standard_Boolean IsSmooth = EdgeAnalyse (E, F1, F2, SinTol);
|
||||
|
||||
// For tangent faces add artificial perpendicular face
|
||||
// to close the gap between them (if they have different offset values)
|
||||
if (myMapEdgeType(E).Last().Type() == ChFiDS_Tangential)
|
||||
aLETang.Append (E);
|
||||
if (IsSmooth)
|
||||
mySmoothEdges.Add(E);
|
||||
else
|
||||
{
|
||||
// For tangent faces add artificial perpendicular face
|
||||
// to close the gap between them (if they have different offset values)
|
||||
if (myMapEdgeType(E).Last().Type() == ChFiDS_Tangential)
|
||||
aSeqEtang.Append (E);
|
||||
//aLETang.Append (E);
|
||||
}
|
||||
}
|
||||
else if (L.Extent() == 1) {
|
||||
Standard_Real U1, U2;
|
||||
@@ -196,7 +327,228 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S,
|
||||
}
|
||||
}
|
||||
|
||||
TreatTangentFaces (aLETang);
|
||||
//Propagate tangent edges
|
||||
Standard_Real anAngularTol = (myAngle < M_PI/4)? myAngle : 1.e-5;
|
||||
|
||||
TopExp_Explorer anExplo (S, TopAbs_FACE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Face& aFace = TopoDS::Face(anExplo.Current());
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aVEmap;
|
||||
TopExp::MapShapesAndAncestors (aFace, TopAbs_VERTEX, TopAbs_EDGE, aVEmap);
|
||||
|
||||
TopoDS_Iterator itw(aFace);
|
||||
for (; itw.More(); itw.Next())
|
||||
{
|
||||
const TopoDS_Wire& aWire = TopoDS::Wire(itw.Value());
|
||||
BRepTools_WireExplorer wexp(aWire, aFace);
|
||||
for (; wexp.More(); wexp.Next())
|
||||
{
|
||||
const TopoDS_Edge& aCurEdge = wexp.Current();
|
||||
if (BRep_Tool::Degenerated (aCurEdge) ||
|
||||
BRepTools::IsReallyClosed (aCurEdge, aFace))
|
||||
continue;
|
||||
|
||||
const BRepOffset_ListOfInterval& aListInterv = Type(aCurEdge);
|
||||
if (!aListInterv.IsEmpty() && aListInterv.First().Type() == ChFiDS_Tangential)
|
||||
{
|
||||
TopoDS_Vertex aVV [2];
|
||||
TopExp::Vertices (aCurEdge, aVV[0], aVV[1]);
|
||||
for (Standard_Integer ii = 0; ii < 2; ii++)
|
||||
{
|
||||
TopoDS_Edge aNeighbor;
|
||||
const TopTools_ListOfShape& aElist = aVEmap.FindFromKey(aVV[ii]);
|
||||
TopTools_ListIteratorOfListOfShape itl(aElist);
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(itl.Value());
|
||||
if (!anEdge.IsSame(aCurEdge))
|
||||
{
|
||||
aNeighbor = anEdge;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!aNeighbor.IsNull())
|
||||
{
|
||||
BRepOffset_ListOfInterval& aListIntervLocal = myMapEdgeType (aNeighbor);
|
||||
if (!aListIntervLocal.IsEmpty() &&
|
||||
aListIntervLocal.First().Type() != ChFiDS_Tangential)
|
||||
{
|
||||
Standard_Boolean IsTangent = IsTangentEdges (aVV[ii], aCurEdge, aNeighbor,
|
||||
anAngularTol);
|
||||
if (IsTangent)
|
||||
{
|
||||
aSeqEtang.Append(aNeighbor);
|
||||
aListIntervLocal.First().Type(ChFiDS_Tangential);
|
||||
mySmoothEdges.Remove(aNeighbor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TopTools_IndexedMapOfShape aVmap;
|
||||
TopExp::MapShapes(S, TopAbs_VERTEX, aVmap);
|
||||
for (Standard_Integer ii = 1; ii <= aVmap.Extent(); ii++)
|
||||
{
|
||||
const TopoDS_Vertex& aVertex = TopoDS::Vertex(aVmap(ii));
|
||||
const TopTools_ListOfShape& aElist = Ancestors(aVertex);
|
||||
if (aElist.Extent() != 4)
|
||||
continue;
|
||||
|
||||
TopoDS_Edge aEtang;
|
||||
Standard_Integer NbTangEdges = 0;
|
||||
Standard_Boolean isFreeBoundFound = Standard_False;
|
||||
TopTools_ListIteratorOfListOfShape anItlEE(aElist);
|
||||
for (; anItlEE.More(); anItlEE.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anItlEE.Value());
|
||||
const BRepOffset_ListOfInterval& aListInterv = Type(anEdge);
|
||||
if (!aListInterv.IsEmpty())
|
||||
{
|
||||
if (aListInterv.First().Type() == ChFiDS_Tangential)
|
||||
{
|
||||
aEtang = anEdge;
|
||||
NbTangEdges++;
|
||||
}
|
||||
else if (aListInterv.First().Type() == ChFiDS_FreeBound)
|
||||
isFreeBoundFound = Standard_True;
|
||||
}
|
||||
}
|
||||
if (aEtang.IsNull() || NbTangEdges == 4 || isFreeBoundFound)
|
||||
continue;
|
||||
|
||||
const TopTools_ListOfShape& aFF = Ancestors(aEtang);
|
||||
const TopoDS_Face& aF1 = TopoDS::Face (aFF.First());
|
||||
const TopoDS_Face& aF2 = TopoDS::Face (aFF.Last());
|
||||
|
||||
TopoDS_Edge aEopposite, aEadjacent1, aEadjacent2;
|
||||
for (anItlEE.Initialize(aElist); anItlEE.More(); anItlEE.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anItlEE.Value());
|
||||
if (anEdge.IsSame(aEtang))
|
||||
continue;
|
||||
|
||||
const TopTools_ListOfShape& aFlist = Ancestors(anEdge);
|
||||
TopTools_ListIteratorOfListOfShape anItlFF(aFlist);
|
||||
for (; anItlFF.More(); anItlFF.Next())
|
||||
{
|
||||
const TopoDS_Shape& aFace = anItlFF.Value();
|
||||
if (aFace.IsSame(aF1) || aFace.IsSame(aF2))
|
||||
{
|
||||
if (aEadjacent1.IsNull())
|
||||
aEadjacent1 = anEdge;
|
||||
else
|
||||
aEadjacent2 = anEdge;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (anItlEE.Initialize(aElist); anItlEE.More(); anItlEE.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anItlEE.Value());
|
||||
if (!anEdge.IsSame(aEtang) && !anEdge.IsSame(aEadjacent1) && !anEdge.IsSame(aEadjacent2))
|
||||
{
|
||||
aEopposite = anEdge;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (aEopposite.IsNull() || aEadjacent1.IsNull() || aEadjacent2.IsNull())
|
||||
continue;
|
||||
|
||||
BRepOffset_ListOfInterval& aListInterv = myMapEdgeType (aEopposite);
|
||||
if (!aListInterv.IsEmpty() && aListInterv.First().Type() != ChFiDS_Tangential)
|
||||
{
|
||||
Standard_Boolean IsTangentWithOpposite =
|
||||
IsTangentEdges(aVertex, aEtang, aEopposite, anAngularTol);
|
||||
|
||||
if (IsTangentWithOpposite)
|
||||
{
|
||||
aListInterv.First().Type(ChFiDS_Tangential);
|
||||
aSeqEtang.Append(aEopposite);
|
||||
mySmoothEdges.Remove(aEopposite);
|
||||
}
|
||||
}
|
||||
|
||||
aListInterv = myMapEdgeType (aEopposite);
|
||||
if (!aListInterv.IsEmpty() &&
|
||||
aListInterv.First().Type() == ChFiDS_Tangential &&
|
||||
IsTangentEdges(aVertex, aEtang, aEopposite, anAngularTol))
|
||||
{
|
||||
BRepOffset_ListOfInterval& aListInterv1 = myMapEdgeType (aEadjacent1);
|
||||
BRepOffset_ListOfInterval& aListInterv2 = myMapEdgeType (aEadjacent2);
|
||||
ChFiDS_TypeOfConcavity Type1 = aListInterv1.First().Type();
|
||||
ChFiDS_TypeOfConcavity Type2 = aListInterv2.First().Type();
|
||||
if (Type1 != ChFiDS_Tangential || Type2 != ChFiDS_Tangential)
|
||||
{
|
||||
Standard_Boolean IsTangentAdjacents = IsTangentEdges(aVertex, aEadjacent1, aEadjacent2,
|
||||
anAngularTol);
|
||||
if (IsTangentAdjacents)
|
||||
{
|
||||
if (Type1 != ChFiDS_Tangential)
|
||||
aSeqEtang.Append(aEadjacent1);
|
||||
aListInterv1.First().Type(ChFiDS_Tangential);
|
||||
mySmoothEdges.Remove(aEadjacent1);
|
||||
|
||||
if (Type2 != ChFiDS_Tangential)
|
||||
aSeqEtang.Append(aEadjacent2);
|
||||
aListInterv2.First().Type(ChFiDS_Tangential);
|
||||
mySmoothEdges.Remove(aEadjacent2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Check cases of 3 tangents of 4
|
||||
NbTangEdges = 0;
|
||||
TopoDS_Edge anEdgeNotTangent;
|
||||
for (anItlEE.Initialize(aElist); anItlEE.More(); anItlEE.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anItlEE.Value());
|
||||
const BRepOffset_ListOfInterval& aListIntervLocal = Type(anEdge);
|
||||
if (!aListIntervLocal.IsEmpty())
|
||||
{
|
||||
if (aListIntervLocal.First().Type() == ChFiDS_Tangential)
|
||||
NbTangEdges++;
|
||||
else
|
||||
anEdgeNotTangent = anEdge;
|
||||
}
|
||||
}
|
||||
if (NbTangEdges == 3)
|
||||
{
|
||||
aSeqEtang.Append(anEdgeNotTangent);
|
||||
BRepOffset_ListOfInterval& aListIntervLocal = myMapEdgeType (anEdgeNotTangent);
|
||||
aListIntervLocal.First().Type(ChFiDS_Tangential);
|
||||
mySmoothEdges.Remove(anEdgeNotTangent);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Check cases of 3 smooths of 4
|
||||
Standard_Integer NbSmoothEdges = 0;
|
||||
TopoDS_Edge anEdgeNotSmooth;
|
||||
for (anItlEE.Initialize(aElist); anItlEE.More(); anItlEE.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anItlEE.Value());
|
||||
const BRepOffset_ListOfInterval& aListIntervLocal = Type(anEdge);
|
||||
if (!aListIntervLocal.IsEmpty())
|
||||
{
|
||||
if (aListIntervLocal.First().Type() == ChFiDS_Tangential ||
|
||||
IsEdgeSmooth(anEdge))
|
||||
NbSmoothEdges++;
|
||||
else
|
||||
anEdgeNotSmooth = anEdge;
|
||||
}
|
||||
}
|
||||
if (NbSmoothEdges == 3)
|
||||
{
|
||||
mySmoothEdges.Add(anEdgeNotSmooth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TreatTangentFaces (aSeqEtang);
|
||||
myDone = Standard_True;
|
||||
}
|
||||
|
||||
@@ -204,9 +556,9 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S,
|
||||
//function : Generated
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE)
|
||||
void BRepOffset_Analyse::TreatTangentFaces (const TopTools_SequenceOfShape& theEdges)
|
||||
{
|
||||
if (theLE.IsEmpty() || myFaceOffsetMap.IsEmpty())
|
||||
if (theEdges.IsEmpty() || myFaceOffsetMap.IsEmpty())
|
||||
{
|
||||
// Noting to do: either there are no tangent faces in the shape or
|
||||
// the face offset map has not been provided
|
||||
@@ -221,9 +573,10 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE)
|
||||
// Bind vertices of the tangent edges with connected edges
|
||||
// of the face with smaller offset value
|
||||
TopTools_DataMapOfShapeShape aDMVEMin;
|
||||
for (TopTools_ListOfShape::Iterator it (theLE); it.More(); it.Next())
|
||||
|
||||
for (Standard_Integer ii = 1; ii <= theEdges.Length(); ii++)
|
||||
{
|
||||
const TopoDS_Shape& aE = it.Value();
|
||||
const TopoDS_Shape& aE = theEdges(ii);
|
||||
const TopTools_ListOfShape& aLA = Ancestors (aE);
|
||||
|
||||
const TopoDS_Shape& aF1 = aLA.First(), aF2 = aLA.Last();
|
||||
@@ -266,9 +619,9 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE)
|
||||
// Create map of Face ancestors for the vertices on tangent edges
|
||||
TopTools_DataMapOfShapeListOfShape aDMVFAnc;
|
||||
|
||||
for (TopTools_ListOfShape::Iterator itE (theLE); itE.More(); itE.Next())
|
||||
for (Standard_Integer ii = 1; ii <= theEdges.Length(); ii++)
|
||||
{
|
||||
const TopoDS_Shape& aE = itE.Value();
|
||||
const TopoDS_Shape& aE = theEdges(ii);
|
||||
if (!anEdgeOffsetMap.IsBound (aE))
|
||||
continue;
|
||||
|
||||
@@ -427,7 +780,7 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE)
|
||||
|
||||
myMapEdgeType (aE).Clear();
|
||||
// Analyze edge again
|
||||
EdgeAnalyse (aE, TopoDS::Face (aFOpposite), aFNew, aSinTol, myMapEdgeType (aE));
|
||||
EdgeAnalyse (aE, TopoDS::Face (aFOpposite), aFNew, aSinTol);
|
||||
|
||||
// Analyze vertices
|
||||
TopTools_MapOfShape aFNewEdgeMap;
|
||||
@@ -510,8 +863,7 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE)
|
||||
myMapEdgeType.Bind (aEG, BRepOffset_ListOfInterval());
|
||||
if (aLEGA.Extent() == 2)
|
||||
{
|
||||
EdgeAnalyse (aEG, TopoDS::Face (aLEGA.First()), TopoDS::Face (aLEGA.Last()),
|
||||
aSinTol, myMapEdgeType (aEG));
|
||||
EdgeAnalyse (aEG, TopoDS::Face (aLEGA.First()), TopoDS::Face (aLEGA.Last()), aSinTol);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,7 +897,7 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE)
|
||||
aLFOpposite.Append (aFToRemove);
|
||||
myAncestors.Add (aEOpposite, aLFOpposite);
|
||||
myMapEdgeType.Bind (aEOpposite, BRepOffset_ListOfInterval());
|
||||
EdgeAnalyse (aEOpposite, aFNew, TopoDS::Face (aFToRemove), aSinTol, myMapEdgeType (aEOpposite));
|
||||
EdgeAnalyse (aEOpposite, aFNew, TopoDS::Face (aFToRemove), aSinTol);
|
||||
|
||||
TopTools_DataMapOfShapeShape* pEEMap = myReplacement.ChangeSeek (aFToRemove);
|
||||
if (!pEEMap)
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <GeomAbs_JoinType.hxx>
|
||||
#include <BRepOffset_DataMapOfShapeListOfInterval.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
@@ -33,6 +34,7 @@
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
class TopoDS_Shape;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Vertex;
|
||||
@@ -90,6 +92,12 @@ public: //! @name Results
|
||||
const TopoDS_Vertex& theVertex,
|
||||
TopTools_ListOfShape& theEdges) const;
|
||||
|
||||
//! returns TRUE if theEdge is smooth but not tangent
|
||||
Standard_EXPORT Standard_Boolean IsEdgeSmooth (const TopoDS_Shape& theEdge) const
|
||||
{
|
||||
return mySmoothEdges.Contains(theEdge);
|
||||
}
|
||||
|
||||
//! Checks if the given shape has ancestors
|
||||
Standard_Boolean HasAncestor (const TopoDS_Shape& theS) const
|
||||
{
|
||||
@@ -128,6 +136,11 @@ public: //! @name Results
|
||||
const ChFiDS_TypeOfConcavity theType1,
|
||||
const ChFiDS_TypeOfConcavity theType2) const;
|
||||
|
||||
void SetJoinType (const GeomAbs_JoinType theJoinType)
|
||||
{
|
||||
myJoinType = theJoinType;
|
||||
}
|
||||
|
||||
void SetOffsetValue (const Standard_Real theOffset)
|
||||
{
|
||||
myOffset = theOffset;
|
||||
@@ -171,14 +184,22 @@ private: //! @name Treatment of tangential cases
|
||||
|
||||
//! Treatment of the tangential cases.
|
||||
//! @param theEdges List of edges connecting tangent faces
|
||||
Standard_EXPORT void TreatTangentFaces (const TopTools_ListOfShape& theEdges);
|
||||
Standard_EXPORT void TreatTangentFaces (const TopTools_SequenceOfShape& theEdges);
|
||||
|
||||
//! Defines types of edge <E>
|
||||
Standard_Boolean EdgeAnalyse(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2,
|
||||
const Standard_Real SinTol);
|
||||
|
||||
private: //! @name Fields
|
||||
|
||||
// Inputs
|
||||
TopoDS_Shape myShape; //!< Input shape to analyze
|
||||
Standard_Real myAngle; //!< Criteria angle to check tangency
|
||||
Standard_Boolean myIsOpenShell; //!< Flag indicating whether the shape is an open shell
|
||||
|
||||
GeomAbs_JoinType myJoinType;
|
||||
Standard_Real myOffset; //!< Offset value
|
||||
TopTools_DataMapOfShapeReal myFaceOffsetMap; //!< Map to store offset values for the faces.
|
||||
//! Should be set by the calling algorithm.
|
||||
@@ -196,6 +217,9 @@ private: //! @name Fields
|
||||
|
||||
TopTools_ListOfShape myNewFaces; //!< New faces generated to close the gaps between adjacent
|
||||
//! tangential faces having different offset values
|
||||
|
||||
TopTools_MapOfShape mySmoothEdges; //!< Edges that are not tangential but smooth
|
||||
|
||||
TopTools_DataMapOfShapeShape myGenerated; //!< Binding between edge and face generated from the edge
|
||||
};
|
||||
|
||||
|
23
src/BRepOffset/BRepOffset_DataMapOfFaceMapEE.hxx
Normal file
23
src/BRepOffset/BRepOffset_DataMapOfFaceMapEE.hxx
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef BRepOffset_DataMapOfFaceMapEE_HeaderFile
|
||||
#define BRepOffset_DataMapOfFaceMapEE_HeaderFile
|
||||
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||
|
||||
typedef NCollection_DataMap<TopoDS_Face, TopTools_DataMapOfShapeListOfShape, TopTools_ShapeMapHasher> BRepOffset_DataMapOfFaceMapEE;
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,8 @@
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
||||
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
||||
#include <BRepOffset_DataMapOfFaceMapEE.hxx>
|
||||
class BRepAlgo_AsDes;
|
||||
class BRepAlgo_Image;
|
||||
class BRepOffset_Analyse;
|
||||
@@ -68,7 +69,9 @@ public:
|
||||
TopTools_IndexedMapOfShape& FacesWithVerts,
|
||||
BRepAlgo_Image& theImageVV,
|
||||
TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges,
|
||||
TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
|
||||
TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
|
||||
BRepOffset_DataMapOfFaceMapEE& theFaceEdgeEdge,
|
||||
TopTools_IndexedDataMapOfShapeListOfShape& theEFmap);
|
||||
|
||||
//! Computes the intersection between the offset edges generated
|
||||
//! from vertices and stored into AsDes as descendants of the <FI>.
|
||||
@@ -94,9 +97,11 @@ public:
|
||||
BRepAlgo_Image& theImageVV);
|
||||
|
||||
//! extents the edge
|
||||
Standard_EXPORT static Standard_Boolean ExtentEdge (const TopoDS_Edge& E,
|
||||
TopoDS_Edge& NE,
|
||||
const Standard_Real theOffset);
|
||||
Standard_EXPORT static Standard_Boolean ExtentEdge (const TopoDS_Edge& E,
|
||||
TopoDS_Edge& NE,
|
||||
const Standard_Real theOffset,
|
||||
const Standard_Boolean theToProlongBefore = Standard_True,
|
||||
const Standard_Boolean theToProlongAfter = Standard_True);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -55,12 +55,14 @@
|
||||
//function : BRepOffset_Inter3d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
BRepOffset_Inter3d::BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes,
|
||||
const TopAbs_State Side ,
|
||||
const Standard_Real Tol)
|
||||
:myAsDes(AsDes),
|
||||
mySide(Side),
|
||||
myTol(Tol)
|
||||
BRepOffset_Inter3d::BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& theAsDes,
|
||||
const TopAbs_State theSide,
|
||||
const Standard_Real theOffset,
|
||||
const Standard_Real theTol)
|
||||
: myAsDes(theAsDes),
|
||||
mySide(theSide),
|
||||
myOffset(theOffset),
|
||||
myTol(theTol)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -222,11 +224,11 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
|
||||
if (BRepOffset_Tool::FindCommonShapes(TopoDS::Face(InitF1),
|
||||
TopoDS::Face(InitF2),LE,LV)) {
|
||||
if (!LE.IsEmpty()) {
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,myOffset,NullEdge,NullFace,NullFace);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BRepOffset_Tool::Inter3D(F1,F2,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
BRepOffset_Tool::Inter3D(F1,F2,LInt1,LInt2,mySide,myOffset,NullEdge,NullFace,NullFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +239,7 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
|
||||
BRepOffset_Tool::PipeInter(F1,F2,LInt1,LInt2,mySide);
|
||||
}
|
||||
else {
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,myOffset,NullEdge,NullFace,NullFace);
|
||||
}
|
||||
}
|
||||
Store (F1,F2,LInt1,LInt2);
|
||||
@@ -275,13 +277,23 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& /*SetOfFaces
|
||||
//-----------------------------------------------------------
|
||||
const TopTools_ListOfShape& Anc = Analyse.Ancestors(E);
|
||||
if (Anc.Extent() == 2) {
|
||||
|
||||
Standard_Boolean IsEsmooth = Analyse.IsEdgeSmooth(E);
|
||||
//Temporary
|
||||
if (IsEsmooth)
|
||||
continue;
|
||||
///////////
|
||||
const TopoDS_Face& InitF1 = TopoDS::Face(Anc.First());
|
||||
const TopoDS_Face& InitF2 = TopoDS::Face(Anc.Last());
|
||||
F1 = TopoDS::Face(InitOffsetFace.Image(InitF1).First());
|
||||
F2 = TopoDS::Face(InitOffsetFace.Image(InitF2).First());
|
||||
|
||||
TopTools_ListOfShape LE,LV;
|
||||
if (BRepOffset_Tool::FindCommonShapes(F1,F2,LE,LV) &&
|
||||
!LE.IsEmpty())
|
||||
continue;
|
||||
|
||||
if (!IsDone(F1,F2)) {
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,E,InitF1,InitF2);
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,myOffset,E,InitF1,InitF2,IsEsmooth);
|
||||
Store (F1,F2,LInt1,LInt2);
|
||||
}
|
||||
}
|
||||
@@ -366,7 +378,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& /*SetOfFaces
|
||||
if (!TangentFaces) {
|
||||
F2 = TopoDS::Face(InitOffsetFace.Image(InitF2).First());
|
||||
if (!IsDone(F1,F2)) {
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,myOffset,NullEdge,NullFace,NullFace);
|
||||
Store (F1,F2,LInt1,LInt2);
|
||||
}
|
||||
}
|
||||
@@ -376,7 +388,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& /*SetOfFaces
|
||||
if (!TangentFaces) {
|
||||
F2 = TopoDS::Face(InitOffsetFace.Image(InitF2).First());
|
||||
if (!IsDone(F1,F2)) {
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
BRepOffset_Tool::Inter3D (F1,F2,LInt1,LInt2,mySide,myOffset,NullEdge,NullFace,NullFace);
|
||||
Store (F1,F2,LInt1,LInt2);
|
||||
}
|
||||
}
|
||||
@@ -617,10 +629,13 @@ void BRepOffset_Inter3d::ConnexIntByInt
|
||||
OF1 = TopoDS::Face(MapSF(F1).Face());
|
||||
OF2 = TopoDS::Face(MapSF(F2).Face());
|
||||
if (!MES.IsBound(OF1)) {
|
||||
Standard_Boolean enlargeU = Standard_True;
|
||||
Standard_Boolean enlargeUfirst = Standard_True, enlargeUlast = Standard_True;
|
||||
Standard_Boolean enlargeVfirst = Standard_True, enlargeVlast = Standard_True;
|
||||
BRepOffset_Tool::CheckBounds( F1, Analyse, enlargeU, enlargeVfirst, enlargeVlast );
|
||||
BRepOffset_Tool::EnLargeFace(OF1,NF1,Standard_True,Standard_True,enlargeU,enlargeVfirst,enlargeVlast);
|
||||
BRepOffset_Tool::CheckBounds( F1, Analyse,
|
||||
enlargeUfirst, enlargeUlast,
|
||||
enlargeVfirst, enlargeVlast );
|
||||
BRepOffset_Tool::EnLargeFace(OF1,NF1,Standard_True,Standard_True,
|
||||
enlargeUfirst,enlargeUlast,enlargeVfirst,enlargeVlast);
|
||||
MES.Bind(OF1,NF1);
|
||||
}
|
||||
else {
|
||||
@@ -628,10 +643,13 @@ void BRepOffset_Inter3d::ConnexIntByInt
|
||||
}
|
||||
//
|
||||
if (!MES.IsBound(OF2)) {
|
||||
Standard_Boolean enlargeU = Standard_True;
|
||||
Standard_Boolean enlargeUfirst = Standard_True, enlargeUlast = Standard_True;
|
||||
Standard_Boolean enlargeVfirst = Standard_True, enlargeVlast = Standard_True;
|
||||
BRepOffset_Tool::CheckBounds( F2, Analyse, enlargeU, enlargeVfirst, enlargeVlast );
|
||||
BRepOffset_Tool::EnLargeFace(OF2,NF2,Standard_True,Standard_True,enlargeU,enlargeVfirst,enlargeVlast);
|
||||
BRepOffset_Tool::CheckBounds( F2, Analyse,
|
||||
enlargeUfirst, enlargeUlast,
|
||||
enlargeVfirst, enlargeVlast );
|
||||
BRepOffset_Tool::EnLargeFace(OF2,NF2,Standard_True,Standard_True,
|
||||
enlargeUfirst,enlargeUlast,enlargeVfirst,enlargeVlast);
|
||||
MES.Bind(OF2,NF2);
|
||||
}
|
||||
else {
|
||||
@@ -640,7 +658,8 @@ void BRepOffset_Inter3d::ConnexIntByInt
|
||||
//
|
||||
if (!IsDone(NF1,NF2)) {
|
||||
TopTools_ListOfShape LInt1,LInt2;
|
||||
BRepOffset_Tool::Inter3D (NF1,NF2,LInt1,LInt2,CurSide,E,F1,F2);
|
||||
Standard_Boolean IsEsmooth = Analyse.IsEdgeSmooth(E);
|
||||
BRepOffset_Tool::Inter3D (NF1,NF2,LInt1,LInt2,CurSide,myOffset,E,F1,F2,IsEsmooth);
|
||||
SetDone(NF1,NF2);
|
||||
if (!LInt1.IsEmpty()) {
|
||||
Store (NF1,NF2,LInt1,LInt2);
|
||||
@@ -1039,7 +1058,7 @@ void BRepOffset_Inter3d::ContextIntByInt
|
||||
TopTools_ListOfShape LInt1,LInt2;
|
||||
TopTools_ListOfShape LOE;
|
||||
LOE.Append(OE);
|
||||
BRepOffset_Tool::Inter3D (WCF,NF,LInt1,LInt2,Side,E,CF,F);
|
||||
BRepOffset_Tool::Inter3D (WCF,NF,LInt1,LInt2,Side,myOffset,E,CF,F);
|
||||
SetDone(NF,CF);
|
||||
if (!LInt1.IsEmpty()) {
|
||||
Store (CF,NF,LInt1,LInt2);
|
||||
@@ -1084,14 +1103,14 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte
|
||||
BRepAlgo_Image& InitOffsetEdge)
|
||||
|
||||
{
|
||||
TopTools_ListOfShape LInt1,LInt2;
|
||||
TopTools_MapOfShape MV;
|
||||
TopExp_Explorer exp;
|
||||
TopoDS_Face OF1,OF2;
|
||||
TopoDS_Edge OE;
|
||||
BRep_Builder B;
|
||||
TopoDS_Edge NullEdge;
|
||||
TopoDS_Face NullFace;
|
||||
TopTools_ListOfShape LInt1,LInt2;
|
||||
TopTools_MapOfShape MV;
|
||||
TopExp_Explorer exp;
|
||||
TopoDS_Face OF1,OF2;
|
||||
TopoDS_Edge OE;
|
||||
BRep_Builder B;
|
||||
TopoDS_Edge NullEdge;
|
||||
TopoDS_Face NullFace;
|
||||
Standard_Integer j;
|
||||
|
||||
for (j = 1; j <= ContextFaces.Extent(); j++) {
|
||||
@@ -1261,7 +1280,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte
|
||||
// If no trace try intersection.
|
||||
//-------------------------------------------------------
|
||||
if (LInt1.IsEmpty()) {
|
||||
BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,myOffset,NullEdge,NullFace,NullFace);
|
||||
}
|
||||
Store (CF,OF1,LInt1,LInt2);
|
||||
}
|
||||
|
@@ -45,19 +45,45 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes, const TopAbs_State Side, const Standard_Real Tol);
|
||||
Standard_EXPORT BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& theAsDes,
|
||||
const TopAbs_State theSide,
|
||||
const Standard_Real theOffset,
|
||||
const Standard_Real theTol);
|
||||
|
||||
Standard_EXPORT void CompletInt (const TopTools_ListOfShape& SetOfFaces, const BRepAlgo_Image& InitOffsetFace);
|
||||
Standard_EXPORT void CompletInt (const TopTools_ListOfShape& SetOfFaces,
|
||||
const BRepAlgo_Image& InitOffsetFace);
|
||||
|
||||
Standard_EXPORT void FaceInter (const TopoDS_Face& F1, const TopoDS_Face& F2, const BRepAlgo_Image& InitOffsetFace);
|
||||
Standard_EXPORT void FaceInter (const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2,
|
||||
const BRepAlgo_Image& InitOffsetFace);
|
||||
|
||||
Standard_EXPORT void ConnexIntByArc (const TopTools_ListOfShape& SetOfFaces, const TopoDS_Shape& ShapeInit, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace);
|
||||
Standard_EXPORT void ConnexIntByArc (const TopTools_ListOfShape& SetOfFaces,
|
||||
const TopoDS_Shape& ShapeInit,
|
||||
const BRepOffset_Analyse& Analyse,
|
||||
const BRepAlgo_Image& InitOffsetFace);
|
||||
|
||||
Standard_EXPORT void ConnexIntByInt (const TopoDS_Shape& SI, const BRepOffset_DataMapOfShapeOffset& MapSF, const BRepOffset_Analyse& A, TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed, const Standard_Boolean bIsPlanar = Standard_False);
|
||||
Standard_EXPORT void ConnexIntByInt (const TopoDS_Shape& SI,
|
||||
const BRepOffset_DataMapOfShapeOffset& MapSF,
|
||||
const BRepOffset_Analyse& A,
|
||||
TopTools_DataMapOfShapeShape& MES,
|
||||
TopTools_DataMapOfShapeShape& Build,
|
||||
TopTools_ListOfShape& Failed,
|
||||
const Standard_Boolean bIsPlanar = Standard_False);
|
||||
|
||||
Standard_EXPORT void ContextIntByInt (const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean ExtentContext, const BRepOffset_DataMapOfShapeOffset& MapSF, const BRepOffset_Analyse& A, TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed, const Standard_Boolean bIsPlanar = Standard_False);
|
||||
Standard_EXPORT void ContextIntByInt (const TopTools_IndexedMapOfShape& ContextFaces,
|
||||
const Standard_Boolean ExtentContext,
|
||||
const BRepOffset_DataMapOfShapeOffset& MapSF,
|
||||
const BRepOffset_Analyse& A,
|
||||
TopTools_DataMapOfShapeShape& MES,
|
||||
TopTools_DataMapOfShapeShape& Build,
|
||||
TopTools_ListOfShape& Failed,
|
||||
const Standard_Boolean bIsPlanar = Standard_False);
|
||||
|
||||
Standard_EXPORT void ContextIntByArc (const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean ExtentContext, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace, BRepAlgo_Image& InitOffsetEdge);
|
||||
Standard_EXPORT void ContextIntByArc (const TopTools_IndexedMapOfShape& ContextFaces,
|
||||
const Standard_Boolean ExtentContext,
|
||||
const BRepOffset_Analyse& Analyse,
|
||||
const BRepAlgo_Image& InitOffsetFace,
|
||||
BRepAlgo_Image& InitOffsetEdge);
|
||||
|
||||
Standard_EXPORT void AddCommonEdges (const TopTools_ListOfShape& SetOfFaces);
|
||||
|
||||
@@ -91,6 +117,7 @@ private:
|
||||
TopTools_DataMapOfShapeListOfShape myDone;
|
||||
TopTools_IndexedMapOfShape myNewEdges;
|
||||
TopAbs_State mySide;
|
||||
Standard_Real myOffset;
|
||||
Standard_Real myTol;
|
||||
|
||||
|
||||
|
@@ -62,6 +62,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
|
||||
|
||||
for (; it.More(); it.Next()) {
|
||||
const TopoDS_Face& F = TopoDS::Face(it.Value());
|
||||
|
||||
//---------------------------
|
||||
// Initialization of Loops.
|
||||
//---------------------------
|
||||
@@ -74,6 +75,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
|
||||
|
||||
for (itl.Initialize(LE); itl.More(); itl.Next()) {
|
||||
TopoDS_Edge E = TopoDS::Edge(itl.Value());
|
||||
|
||||
if (Image.HasImage(E)) {
|
||||
//-------------------------------------------
|
||||
// E was already cut in another face.
|
||||
@@ -164,6 +166,146 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Build
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
|
||||
const Handle(BRepAlgo_AsDes)& AsDes,
|
||||
BRepAlgo_Image& Image,
|
||||
BRepOffset_DataMapOfFaceMapEE& theFaceEdgeEdge)
|
||||
{
|
||||
TopTools_ListIteratorOfListOfShape it(LF);
|
||||
TopTools_ListIteratorOfListOfShape itl,itLCE;
|
||||
BRepAlgo_Loop Loops;
|
||||
Loops.VerticesForSubstitute( myVerVerMap );
|
||||
|
||||
for (; it.More(); it.Next()) {
|
||||
const TopoDS_Face& F = TopoDS::Face(it.Value());
|
||||
|
||||
const TopTools_DataMapOfShapeListOfShape& aEEmap = theFaceEdgeEdge(F);
|
||||
|
||||
//---------------------------
|
||||
// Initialization of Loops.
|
||||
//---------------------------
|
||||
Loops.Init(F);
|
||||
//-----------------------------
|
||||
// return edges of F.
|
||||
//-----------------------------
|
||||
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
|
||||
TopTools_ListOfShape AddedEdges;
|
||||
|
||||
for (itl.Initialize(LE); itl.More(); itl.Next()) {
|
||||
TopoDS_Edge E = TopoDS::Edge(itl.Value());
|
||||
|
||||
if (aEEmap.IsBound(E))
|
||||
{
|
||||
const TopTools_ListOfShape& aElist = aEEmap(E);
|
||||
TopTools_ListIteratorOfListOfShape anItl(aElist);
|
||||
for (; anItl.More(); anItl.Next())
|
||||
{
|
||||
TopoDS_Edge aNewEdge = TopoDS::Edge(anItl.Value());
|
||||
aNewEdge.Orientation (E.Orientation());
|
||||
Loops.AddNewEdge(aNewEdge);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Image.HasImage(E)) {
|
||||
//-------------------------------------------
|
||||
// E was already cut in another face.
|
||||
// Return the cut edges reorientate them as E.
|
||||
// See pb for the edges that have disappeared?
|
||||
//-------------------------------------------
|
||||
const TopTools_ListOfShape& LCE = Image.Image(E);
|
||||
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
|
||||
TopoDS_Shape CE = itLCE.Value().Oriented(E.Orientation());
|
||||
Loops.AddConstEdge(TopoDS::Edge(CE));
|
||||
}
|
||||
}
|
||||
else {
|
||||
Loops .AddEdge(E, AsDes->Descendant(E));
|
||||
AddedEdges.Append (E);
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------
|
||||
// Unwind.
|
||||
//------------------------
|
||||
Loops.Perform();
|
||||
Loops.WiresToFaces();
|
||||
//------------------------
|
||||
// MAJ SD.
|
||||
//------------------------
|
||||
const TopTools_ListOfShape& NF = Loops.NewFaces();
|
||||
//-----------------------
|
||||
// F => New faces;
|
||||
//-----------------------
|
||||
Image.Bind(F,NF);
|
||||
|
||||
if (!Loops.HasNewEdges())
|
||||
{
|
||||
TopTools_ListIteratorOfListOfShape itAdded;
|
||||
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
|
||||
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
|
||||
//-----------------------
|
||||
// E => New edges;
|
||||
//-----------------------
|
||||
const TopTools_ListOfShape& LoopNE = Loops.NewEdges(E);
|
||||
if (Image.HasImage(E)) {
|
||||
Image.Add(E,LoopNE);
|
||||
}
|
||||
else {
|
||||
Image.Bind(E,LoopNE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loops.GetVerticesForSubstitute( myVerVerMap );
|
||||
if (myVerVerMap.IsEmpty())
|
||||
return;
|
||||
BRep_Builder BB;
|
||||
for (it.Initialize( LF ); it.More(); it.Next())
|
||||
{
|
||||
TopoDS_Shape F = it.Value();
|
||||
TopTools_ListOfShape LIF;
|
||||
Image.LastImage( F, LIF );
|
||||
for (itl.Initialize(LIF); itl.More(); itl.Next())
|
||||
{
|
||||
const TopoDS_Shape& IF = itl.Value();
|
||||
TopExp_Explorer EdExp( IF, TopAbs_EDGE );
|
||||
for (; EdExp.More(); EdExp.Next())
|
||||
{
|
||||
TopoDS_Shape E = EdExp.Current();
|
||||
TopTools_ListOfShape VList;
|
||||
TopoDS_Iterator VerExp( E );
|
||||
for (; VerExp.More(); VerExp.Next())
|
||||
VList.Append( VerExp.Value() );
|
||||
TopTools_ListIteratorOfListOfShape itlv( VList );
|
||||
for (; itlv.More(); itlv.Next())
|
||||
{
|
||||
const TopoDS_Shape& V = itlv.Value();
|
||||
if (myVerVerMap.IsBound( V ))
|
||||
{
|
||||
TopoDS_Shape NewV = myVerVerMap( V );
|
||||
E.Free( Standard_True );
|
||||
NewV.Orientation( V.Orientation() );
|
||||
Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape());
|
||||
Handle(BRep_TVertex)& NewTV = *((Handle(BRep_TVertex)*) &NewV.TShape());
|
||||
if (TV->Tolerance() > NewTV->Tolerance())
|
||||
NewTV->Tolerance( TV->Tolerance() );
|
||||
NewTV->ChangePoints().Append( TV->ChangePoints() );
|
||||
AsDes->Replace( V, NewV );
|
||||
BB.Remove( E, V );
|
||||
BB.Add( E, NewV );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsBetweenCorks
|
||||
//purpose :
|
||||
@@ -175,6 +317,12 @@ static Standard_Boolean IsBetweenCorks(const TopoDS_Shape& E,
|
||||
{
|
||||
if (!AsDes->HasAscendant(E)) return 1;
|
||||
const TopTools_ListOfShape& LF = AsDes->Ascendant(E);
|
||||
|
||||
//Temporary
|
||||
if (LF.Extent() == 1)
|
||||
return 0;
|
||||
///////////
|
||||
|
||||
TopTools_ListIteratorOfListOfShape it;
|
||||
for (it.Initialize(LF); it.More(); it.Next()) {
|
||||
const TopoDS_Shape& S = it.Value();
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <BRepOffset_DataMapOfFaceMapEE.hxx>
|
||||
class BRepAlgo_AsDes;
|
||||
class BRepAlgo_Image;
|
||||
class BRepOffset_Analyse;
|
||||
@@ -44,10 +45,16 @@ public:
|
||||
BRepAlgo_Image& Image,
|
||||
BRepAlgo_Image& theImageVV);
|
||||
|
||||
Standard_EXPORT void Build (const TopTools_ListOfShape& LF,
|
||||
const Handle(BRepAlgo_AsDes)& AsDes,
|
||||
BRepAlgo_Image& Image,
|
||||
BRepOffset_DataMapOfFaceMapEE& theFaceEdgeEdge);
|
||||
|
||||
Standard_EXPORT void BuildOnContext (const TopTools_ListOfShape& LContext,
|
||||
const BRepOffset_Analyse& Analyse,
|
||||
const Handle(BRepAlgo_AsDes)& AsDes,
|
||||
BRepAlgo_Image& Image,
|
||||
//BRepOffset_DataMapOfFaceMapEE& theFaceEdgeEdge,
|
||||
const Standard_Boolean InSide);
|
||||
|
||||
Standard_EXPORT void BuildFaces (const TopTools_ListOfShape& LF,
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include <BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx>
|
||||
#include <BRepOffset_DataMapOfShapeMapOfShape.hxx>
|
||||
#include <BRepOffset_DataMapOfShapeOffset.hxx>
|
||||
#include <BRepOffset_SequenceOfIndexedMapOfShape.hxx>
|
||||
#include <BRepOffset_Inter2d.hxx>
|
||||
#include <BRepOffset_Inter3d.hxx>
|
||||
#include <BRepOffset_Interval.hxx>
|
||||
@@ -139,8 +140,6 @@
|
||||
char name[100];
|
||||
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : DEBVerticesControl
|
||||
//purpose :
|
||||
@@ -245,6 +244,20 @@ static void DEBVerticesControl (const TopTools_IndexedMapOfShape& NewEdges,
|
||||
//=======================================================================
|
||||
// static methods
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Integer FindIndex(const Standard_Integer* theArray,
|
||||
const Standard_Integer theIndex);
|
||||
|
||||
static void SplitIntersectionEdges(const TopoDS_Edge& theEdge1,
|
||||
const TopoDS_Edge& theEdge2,
|
||||
TopTools_ListOfShape& theNewEdgesForF1,
|
||||
TopTools_ListOfShape& theNewEdgesForF2,
|
||||
BRepOffset_SequenceOfIndexedMapOfShape& theVsets);
|
||||
|
||||
static void AddVerticesToSets(const TopoDS_Shape& theVertex1,
|
||||
const TopoDS_Shape& theVertex2,
|
||||
BRepOffset_SequenceOfIndexedMapOfShape& theVsets);
|
||||
|
||||
static
|
||||
void GetEnlargedFaces(const TopTools_ListOfShape& theFaces,
|
||||
const BRepOffset_DataMapOfShapeOffset& theMapSF,
|
||||
@@ -659,6 +672,7 @@ void BRepOffset_MakeOffset::Clear()
|
||||
myEdgeIntEdges .Clear();
|
||||
myAsDes ->Clear();
|
||||
myDone = Standard_False;
|
||||
myFaceEdgeEdge.Clear();
|
||||
myGenerated.Clear();
|
||||
myResMap.Clear();
|
||||
}
|
||||
@@ -874,6 +888,12 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
|
||||
// There are possible second variant: analytical continuation of arcsin.
|
||||
Standard_Real TolAngleCoeff = Min(myTol / (Abs(myOffset * 0.5) + Precision::Confusion()), 1.0);
|
||||
Standard_Real TolAngle = 4*ASin(TolAngleCoeff);
|
||||
//Standard_Real TolAngleForEdges = TolAngle;
|
||||
|
||||
if (myJoin == GeomAbs_Intersection)
|
||||
TolAngle = Precision::Angular(); //Precision::Confusion(); //0.0001;
|
||||
|
||||
myAnalyse.SetJoinType(myJoin);
|
||||
if ((myJoin == GeomAbs_Intersection) && myInter && myIsPlanar)
|
||||
{
|
||||
myAnalyse.SetOffsetValue (myOffset);
|
||||
@@ -903,7 +923,7 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
|
||||
//-----------------
|
||||
// Intersection 3d .
|
||||
//-----------------
|
||||
BRepOffset_Inter3d Inter(myAsDes,Side,myTol);
|
||||
BRepOffset_Inter3d Inter(myAsDes,Side,myOffset,myTol);
|
||||
Intersection3D (Inter);
|
||||
//-----------------
|
||||
// Intersection2D
|
||||
@@ -982,6 +1002,16 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
|
||||
MakeSolid();
|
||||
}
|
||||
|
||||
/*
|
||||
if (myOffsetShape.IsNull())
|
||||
{
|
||||
TopoDS_Compound aCompound;
|
||||
BRep_Builder aBB;
|
||||
aBB.MakeCompound (aCompound);
|
||||
myOffsetShape = aCompound;
|
||||
}
|
||||
*/
|
||||
|
||||
myDone = Standard_True;
|
||||
}
|
||||
|
||||
@@ -1210,7 +1240,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
|
||||
Standard_Boolean ExtentContext = 0;
|
||||
if (myOffset > 0) ExtentContext = 1;
|
||||
|
||||
BRepOffset_Inter3d Inter3 (AsDes,Side,myTol);
|
||||
BRepOffset_Inter3d Inter3 (AsDes,Side,myOffset,myTol);
|
||||
// Intersection between parallel faces
|
||||
Inter3.ConnexIntByInt(myFaceComp,MapSF,myAnalyse,MES,Build,Failed,myIsPlanar);
|
||||
// Intersection with caps.
|
||||
@@ -1291,6 +1321,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
|
||||
}
|
||||
else {
|
||||
myMakeLoops.Build(LFE, AsDes, IMOE, myImageVV);
|
||||
//myMakeLoops.Build(LFE, AsDes, IMOE, myFaceEdgeEdge);
|
||||
}
|
||||
//
|
||||
#ifdef OCCT_DEBUG
|
||||
@@ -1324,6 +1355,18 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
|
||||
const TopoDS_Edge& COE = TopoDS::Edge(Exp2.Current());
|
||||
|
||||
myAsDes->Add (OFE,COE);
|
||||
|
||||
//jgv
|
||||
/*
|
||||
const TopoDS_Face& aOFE = TopoDS::Face(OFE);
|
||||
if (myFaceEdgeEdge.IsBound(aOFE))
|
||||
{
|
||||
const TopTools_DataMapOfShapeListOfShape& aEEmap = myFaceEdgeEdge(aOFE);
|
||||
const TopTools_ListOfShape& aElist = aEEmap(COE);
|
||||
myAsDes->Add (OFE, aElist.First());
|
||||
}
|
||||
*/
|
||||
/////
|
||||
#ifdef DRAW
|
||||
if (AffichInt2d) {
|
||||
sprintf(name,"AE_%d",NbAE++);
|
||||
@@ -2052,6 +2095,8 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
for (i = 1; i <= Emap.Extent(); i++)
|
||||
{
|
||||
TopoDS_Edge anEdge = TopoDS::Edge( Emap(i) );
|
||||
if (!myInitOffsetEdge.IsImage(anEdge))
|
||||
continue;
|
||||
//Standard_Real f, l;
|
||||
//Handle(Geom_Curve) theCurve = BRep_Tool::Curve( anEdge, f, l );
|
||||
//Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &anEdge.TShape());
|
||||
@@ -2584,6 +2629,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_IndexedMapOfShape& Modif)
|
||||
|
||||
Standard_Boolean InSide = 1;
|
||||
if (myOffset > 0 ) InSide = 0;
|
||||
//myMakeLoops.BuildOnContext(LC,myAnalyse,myAsDes,myImageOffset,myFaceEdgeEdge,InSide);
|
||||
myMakeLoops.BuildOnContext(LC,myAnalyse,myAsDes,myImageOffset,InSide);
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
@@ -2714,15 +2760,19 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
|
||||
{
|
||||
gp_Pnt aPntF = BRep_Tool::Pnt(V1);
|
||||
gp_Pnt aPntL = BRep_Tool::Pnt(V2);
|
||||
Standard_Real aDistE = aPntF.SquareDistance(aPntL);
|
||||
if ( aDistE < Precision::SquareConfusion())
|
||||
Standard_Real aSqDistE = aPntF.SquareDistance(aPntL);
|
||||
if ( aSqDistE < Precision::SquareConfusion())
|
||||
{
|
||||
// Bad case: non closed, but vertexes mapped to same 3d point.
|
||||
continue;
|
||||
}
|
||||
|
||||
Standard_Real anEdgeTol = BRep_Tool::Tolerance(anEdge);
|
||||
if (aDistE < anEdgeTol)
|
||||
Standard_Real aSqEdgeTol = anEdgeTol*anEdgeTol;
|
||||
Standard_Real aTolV1 = BRep_Tool::Tolerance(V1),
|
||||
aTolV2 = BRep_Tool::Tolerance(V2);
|
||||
Standard_Real aSqSumTolVV = (aTolV1+aTolV2)*(aTolV1+aTolV2);
|
||||
if (aSqDistE < aSqEdgeTol || aSqDistE < aSqSumTolVV)
|
||||
{
|
||||
// Potential problems not detected via checkshape.
|
||||
gp_Pnt aPntOF = BRep_Tool::Pnt(V4);
|
||||
@@ -3165,11 +3215,39 @@ void BRepOffset_MakeOffset::MakeShells ()
|
||||
}
|
||||
//
|
||||
if (!bDone) {
|
||||
BRepTools_Quilt Glue;
|
||||
|
||||
BRepBuilderAPI_Sewing aSewer;
|
||||
TopTools_ListIteratorOfListOfShape aItLS(aLSF);
|
||||
for (; aItLS.More(); aItLS.Next()) {
|
||||
Glue.Add(aItLS.Value());
|
||||
for (; aItLS.More(); aItLS.Next())
|
||||
{
|
||||
const TopoDS_Shape& aFace = aItLS.Value();
|
||||
TopExp_Explorer anExplo(aFace, TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anExplo.Current());
|
||||
BRepLib::BuildCurve3d(anEdge);
|
||||
}
|
||||
aSewer.Add(aFace);
|
||||
}
|
||||
|
||||
aSewer.Perform();
|
||||
myOffsetShape = aSewer.SewedShape();
|
||||
if (myOffsetShape.ShapeType() == TopAbs_FACE)
|
||||
{
|
||||
TopoDS_Shell aShell;
|
||||
BRep_Builder aBB;
|
||||
aBB.MakeShell(aShell);
|
||||
aBB.Add(aShell, myOffsetShape);
|
||||
myOffsetShape = aShell;
|
||||
}
|
||||
|
||||
TopTools_IndexedMapOfShape aFmap;
|
||||
TopExp::MapShapes (myOffsetShape, TopAbs_FACE, aFmap);
|
||||
BRepTools_Quilt Glue;
|
||||
//for (aItLS.Initialize(aLSF); aItLS.More(); aItLS.Next()) {
|
||||
for (Standard_Integer ii = 1; ii <= aFmap.Extent(); ii++)
|
||||
Glue.Add(aFmap(ii));
|
||||
//Glue.Add(aItLS.Value());
|
||||
myOffsetShape = Glue.Shells();
|
||||
}
|
||||
//
|
||||
@@ -3998,17 +4076,140 @@ void BRepOffset_MakeOffset::IntersectEdges(const TopTools_ListOfShape& theFaces,
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aDMVV;
|
||||
// intersect edges created from edges
|
||||
TopTools_IndexedMapOfShape aMFV;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aEFmap;
|
||||
for (TopTools_ListOfShape::Iterator it (theFaces); it.More(); it.Next())
|
||||
{
|
||||
const TopoDS_Face& aF = TopoDS::Face (it.Value());
|
||||
aTolF = BRep_Tool::Tolerance (aF);
|
||||
if (!BRepOffset_Inter2d::ConnexIntByInt(aF, theMapSF(aF), theMES, theBuild, theAsDes, theAsDes2d,
|
||||
myOffset, aTolF, myAnalyse, aMFV, myImageVV, myEdgeIntEdges, aDMVV))
|
||||
if (!BRepOffset_Inter2d::ConnexIntByInt(aF, theMapSF(aF), theMES, theBuild,
|
||||
theAsDes, theAsDes2d,
|
||||
myOffset, aTolF, myAnalyse,
|
||||
aMFV, myImageVV, myEdgeIntEdges, aDMVV, myFaceEdgeEdge, aEFmap))
|
||||
{
|
||||
myError = BRepOffset_CannotExtentEdge;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Split intersection edges
|
||||
BRepOffset_SequenceOfIndexedMapOfShape aVsets;
|
||||
for (Standard_Integer ii = 1; ii <= aEFmap.Extent(); ii++)
|
||||
{
|
||||
const TopoDS_Shape& anEdge = aEFmap.FindKey(ii);
|
||||
const TopTools_ListOfShape& aFlist = aEFmap(ii);
|
||||
if (aFlist.Extent() == 2)
|
||||
{
|
||||
const TopoDS_Face& aFace1 = TopoDS::Face(aFlist.First());
|
||||
const TopoDS_Face& aFace2 = TopoDS::Face(aFlist.Last());
|
||||
TopTools_DataMapOfShapeListOfShape* aEEmap1 = myFaceEdgeEdge.ChangeSeek(aFace1);
|
||||
TopTools_DataMapOfShapeListOfShape* aEEmap2 = myFaceEdgeEdge.ChangeSeek(aFace2);
|
||||
TopTools_ListOfShape* aElist1 = aEEmap1->ChangeSeek(anEdge);
|
||||
TopTools_ListOfShape* aElist2 = aEEmap2->ChangeSeek(anEdge);
|
||||
TopoDS_Edge anEdgeOnF1 = TopoDS::Edge(aElist1->First());
|
||||
TopoDS_Edge anEdgeOnF2 = TopoDS::Edge(aElist2->First());
|
||||
anEdgeOnF1.Orientation(TopAbs_FORWARD);
|
||||
anEdgeOnF2.Orientation(TopAbs_FORWARD);
|
||||
|
||||
TopTools_ListOfShape aNElistForF1, aNElistForF2;
|
||||
SplitIntersectionEdges(anEdgeOnF1, anEdgeOnF2, aNElistForF1, aNElistForF2, aVsets);
|
||||
*aElist1 = aNElistForF1;
|
||||
*aElist2 = aNElistForF2;
|
||||
}
|
||||
}
|
||||
//Build VV map
|
||||
TopTools_DataMapOfShapeShape aVVmap;
|
||||
for (Standard_Integer ii = 1; ii <= aVsets.Length(); ii++)
|
||||
{
|
||||
const TopTools_IndexedMapOfShape& aVmap = aVsets(ii);
|
||||
TopoDS_Vertex aCommonVertex;
|
||||
Standard_Real aMaxTol = 0.;
|
||||
for (Standard_Integer jj = 1; jj <= aVmap.Extent(); jj++)
|
||||
{
|
||||
const TopoDS_Vertex& aVertex = TopoDS::Vertex(aVmap(jj));
|
||||
Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
|
||||
if (aTol > aMaxTol)
|
||||
{
|
||||
aMaxTol = aTol;
|
||||
aCommonVertex = aVertex;
|
||||
}
|
||||
}
|
||||
for (Standard_Integer jj = 1; jj <= aVmap.Extent(); jj++)
|
||||
{
|
||||
const TopoDS_Shape& aVertex = aVmap(jj);
|
||||
if (!aVertex.IsSame(aCommonVertex))
|
||||
aVVmap.Bind(aVertex, aCommonVertex);
|
||||
}
|
||||
}
|
||||
|
||||
//Update vertices
|
||||
BRep_Builder aBB;
|
||||
for (Standard_Integer ii = 1; ii <= aEFmap.Extent(); ii++)
|
||||
{
|
||||
const TopoDS_Shape& anEdge = aEFmap.FindKey(ii);
|
||||
const TopTools_ListOfShape& aFlist = aEFmap(ii);
|
||||
TopTools_ListIteratorOfListOfShape itface(aFlist);
|
||||
TopTools_MapOfShape aNEmap;
|
||||
for (; itface.More(); itface.Next())
|
||||
{
|
||||
const TopoDS_Face& aFace = TopoDS::Face(itface.Value());
|
||||
const TopTools_DataMapOfShapeListOfShape& aEEmap = myFaceEdgeEdge(aFace);
|
||||
const TopTools_ListOfShape& aElist = aEEmap(anEdge);
|
||||
TopTools_ListIteratorOfListOfShape itedge(aElist);
|
||||
for (; itedge.More(); itedge.Next())
|
||||
{
|
||||
TopoDS_Edge aNewEdge = TopoDS::Edge(itedge.Value());
|
||||
if (!aNEmap.Add(aNewEdge))
|
||||
continue;
|
||||
|
||||
aNewEdge.Orientation(TopAbs_FORWARD);
|
||||
TopoDS_Vertex aV1, aV2;
|
||||
TopExp::Vertices(aNewEdge, aV1, aV2);
|
||||
if (aVVmap.IsBound(aV1))
|
||||
{
|
||||
TopoDS_Shape aNewV = aVVmap(aV1);
|
||||
aNewV.Orientation(TopAbs_FORWARD);
|
||||
aNewEdge.Free(Standard_True);
|
||||
aBB.Remove(aNewEdge, aV1);
|
||||
aBB.Add(aNewEdge, aNewV);
|
||||
|
||||
if (aV2.IsSame(aV1))
|
||||
{
|
||||
aNewV.Orientation(TopAbs_REVERSED);
|
||||
aBB.Remove(aNewEdge, aV2);
|
||||
aBB.Add(aNewEdge, aNewV);
|
||||
}
|
||||
}
|
||||
if (!aV2.IsSame(aV1) && aVVmap.IsBound(aV2))
|
||||
{
|
||||
TopoDS_Shape aNewV = aVVmap(aV2);
|
||||
aNewV.Orientation(TopAbs_REVERSED);
|
||||
aNewEdge.Free(Standard_True);
|
||||
aBB.Remove(aNewEdge, aV2);
|
||||
aBB.Add(aNewEdge, aNewV);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Temporary
|
||||
/*
|
||||
BRepBuilderAPI_Sewing aSewer;
|
||||
for (Standard_Integer ii = 1; ii < myFaceFaceMap.Extent(); ii++)
|
||||
{
|
||||
const TopoDS_Shape& aFace = myFaceFaceMap(ii);
|
||||
TopExp_Explorer anExplo(aFace, TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anExplo.Current());
|
||||
BRepLib::BuildCurve3d(anEdge);
|
||||
}
|
||||
aSewer.Add(aFace);
|
||||
}
|
||||
aSewer.Perform();
|
||||
TopoDS_Shape aTmpRes = aSewer.SewedShape();
|
||||
*/
|
||||
///////////
|
||||
|
||||
// intersect edges created from vertices
|
||||
Standard_Integer i, aNbF = aMFV.Extent();
|
||||
for (i = 1; i <= aNbF; ++i) {
|
||||
@@ -4209,9 +4410,14 @@ Standard_Boolean TrimEdge(TopoDS_Edge& NE,
|
||||
GeomAPI_ProjectPointOnCurve Projector(thePoint, theCurve);
|
||||
if (Projector.NbPoints() == 0)
|
||||
{
|
||||
return Standard_False;
|
||||
gp_Pnt aFirstPnt = theCurve->Value(f);
|
||||
gp_Pnt aLastPnt = theCurve->Value(l);
|
||||
Standard_Real aDistToFirst = thePoint.SquareDistance(aFirstPnt);
|
||||
Standard_Real aDistToLast = thePoint.SquareDistance(aLastPnt);
|
||||
U = (aDistToFirst < aDistToLast)? f : l;
|
||||
}
|
||||
U = Projector.LowerDistanceParameter();
|
||||
else
|
||||
U = Projector.LowerDistanceParameter();
|
||||
}
|
||||
if (U < UMin) {
|
||||
UMin = U; V1 = V;
|
||||
@@ -4766,3 +4972,181 @@ void AppendToList(TopTools_ListOfShape& theList,
|
||||
}
|
||||
theList.Append(theShape);
|
||||
}
|
||||
|
||||
Standard_Integer FindIndex(const Standard_Integer* theArray,
|
||||
const Standard_Integer theIndex)
|
||||
{
|
||||
Standard_Integer ii;
|
||||
for (ii = 0; ii < 4; ii++)
|
||||
if (theArray[ii] == theIndex)
|
||||
break;
|
||||
return ii;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitIntersectionEdges
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void SplitIntersectionEdges(const TopoDS_Edge& theEdge1,
|
||||
const TopoDS_Edge& theEdge2,
|
||||
TopTools_ListOfShape& theNewEdgesForF1,
|
||||
TopTools_ListOfShape& theNewEdgesForF2,
|
||||
BRepOffset_SequenceOfIndexedMapOfShape& theVsets)
|
||||
{
|
||||
Standard_Real aParams [4];
|
||||
TopoDS_Vertex aVV [4];
|
||||
BRep_Tool::Range(theEdge1, aParams[0], aParams[1]);
|
||||
BRep_Tool::Range(theEdge2, aParams[2], aParams[3]);
|
||||
TopExp::Vertices(theEdge1, aVV[0], aVV[1]);
|
||||
TopExp::Vertices(theEdge2, aVV[2], aVV[3]);
|
||||
Standard_Integer aIndices [4] = {0, 1, 2, 3};
|
||||
|
||||
for (Standard_Integer ii = 0; ii < 3; ii++)
|
||||
for (Standard_Integer jj = ii+1; jj <= 3; jj++)
|
||||
if (aParams[jj] < aParams[ii])
|
||||
{
|
||||
Standard_Real aTmp = aParams[ii];
|
||||
aParams[ii] = aParams[jj];
|
||||
aParams[jj] = aTmp;
|
||||
TopoDS_Vertex aVertex = aVV[ii];
|
||||
aVV[ii] = aVV[jj];
|
||||
aVV[jj] = aVertex;
|
||||
Standard_Integer anInd = aIndices[ii];
|
||||
aIndices[ii] = aIndices[jj];
|
||||
aIndices[jj] = anInd;
|
||||
}
|
||||
|
||||
Standard_Real aFpar, aLpar;
|
||||
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge1, aFpar, aLpar);
|
||||
if (aCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
|
||||
aCurve = (Handle(Geom_TrimmedCurve)::DownCast(aCurve))->BasisCurve();
|
||||
|
||||
Standard_Integer NCONTROL = 10;
|
||||
for (Standard_Integer ii = 0; ii < 3; ii++)
|
||||
{
|
||||
Standard_Real aTolV1 = BRep_Tool::Tolerance(aVV[ii]);
|
||||
Standard_Real aTolV2 = BRep_Tool::Tolerance(aVV[ii+1]);
|
||||
Standard_Real aSqTolV1 = aTolV1*aTolV1;
|
||||
Standard_Real aSqTolV2 = aTolV2*aTolV2;
|
||||
gp_Pnt aPnt1 = BRep_Tool::Pnt(aVV[ii]);
|
||||
gp_Pnt aPnt2 = BRep_Tool::Pnt(aVV[ii+1]);
|
||||
|
||||
Standard_Boolean IsConfused = Standard_False;
|
||||
if (aParams[ii+1] - aParams[ii] <= Precision::Confusion())
|
||||
IsConfused = Standard_True;
|
||||
else
|
||||
{
|
||||
Standard_Boolean IsBiggerThanTol = Standard_False;
|
||||
Standard_Real aDelta = (aParams[ii+1] - aParams[ii])/NCONTROL;
|
||||
for (Standard_Integer jj = 0; jj <= NCONTROL; jj++)
|
||||
{
|
||||
Standard_Real aPar = aParams[ii] + jj*aDelta;
|
||||
gp_Pnt aPnt = aCurve->Value(aPar);
|
||||
Standard_Real aSqDist1 = aPnt1.SquareDistance(aPnt);
|
||||
Standard_Real aSqDist2 = aPnt2.SquareDistance(aPnt);
|
||||
if (aSqDist1 > aSqTolV1 && aSqDist2 > aSqTolV2)
|
||||
{
|
||||
IsBiggerThanTol = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
IsConfused = !IsBiggerThanTol;
|
||||
}
|
||||
|
||||
if (IsConfused)
|
||||
{
|
||||
//theVVmap.Bind(aVV[ii+1].Oriented(TopAbs_FORWARD), aVV[ii].Oriented(TopAbs_FORWARD));
|
||||
AddVerticesToSets(aVV[ii+1].Oriented(TopAbs_FORWARD),
|
||||
aVV[ii].Oriented(TopAbs_FORWARD),
|
||||
theVsets);
|
||||
aVV[ii+1] = aVV[ii];
|
||||
aParams[ii+1] = aParams[ii];
|
||||
}
|
||||
}
|
||||
|
||||
//Build new edges
|
||||
Standard_Real aMaxTol = Max(BRep_Tool::Tolerance(theEdge1), BRep_Tool::Tolerance(theEdge2));
|
||||
|
||||
TopTools_SequenceOfShape aEseq;
|
||||
TopoDS_Vertex aFirstVertex = aVV[0];
|
||||
Standard_Real aFirstPar = aParams[0];
|
||||
BRep_Builder aBB;
|
||||
for (Standard_Integer ii = 1; ii <= 3; ii++)
|
||||
{
|
||||
TopoDS_Vertex aLastVertex = aVV[ii];
|
||||
Standard_Real aLastPar = aParams[ii];
|
||||
if (aFirstPar == aLastPar)
|
||||
continue;
|
||||
|
||||
aFirstVertex.Orientation(TopAbs_FORWARD);
|
||||
aLastVertex.Orientation(TopAbs_REVERSED);
|
||||
|
||||
TopoDS_Edge aNewEdge = TopoDS::Edge(theEdge1.EmptyCopied());
|
||||
aBB.Add(aNewEdge, aFirstVertex);
|
||||
aBB.Add(aNewEdge, aLastVertex);
|
||||
aBB.Range(aNewEdge, aFirstPar, aLastPar);
|
||||
aBB.UpdateEdge(aNewEdge, aMaxTol);
|
||||
|
||||
aEseq.Append(aNewEdge);
|
||||
aFirstVertex = aLastVertex;
|
||||
aFirstPar = aLastPar;
|
||||
}
|
||||
|
||||
TopTools_ListOfShape* aNElist [2] = { &theNewEdgesForF1, &theNewEdgesForF2 };
|
||||
|
||||
for (Standard_Integer anIndList = 0; anIndList < 2; anIndList++)
|
||||
{
|
||||
Standard_Integer anIndV1forE1 = FindIndex(aIndices, anIndList*2); // 0 or 2
|
||||
Standard_Integer anIndV2forE1 = FindIndex(aIndices, anIndList*2 + 1); // 1 or 3
|
||||
Standard_Real aParamFirstForE1 = aParams[anIndV1forE1];
|
||||
Standard_Real aParamLastForE1 = aParams[anIndV2forE1];
|
||||
|
||||
for (Standard_Integer ii = 1; ii <= aEseq.Length(); ii++)
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(aEseq(ii));
|
||||
Standard_Real fpar, lpar;
|
||||
BRep_Tool::Range(anEdge, fpar, lpar);
|
||||
if (fpar >= aParamFirstForE1 && lpar <= aParamLastForE1)
|
||||
aNElist[anIndList]->Append(anEdge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AddVerticesToSets(const TopoDS_Shape& theVertex1,
|
||||
const TopoDS_Shape& theVertex2,
|
||||
BRepOffset_SequenceOfIndexedMapOfShape& theVsets)
|
||||
{
|
||||
Standard_Integer anIndexOfV1 = 0, anIndexOfV2 = 0;
|
||||
|
||||
for (Standard_Integer ii = 1; ii <= theVsets.Length(); ii++)
|
||||
{
|
||||
const TopTools_IndexedMapOfShape& aVmap = theVsets(ii);
|
||||
if (aVmap.Contains(theVertex1))
|
||||
anIndexOfV1 = ii;
|
||||
if (aVmap.Contains(theVertex2))
|
||||
anIndexOfV2 = ii;
|
||||
}
|
||||
|
||||
if (anIndexOfV1 == 0 && anIndexOfV2 == 0)
|
||||
{
|
||||
TopTools_IndexedMapOfShape aVmap;
|
||||
aVmap.Add(theVertex1);
|
||||
aVmap.Add(theVertex2);
|
||||
theVsets.Append(aVmap);
|
||||
}
|
||||
else if ((anIndexOfV1 != 0 && anIndexOfV2 == 0) ||
|
||||
(anIndexOfV1 == 0 && anIndexOfV2 != 0))
|
||||
{
|
||||
Standard_Integer anIndex = (anIndexOfV1 == 0)? anIndexOfV2 : anIndexOfV1;
|
||||
theVsets(anIndex).Add(theVertex1);
|
||||
theVsets(anIndex).Add(theVertex2);
|
||||
}
|
||||
else if (anIndexOfV1 != anIndexOfV2)
|
||||
{
|
||||
theVsets(anIndexOfV2).RemoveKey(theVertex2);
|
||||
theVsets(anIndexOfV1).Add(theVertex2);
|
||||
if (theVsets(anIndexOfV2).IsEmpty())
|
||||
theVsets.Remove(anIndexOfV2);
|
||||
}
|
||||
}
|
||||
|
@@ -29,13 +29,16 @@
|
||||
#include <GeomAbs_JoinType.hxx>
|
||||
#include <TopTools_DataMapOfShapeReal.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
||||
#include <BRepOffset_Analyse.hxx>
|
||||
#include <BRepAlgo_Image.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <BRepOffset_Error.hxx>
|
||||
#include <BRepOffset_MakeLoops.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_DataMapOfOrientedShapeShape.hxx>
|
||||
#include <BRepOffset_DataMapOfShapeOffset.hxx>
|
||||
#include <BRepOffset_DataMapOfFaceMapEE.hxx>
|
||||
class BRepAlgo_AsDes;
|
||||
class TopoDS_Shape;
|
||||
class TopoDS_Face;
|
||||
@@ -43,8 +46,6 @@ class BRepOffset_Analyse;
|
||||
class BRepAlgo_Image;
|
||||
class BRepOffset_Inter3d;
|
||||
|
||||
|
||||
|
||||
class BRepOffset_MakeOffset
|
||||
{
|
||||
public:
|
||||
@@ -259,6 +260,8 @@ private:
|
||||
Standard_Boolean myIsPerformSewing; // Handle bad walls in thicksolid mode.
|
||||
Standard_Boolean myIsPlanar;
|
||||
TopoDS_Shape myBadShape;
|
||||
//TopTools_IndexedDataMapOfShapeShape myFaceFaceMap;
|
||||
BRepOffset_DataMapOfFaceMapEE myFaceEdgeEdge;
|
||||
TopTools_DataMapOfShapeShape myFacePlanfaceMap;
|
||||
TopTools_ListOfShape myGenerated;
|
||||
TopTools_MapOfShape myResMap;
|
||||
|
@@ -5679,7 +5679,7 @@ void IntersectFaces(const TopoDS_Shape& theFInv,
|
||||
TopTools_ListOfShape aLInt1, aLInt2;
|
||||
TopoDS_Edge aNullEdge;
|
||||
TopoDS_Face aNullFace;
|
||||
BRepOffset_Tool::Inter3D(TopoDS::Face(theFi), TopoDS::Face(theFj), aLInt1, aLInt2, aSide,
|
||||
BRepOffset_Tool::Inter3D(TopoDS::Face(theFi), TopoDS::Face(theFj), aLInt1, aLInt2, aSide, 0.,
|
||||
aNullEdge, aNullFace, aNullFace);
|
||||
//
|
||||
if (aLInt1.IsEmpty()) {
|
||||
|
20
src/BRepOffset/BRepOffset_SequenceOfIndexedMapOfShape.hxx
Normal file
20
src/BRepOffset/BRepOffset_SequenceOfIndexedMapOfShape.hxx
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef BRepOffset_SequenceOfIndexedMapOfShape_HeaderFile
|
||||
#define BRepOffset_SequenceOfIndexedMapOfShape_HeaderFile
|
||||
|
||||
typedef NCollection_Sequence<TopTools_IndexedMapOfShape> BRepOffset_SequenceOfIndexedMapOfShape;
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@@ -88,9 +88,11 @@ public:
|
||||
TopTools_ListOfShape& LInt1,
|
||||
TopTools_ListOfShape& LInt2,
|
||||
const TopAbs_State Side,
|
||||
const Standard_Real theOffset,
|
||||
const TopoDS_Edge& RefEdge,
|
||||
const TopoDS_Face& RefFace1,
|
||||
const TopoDS_Face& RefFace2);
|
||||
const TopoDS_Face& RefFace2,
|
||||
const Standard_Boolean theIsEdgeSmooth = Standard_False);
|
||||
|
||||
//! Find if the edges <Edges> of the face <F2> are on
|
||||
//! the face <F1>.
|
||||
@@ -124,7 +126,8 @@ public:
|
||||
|
||||
Standard_EXPORT static void CheckBounds (const TopoDS_Face& F,
|
||||
const BRepOffset_Analyse& Analyse,
|
||||
Standard_Boolean& enlargeU,
|
||||
Standard_Boolean& enlargeUfirst,
|
||||
Standard_Boolean& enlargeUlast,
|
||||
Standard_Boolean& enlargeVfirst,
|
||||
Standard_Boolean& enlargeVlast);
|
||||
|
||||
@@ -148,7 +151,8 @@ public:
|
||||
TopoDS_Face& NF,
|
||||
const Standard_Boolean ChangeGeom,
|
||||
const Standard_Boolean UpDatePCurve = Standard_False,
|
||||
const Standard_Boolean enlargeU = Standard_True,
|
||||
const Standard_Boolean enlargeUfirst = Standard_True,
|
||||
const Standard_Boolean enlargeUlast = Standard_True,
|
||||
const Standard_Boolean enlargeVfirst = Standard_True,
|
||||
const Standard_Boolean enlargeVlast = Standard_True,
|
||||
const Standard_Integer theExtensionMode = 1,
|
||||
|
@@ -8,6 +8,8 @@ BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx
|
||||
BRepOffset_DataMapOfShapeListOfInterval.hxx
|
||||
BRepOffset_DataMapOfShapeMapOfShape.hxx
|
||||
BRepOffset_DataMapOfShapeOffset.hxx
|
||||
BRepOffset_DataMapOfFaceMapEE.hxx
|
||||
BRepOffset_SequenceOfIndexedMapOfShape.hxx
|
||||
BRepOffset_Error.hxx
|
||||
BRepOffset_Inter2d.cxx
|
||||
BRepOffset_Inter2d.hxx
|
||||
|
@@ -56,6 +56,7 @@
|
||||
|
||||
#include <BRepOffset_MakeOffset.hxx>
|
||||
#include <BRepOffset_MakeSimpleOffset.hxx>
|
||||
#include <BRepOffsetAPI_MakeThickSolid.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <DBRep.hxx>
|
||||
@@ -1164,6 +1165,37 @@ Standard_Integer offsetperform(Draw_Interpretor& theCommands,
|
||||
return 0;
|
||||
}
|
||||
|
||||
Standard_Integer qqq(Draw_Interpretor& ,
|
||||
Standard_Integer theNArg, const char** a)
|
||||
{
|
||||
if (theNArg < 4) return 1;
|
||||
|
||||
TopoDS_Shape aShape = DBRep::Get(a[2]);
|
||||
if (aShape.IsNull()) return 1;
|
||||
|
||||
Standard_Real offset = atof(a[3]);
|
||||
Standard_Real tol = Precision::Confusion();
|
||||
|
||||
TopTools_IndexedMapOfShape aMap;
|
||||
|
||||
TopExp::MapShapes(aShape, TopAbs_FACE, aMap);
|
||||
|
||||
TopTools_ListOfShape aList;
|
||||
aList.Append(aMap(5));
|
||||
aList.Append(aMap(6));
|
||||
|
||||
GeomAbs_JoinType join = GeomAbs_Intersection;
|
||||
|
||||
BRepOffsetAPI_MakeThickSolid hollow1;
|
||||
hollow1.MakeThickSolidByJoin(aShape, aList, offset, tol,
|
||||
BRepOffset_Skin, Standard_False,
|
||||
Standard_False, join);
|
||||
|
||||
TopoDS_Shape newShape = hollow1.Shape();
|
||||
|
||||
DBRep::Set(a[1], newShape);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ROW
|
||||
@@ -2525,4 +2557,8 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands)
|
||||
theCommands.Add("offsetshapesimple",
|
||||
"offsetshapesimple result shape offsetvalue [solid] [tolerance=1e-7]",
|
||||
__FILE__, ComputeSimpleOffset);
|
||||
|
||||
theCommands.Add("qqq",
|
||||
"qqq result shape offset",
|
||||
__FILE__, qqq);
|
||||
}
|
||||
|
@@ -1498,7 +1498,7 @@ void BiTgte_Blend::ComputeCenters()
|
||||
// -----------------------
|
||||
TopAbs_State Side = TopAbs_IN;
|
||||
if (myRadius < 0.) Side = TopAbs_OUT;
|
||||
BRepOffset_Inter3d Inter(myAsDes,Side,myTol);
|
||||
BRepOffset_Inter3d Inter(myAsDes,Side,myRadius,myTol);
|
||||
|
||||
TopTools_DataMapOfShapeBox MapSBox;
|
||||
TopTools_MapOfShape Done;
|
||||
|
@@ -733,6 +733,18 @@ Standard_Boolean Geom_OffsetSurface::IsUClosed () const
|
||||
else if (SBasis->IsKind (STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
|
||||
UClosed = Standard_True;
|
||||
}
|
||||
else if (SBasis->IsKind (STANDARD_TYPE(Geom_BoundedSurface)))
|
||||
{
|
||||
Standard_Real aU1, aU2, aV1, aV2;
|
||||
Bounds( aU1, aU2, aV1, aV2 );
|
||||
Handle(Geom_Curve) aCUF = UIso( aU1 );
|
||||
Handle(Geom_Curve) aCUL = UIso( aU2 );
|
||||
if(aCUF.IsNull() || aCUL.IsNull())
|
||||
return Standard_False;
|
||||
Handle(Geom_BSplineCurve) aBsF = Handle(Geom_BSplineCurve)::DownCast(aCUF);
|
||||
Handle(Geom_BSplineCurve) aBsL = Handle(Geom_BSplineCurve)::DownCast(aCUL);
|
||||
return (!aBsF.IsNull() && !aBsL.IsNull() && aBsF->IsEqual( aBsL, Precision::Confusion()) );
|
||||
}
|
||||
else { UClosed = Standard_False; }
|
||||
}
|
||||
return UClosed;
|
||||
@@ -762,6 +774,18 @@ Standard_Boolean Geom_OffsetSurface::IsVClosed () const
|
||||
if (SBasis->IsKind (STANDARD_TYPE(Geom_ElementarySurface))) {
|
||||
VClosed = SBasis->IsVClosed();
|
||||
}
|
||||
else if (SBasis->IsKind (STANDARD_TYPE(Geom_BoundedSurface)))
|
||||
{
|
||||
Standard_Real aU1, aU2, aV1, aV2;
|
||||
Bounds( aU1, aU2, aV1, aV2 );
|
||||
Handle(Geom_Curve) aCVF = VIso( aV1 );
|
||||
Handle(Geom_Curve) aCVL = VIso( aV2 );
|
||||
if(aCVF.IsNull() || aCVL.IsNull())
|
||||
return Standard_False;
|
||||
Handle(Geom_BSplineCurve) aBsF = Handle(Geom_BSplineCurve)::DownCast(aCVF);
|
||||
Handle(Geom_BSplineCurve) aBsL = Handle(Geom_BSplineCurve)::DownCast(aCVL);
|
||||
return (!aBsF.IsNull() && !aBsL.IsNull() && aBsF->IsEqual(aBsL, Precision::Confusion()));
|
||||
}
|
||||
else { VClosed = Standard_False; }
|
||||
}
|
||||
return VClosed;
|
||||
|
@@ -2968,7 +2968,8 @@ static Standard_Integer OCC30391(Draw_Interpretor& theDI,
|
||||
|
||||
TopoDS_Face Result;
|
||||
BRepOffset_Tool::EnLargeFace(aFace, Result,
|
||||
Standard_True,Standard_True,Standard_True,Standard_True,Standard_True,1,
|
||||
Standard_True, Standard_True,
|
||||
Standard_True, Standard_True, Standard_True, Standard_True, 1,
|
||||
aLenBeforeUfirst, aLenAfterUlast,
|
||||
aLenBeforeVfirst, aLenAfterVlast);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
puts "TODO OCC26577 All: Error : is WRONG because number of EDGE entities in shape"
|
||||
puts "TODO OCC26577 All: Error : is WRONG because number of SHELL entities in shape"
|
||||
puts "TODO OCC26577 All: Error : is WRONG because number of WIRE entities in shape"
|
||||
puts "TODO OCC26577 All: Error : is WRONG because number of FACE entities in shape"
|
||||
|
||||
|
||||
puts "=============================================================="
|
||||
@@ -17,4 +17,4 @@ unifysamedom result_unif result
|
||||
checkshape result
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
15
tests/offset/bugs/bug31845_1
Normal file
15
tests/offset/bugs/bug31845_1
Normal file
@@ -0,0 +1,15 @@
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_1.brep] a
|
||||
|
||||
offsetparameter 1e-7 c i
|
||||
offsetload a 0.2
|
||||
offsetperform result
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 271.847
|
||||
checknbshapes result -t -edge 12 -wire 6 -face 6 -shell 1 -solid 1
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
15
tests/offset/bugs/bug31845_2
Normal file
15
tests/offset/bugs/bug31845_2
Normal file
@@ -0,0 +1,15 @@
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_1.brep] a
|
||||
|
||||
offsetparameter 1e-7 c i
|
||||
offsetload a -0.2
|
||||
offsetperform result
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 210.825
|
||||
checknbshapes result -t -edge 12 -wire 6 -face 6 -shell 1 -solid 1
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
13
tests/offset/bugs/bug31845_3
Normal file
13
tests/offset/bugs/bug31845_3
Normal file
@@ -0,0 +1,13 @@
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_1.brep] a
|
||||
|
||||
qqq result a 0.2
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 423.33
|
||||
checknbshapes result -t -edge 24 -wire 12 -face 10 -shell 1 -solid 1
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
13
tests/offset/bugs/bug31845_4
Normal file
13
tests/offset/bugs/bug31845_4
Normal file
@@ -0,0 +1,13 @@
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_1.brep] a
|
||||
|
||||
qqq result a -0.2
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 388.879
|
||||
checknbshapes result -t -edge 24 -wire 12 -face 10 -shell 1 -solid 1
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
15
tests/offset/bugs/bug31845_f
Normal file
15
tests/offset/bugs/bug31845_f
Normal file
@@ -0,0 +1,15 @@
|
||||
puts "TODO OCC31845 All: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC31845 All: Error : The offset cannot be built."
|
||||
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_f.brep] a
|
||||
explode a f
|
||||
|
||||
offsetparameter 1e-7 p i
|
||||
offsetload a 0.001 a_4 a_5
|
||||
offsetperform result
|
||||
|
17
tests/offset/bugs/bug31845_h
Normal file
17
tests/offset/bugs/bug31845_h
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "TODO OCC31845 All: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC31845 All: Error : The offset cannot be built."
|
||||
puts "TODO OCC31845 All: Tcl Exception: result is not a topological shape!!!"
|
||||
#puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
#puts "TODO OCC31845 All: Error : The volume of result shape is 0"
|
||||
puts "TODO OCC31845 All: FAILED (no final message is found)"
|
||||
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_h.brep] a
|
||||
|
||||
offsetparameter 1e-7 p i
|
||||
offsetload a -0.01
|
||||
offsetperform result
|
14
tests/offset/bugs/bug31845_i
Normal file
14
tests/offset/bugs/bug31845_i
Normal file
@@ -0,0 +1,14 @@
|
||||
puts "TODO OCC31845 All: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC31845 All: Error : The offset cannot be built."
|
||||
|
||||
puts "============================================"
|
||||
puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
|
||||
puts "============================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug31845_h.brep] a
|
||||
explode a f
|
||||
|
||||
offsetparameter 1e-7 p i
|
||||
offsetload a 0.001 a_3 a_4
|
||||
offsetperform result
|
@@ -1,5 +1,7 @@
|
||||
puts "TODO OCC23068 ALL: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC23068 ALL: Error : The volume of result shape "
|
||||
puts "TODO OCC23068 ALL: The command cannot be built"
|
||||
puts "TODO OCC31845 All: Tcl Exception: result is not a topological shape!!!"
|
||||
|
||||
## ======================================
|
||||
## Grid : CCV002
|
||||
|
@@ -5,6 +5,9 @@
|
||||
## ======================================
|
||||
|
||||
puts "TODO OCC26556 ALL: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC23068 ALL: The command cannot be built"
|
||||
puts "TODO OCC31845 All: Tcl Exception: result is not a topological shape!!!"
|
||||
|
||||
restore [locate_data_file CCV_2_d1_gsw.rle] s
|
||||
explode s F
|
||||
catch {offsetcompshape result s -2 s_17}
|
||||
|
@@ -1,6 +1,3 @@
|
||||
puts "TODO OCC25406 ALL: Error : The volume of result shape is"
|
||||
puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
|
||||
|
||||
ellipse w1 0 0 0 15 10
|
||||
mkedge w1 w1 0 pi/2
|
||||
trotate w1 0 0 0 1 0 0 90
|
||||
@@ -11,4 +8,4 @@ revol s w 0 0 0 0 0 1 270
|
||||
|
||||
OFFSETSHAPE -1 {} $calcul $type
|
||||
|
||||
checkprops result -v 0
|
||||
checkprops result -v 9306
|
||||
|
@@ -1,9 +1,5 @@
|
||||
puts "TODO OCC23068 ALL: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC23068 ALL: Error : The offset cannot be built."
|
||||
puts "TODO OCC23068 ALL: Error: The command cannot be built"
|
||||
|
||||
ptorus s 10 10 0 45
|
||||
|
||||
OFFSETSHAPE 1 {s_2} $calcul $type
|
||||
|
||||
checkprops result -v 0
|
||||
checkprops result -v 2330.58
|
||||
|
@@ -1,5 +1,8 @@
|
||||
puts "TODO OCC23068 All: ERROR. offsetperform operation not done."
|
||||
puts "TODO OCC23068 All: Error : The volume of result shape is"
|
||||
puts "TODO OCC23068 ALL: The command cannot be built"
|
||||
puts "TODO OCC31845 All: Tcl Exception: result is not a topological shape!!!"
|
||||
|
||||
# Original bug : hkg60144
|
||||
# Date : 17Juillet98
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
puts "TODO OCC31845 All: Error : The volume of result shape is 0"
|
||||
|
||||
pcone s 5 0 12 90
|
||||
trotate s 0 0 0 0 0 1 90
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
puts "TODO OCC23068 ALL: Error : The volume of result shape "
|
||||
puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
|
||||
pcone s 5 0 12 270
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
puts "TODO OCC31845 All: Error : The volume of result shape is 0"
|
||||
|
||||
psphere s 15 -90 60 90
|
||||
trotate s 0 0 0 0 0 1 90
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
puts "TODO OCC23068 ALL: Error : The volume of result shape "
|
||||
puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
|
||||
psphere s 15 -90 60 270
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
puts "TODO OCC31845 All: Error : The volume of result shape is 0"
|
||||
|
||||
psphere s 15 90
|
||||
trotate s 0 0 0 0 0 1 90
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
puts "TODO OCC23068 ALL: Error: bsection of the result and s is not equal to zero."
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
puts "TODO OCC31845 All: Error : The volume of result shape is 0"
|
||||
|
||||
psphere s 15 270
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
puts "TODO OCC23068 ALL: Error : The volume of result shape"
|
||||
puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
|
||||
puts "TODO OCC31845 All: Error : The command is not valid. The volume is 0."
|
||||
|
||||
psphere s 15 270
|
||||
|
||||
|
@@ -1,9 +1,5 @@
|
||||
puts "TODO OCC23068 ALL: result is not a topological shape"
|
||||
puts "TODO OCC23068 ALL: TEST INCOMPLETE"
|
||||
puts "TODO OCC23068 ALL: Error: The command cannot be built"
|
||||
|
||||
ptorus s 10 10 0 45
|
||||
|
||||
OFFSETSHAPE 1 {} $calcul $type
|
||||
|
||||
checkprops result -v 0
|
||||
checkprops result -v 11455.3
|
||||
|
@@ -1,5 +1,7 @@
|
||||
puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
|
||||
puts "TODO OCC23068 ALL:Error\\s*:\\s*.*The volume"
|
||||
puts "TODO OCC31845 All: Faulty shapes"
|
||||
puts "TODO OCC31845 All: Error : The area of face result_"
|
||||
|
||||
ellipse w1 0 0 0 15 10
|
||||
mkedge w1 w1 0 pi/2
|
||||
trotate w1 0 0 0 1 0 0 90
|
||||
|
@@ -1,6 +1,3 @@
|
||||
puts "TODO OCC23068 ALL: Error : The volume of result shape is"
|
||||
puts "TODO OCC23068 ALL: Error: bsection of the result and s is not equal to zero"
|
||||
|
||||
ellipse w1 0 0 0 15 10
|
||||
mkedge w1 w1 0 pi/2
|
||||
trotate w1 0 0 0 1 0 0 90
|
||||
@@ -11,5 +8,5 @@ revol s w 0 0 0 0 0 1 270
|
||||
|
||||
OFFSETSHAPE -1 {} $calcul $type
|
||||
|
||||
checkprops result -v 0
|
||||
checkprops result -v 9306
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_C4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_G7.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L3.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L9.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M5.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M9.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_N1.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_B5.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D2.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D3.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D5.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D7.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_D9.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_E4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F2.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F5.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F7.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F8.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_F9.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_G1.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_G2.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_G4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_G6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_G9.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_H3.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_H6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_I6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_I8.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_J2.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_J3.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_J4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_K1.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_K2.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L1.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L2.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L3.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L5.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#puts "TODO OCC26577 All: Error : is WRONG because number of EDGE entities in shape"
|
||||
#puts "TODO OCC26577 All: Error : is WRONG because number of SHELL entities in shape"
|
||||
#puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty"
|
||||
|
||||
restore [locate_data_file bug26663_test_offset_L6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L7.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L8.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_L9.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M1.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M3.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M4.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M5.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
restore [locate_data_file bug26663_test_offset_M6.brep] s
|
||||
OFFSETSHAPE ${off_param} {} ${calcul} ${type}
|
||||
checknbshapes result -ref [lrange [nbshapes s] 8 19]
|
||||
checknbshapes result -ref [lrange [nbshapes s] 9 19]
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user