1. Add check of configuration of corner in the end of spine.
2. Correct treatment of "smooth corners".
TColStd_SequenceOfReal& ThePar,
TopTools_SequenceOfShape& S);
-static TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E,
- const TopoDS_Face& F);
-
static Standard_Integer PosOnFace (Standard_Real d1,
Standard_Real d2,
Standard_Real d3);
// skin => same orientation E[0] , inverted orientation E[2]
// if contreskin it is inverted.
//--------------------------------------------------------------
- E[0].Orientation(OriEdgeInFace(E[0],F[0]));
- E[2].Orientation(OriEdgeInFace(E[2],F[1]));
+ E[0].Orientation(BRepTools::OriEdgeInFace(E[0],F[0]));
+ E[2].Orientation(BRepTools::OriEdgeInFace(E[2],F[1]));
if (DistanceToOZ(VF) < DistanceToOZ(VL) ) {
// Skin
TopTools_ListIteratorOfListOfShape itl;
const TopTools_ListOfShape& LF = myMap(CurrentSpine)(VCF);
- TopAbs_Orientation Ori = OriEdgeInFace(TopoDS::Edge(LF.First()),
+ TopAbs_Orientation Ori = BRepTools::OriEdgeInFace(TopoDS::Edge(LF.First()),
CurrentFace);
for (itl.Initialize(LF), itl.Next(); itl.More(); itl.Next()) {
TopoDS_Edge RE = TopoDS::Edge(itl.Value());
MapBis(CurrentFace).Append(RE.Oriented(Ori));
}
const TopTools_ListOfShape& LL = myMap(CurrentSpine)(VCL);
- Ori = OriEdgeInFace(TopoDS::Edge(LL.First()),CurrentFace);
+ Ori = BRepTools::OriEdgeInFace(TopoDS::Edge(LL.First()),CurrentFace);
for (itl.Initialize(LL), itl.Next() ; itl.More(); itl.Next()) {
TopoDS_Edge RE = TopoDS::Edge(itl.Value());
MapBis(CurrentFace).Append(RE.Oriented(Ori));
return TopAbs_REVERSED;
}
-//=======================================================================
-//function : OriEdgeInFace
-//purpose :
-//=======================================================================
-
-TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E,
- const TopoDS_Face& F )
-
-{
- TopExp_Explorer Exp(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
-
- for (; Exp.More() ;Exp.Next()) {
- if (Exp.Current().IsSame(E)) {
- return Exp.Current().Orientation();
- }
- }
- throw Standard_ConstructionError("BRepFill_Evolved::OriEdgeInFace");
-}
-
-
//=======================================================================
//function : IsOnFace
#include <TopoDS_Vertex.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
+#include <ChFi3d.hxx>
-//
-static void Correct2dPoint(const TopoDS_Face& theF, gp_Pnt2d& theP2d);
-//
-static BRepOffset_Type DefineConnectType(const TopoDS_Edge& E,
- const TopoDS_Face& F1,
- const TopoDS_Face& F2,
- const Standard_Real SinTol,
- const Standard_Boolean CorrectPoint);
-//
static void CorrectOrientationOfTangent(gp_Vec& TangVec,
const TopoDS_Vertex& aVertex,
const TopoDS_Edge& anEdge)
// Tangent if the regularity is at least G1.
if (BRep_Tool::HasContinuity(E,F1,F2)) {
if (BRep_Tool::Continuity(E,F1,F2) > GeomAbs_C0) {
- I.Type(BRepOffset_Tangent);
+ I.Type(ChFiDS_Tangential);
LI.Append(I);
return;
}
}
//
- BRepOffset_Type aType = DefineConnectType(E, F1, F2, SinTol, Standard_False);
- if(aType != BRepOffset_Tangent)
+ ChFiDS_TypeOfConcavity aType = ChFi3d::DefineConnectType(E, F1, F2,
+ SinTol, Standard_False);
+ if(aType != ChFiDS_Tangential)
{
- aType = DefineConnectType(E, F1, F2, SinTol, Standard_True);
+ aType = ChFi3d::DefineConnectType(E, F1, F2, SinTol, Standard_True);
}
I.Type(aType);
LI.Append(I);
Standard_Real U1,U2;
const TopoDS_Face& F = TopoDS::Face(L.First());
BRep_Tool::Range(E,F,U1,U2);
- BRepOffset_Interval Inter(U1,U2,BRepOffset_Other);
+ BRepOffset_Interval Inter(U1,U2,ChFiDS_Other);
if (! BRepTools::IsReallyClosed(E,F)) {
- Inter.Type(BRepOffset_FreeBoundary);
+ Inter.Type(ChFiDS_FreeBound);
}
mapEdgeType(E).Append(Inter);
}
//=======================================================================
void BRepOffset_Analyse::Edges(const TopoDS_Vertex& V,
- const BRepOffset_Type T,
+ const ChFiDS_TypeOfConcavity T,
TopTools_ListOfShape& LE)
const
{
//=======================================================================
void BRepOffset_Analyse::Edges(const TopoDS_Face& F,
- const BRepOffset_Type T,
+ const ChFiDS_TypeOfConcavity T,
TopTools_ListOfShape& LE)
const
{
//=======================================================================
void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List,
- const BRepOffset_Type T ) const
+ const ChFiDS_TypeOfConcavity T ) const
{
List.Clear();
BRep_Builder B;
//=======================================================================
void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List,
- const BRepOffset_Type T1,
- const BRepOffset_Type T2) const
+ const ChFiDS_TypeOfConcavity T1,
+ const ChFiDS_TypeOfConcavity T2) const
{
List.Clear();
BRep_Builder B;
void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face,
TopoDS_Compound& Co,
TopTools_MapOfShape& Map,
- const BRepOffset_Type T) const
+ const ChFiDS_TypeOfConcavity T) const
{
BRep_Builder B;
TopExp_Explorer exp(Face,TopAbs_EDGE);
void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face,
TopoDS_Compound& Co,
TopTools_MapOfShape& Map,
- const BRepOffset_Type T1,
- const BRepOffset_Type T2) const
+ const ChFiDS_TypeOfConcavity T1,
+ const ChFiDS_TypeOfConcavity T2) const
{
BRep_Builder B;
TopExp_Explorer exp(Face,TopAbs_EDGE);
}
}
-//=======================================================================
-//function : Correct2dPoint
-//purpose :
-//=======================================================================
-void Correct2dPoint(const TopoDS_Face& theF, gp_Pnt2d& theP2d)
-{
- BRepAdaptor_Surface aBAS(theF, Standard_False);
- if (aBAS.GetType() < GeomAbs_BezierSurface) {
- return;
- }
- //
- const Standard_Real coeff = 0.01;
- Standard_Real eps;
- Standard_Real u1, u2, v1, v2;
- //
- aBAS.Initialize(theF, Standard_True);
- u1 = aBAS.FirstUParameter();
- u2 = aBAS.LastUParameter();
- v1 = aBAS.FirstVParameter();
- v2 = aBAS.LastVParameter();
- if (!(Precision::IsInfinite(u1) || Precision::IsInfinite(u2)))
- {
- eps = Max(coeff*(u2 - u1), Precision::PConfusion());
- if (Abs(theP2d.X() - u1) < eps)
- {
- theP2d.SetX(u1 + eps);
- }
- if (Abs(theP2d.X() - u2) < eps)
- {
- theP2d.SetX(u2 - eps);
- }
- }
- if (!(Precision::IsInfinite(v1) || Precision::IsInfinite(v2)))
- {
- eps = Max(coeff*(v2 - v1), Precision::PConfusion());
- if (Abs(theP2d.Y() - v1) < eps)
- {
- theP2d.SetY(v1 + eps);
- }
- if (Abs(theP2d.Y() - v2) < eps)
- {
- theP2d.SetY(v2 - eps);
- }
- }
-}
-
-//=======================================================================
-//function : DefineConnectType
-//purpose :
-//=======================================================================
-BRepOffset_Type DefineConnectType(const TopoDS_Edge& E,
- const TopoDS_Face& F1,
- const TopoDS_Face& F2,
- const Standard_Real SinTol,
- const Standard_Boolean CorrectPoint)
-{
- TopLoc_Location L;
- Standard_Real f,l;
-
- const Handle(Geom_Surface)& S1 = BRep_Tool::Surface(F1);
- const Handle(Geom_Surface)& S2 = BRep_Tool::Surface(F2);
- //
- Handle (Geom2d_Curve) C1 = BRep_Tool::CurveOnSurface(E,F1,f,l);
- Handle (Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E,F2,f,l);
-
- BRepAdaptor_Curve C(E);
- f = C.FirstParameter();
- l = C.LastParameter();
-//
- Standard_Real ParOnC = 0.5*(f+l);
- gp_Vec T1 = C.DN(ParOnC,1).Transformed(L.Transformation());
- if (T1.SquareMagnitude() > gp::Resolution()) {
- T1.Normalize();
- }
-
- if (BRepOffset_Tool::OriEdgeInFace(E,F1) == TopAbs_REVERSED) {
- T1.Reverse();
- }
- if (F1.Orientation() == TopAbs_REVERSED) T1.Reverse();
-
- gp_Pnt2d P = C1->Value(ParOnC);
- gp_Pnt P3;
- gp_Vec D1U,D1V;
-
- if(CorrectPoint)
- Correct2dPoint(F1, P);
- //
- S1->D1(P.X(),P.Y(),P3,D1U,D1V);
- gp_Vec DN1(D1U^D1V);
- if (F1.Orientation() == TopAbs_REVERSED) DN1.Reverse();
-
- P = C2->Value(ParOnC);
- if(CorrectPoint)
- Correct2dPoint(F2, P);
- S2->D1(P.X(),P.Y(),P3,D1U,D1V);
- gp_Vec DN2(D1U^D1V);
- if (F2.Orientation() == TopAbs_REVERSED) DN2.Reverse();
-
- DN1.Normalize();
- DN2.Normalize();
-
- gp_Vec ProVec = DN1^DN2;
- Standard_Real NormProVec = ProVec.Magnitude();
-
- if (Abs(NormProVec) < SinTol) {
- // plane
- if (DN1.Dot(DN2) > 0) {
- //Tangent
- return BRepOffset_Tangent;
- }
- else {
- //Mixed not finished!
-#ifdef OCCT_DEBUG
- cout <<" faces locally mixed"<<endl;
-#endif
- return BRepOffset_Convex;
- }
- }
- else {
- if (NormProVec > gp::Resolution())
- ProVec.Normalize();
- Standard_Real Prod = T1.Dot(DN1^DN2);
- if (Prod > 0.) {
- //
- return BRepOffset_Convex;
- }
- else {
- //reenters
- return BRepOffset_Concave;
- }
- }
-}
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Standard_Real.hxx>
#include <BRepOffset_ListOfInterval.hxx>
-#include <BRepOffset_Type.hxx>
+#include <ChFiDS_TypeOfConcavity.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
class TopoDS_Shape;
//! Stores in <L> all the edges of Type <T>
//! on the vertex <V>.
- Standard_EXPORT void Edges (const TopoDS_Vertex& V, const BRepOffset_Type T, TopTools_ListOfShape& L) const;
+ Standard_EXPORT void Edges (const TopoDS_Vertex& V,
+ const ChFiDS_TypeOfConcavity T,
+ TopTools_ListOfShape& L) const;
//! Stores in <L> all the edges of Type <T>
//! on the face <F>.
- Standard_EXPORT void Edges (const TopoDS_Face& F, const BRepOffset_Type T, TopTools_ListOfShape& L) const;
+ Standard_EXPORT void Edges (const TopoDS_Face& F,
+ const ChFiDS_TypeOfConcavity T,
+ TopTools_ListOfShape& L) const;
//! set in <Edges> all the Edges of <Shape> which are
//! tangent to <Edge> at the vertex <Vertex>.
- Standard_EXPORT void TangentEdges (const TopoDS_Edge& Edge, const TopoDS_Vertex& Vertex, TopTools_ListOfShape& Edges) const;
+ Standard_EXPORT void TangentEdges (const TopoDS_Edge& Edge,
+ const TopoDS_Vertex& Vertex,
+ TopTools_ListOfShape& Edges) const;
Standard_EXPORT Standard_Boolean HasAncestor (const TopoDS_Shape& S) const;
//! Explode in compounds of faces where
//! all the connex edges are of type <Side>
- Standard_EXPORT void Explode (TopTools_ListOfShape& L, const BRepOffset_Type Type) const;
+ Standard_EXPORT void Explode (TopTools_ListOfShape& L,
+ const ChFiDS_TypeOfConcavity Type) const;
//! Explode in compounds of faces where
//! all the connex edges are of type <Side1> or <Side2>
- Standard_EXPORT void Explode (TopTools_ListOfShape& L, const BRepOffset_Type Type1, const BRepOffset_Type Type2) const;
+ Standard_EXPORT void Explode (TopTools_ListOfShape& L,
+ const ChFiDS_TypeOfConcavity Type1,
+ const ChFiDS_TypeOfConcavity Type2) const;
//! Add in <CO> the faces of the shell containing <Face>
//! where all the connex edges are of type <Side>.
- Standard_EXPORT void AddFaces (const TopoDS_Face& Face, TopoDS_Compound& Co, TopTools_MapOfShape& Map, const BRepOffset_Type Type) const;
+ Standard_EXPORT void AddFaces (const TopoDS_Face& Face,
+ TopoDS_Compound& Co,
+ TopTools_MapOfShape& Map,
+ const ChFiDS_TypeOfConcavity Type) const;
//! Add in <CO> the faces of the shell containing <Face>
//! where all the connex edges are of type <Side1> or <Side2>.
- Standard_EXPORT void AddFaces (const TopoDS_Face& Face, TopoDS_Compound& Co, TopTools_MapOfShape& Map, const BRepOffset_Type Type1, const BRepOffset_Type Type2) const;
+ Standard_EXPORT void AddFaces (const TopoDS_Face& Face,
+ TopoDS_Compound& Co,
+ TopTools_MapOfShape& Map,
+ const ChFiDS_TypeOfConcavity Type1,
+ const ChFiDS_TypeOfConcavity Type2) const;
const BRepOffset_Analyse& Analyse,
const BRepAlgo_Image& InitOffsetFace)
{
- BRepOffset_Type OT = BRepOffset_Concave;
- if (mySide == TopAbs_OUT) OT = BRepOffset_Convex;
+ ChFiDS_TypeOfConcavity OT = ChFiDS_Concave;
+ if (mySide == TopAbs_OUT) OT = ChFiDS_Convex;
TopExp_Explorer Exp(ShapeInit,TopAbs_EDGE);
TopTools_ListOfShape LInt1,LInt2;
TopoDS_Face F1,F2;
// to the tube or if E2 is not a tangent edge.
//-------------------------------------------------------
const BRepOffset_ListOfInterval& L = Analyse.Type(E2);
- if (!L.IsEmpty() && L.First().Type() == BRepOffset_Tangent) {
+ if (!L.IsEmpty() && L.First().Type() == ChFiDS_Tangential) {
continue;
}
const TopTools_ListOfShape& AncE2 = Analyse.Ancestors(E2);
continue;
}
//
- BRepOffset_Type OT = L.First().Type();
- if (OT != BRepOffset_Convex && OT != BRepOffset_Concave) {
+ ChFiDS_TypeOfConcavity OT = L.First().Type();
+ if (OT != ChFiDS_Convex && OT != ChFiDS_Concave) {
continue;
}
//
- if (OT == BRepOffset_Concave) CurSide = TopAbs_IN;
- else CurSide = TopAbs_OUT;
+ if (OT == ChFiDS_Concave) CurSide = TopAbs_IN;
+ else CurSide = TopAbs_OUT;
//-----------------------------------------------------------
// edge is of the proper type, return adjacent faces.
//-----------------------------------------------------------
BRepOffset_Interval::BRepOffset_Interval(const Standard_Real U1,
const Standard_Real U2,
- const BRepOffset_Type Type):
+ const ChFiDS_TypeOfConcavity Type):
f(U1),
l(U2),
type(Type)
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
-#include <BRepOffset_Type.hxx>
+#include <ChFiDS_TypeOfConcavity.hxx>
Standard_EXPORT BRepOffset_Interval();
- Standard_EXPORT BRepOffset_Interval(const Standard_Real U1, const Standard_Real U2, const BRepOffset_Type Type);
+ Standard_EXPORT BRepOffset_Interval(const Standard_Real U1,
+ const Standard_Real U2,
+ const ChFiDS_TypeOfConcavity Type);
void First (const Standard_Real U);
void Last (const Standard_Real U);
- void Type (const BRepOffset_Type T);
+ void Type (const ChFiDS_TypeOfConcavity T);
Standard_Real First() const;
Standard_Real Last() const;
- BRepOffset_Type Type() const;
+ ChFiDS_TypeOfConcavity Type() const;
Standard_Real f;
Standard_Real l;
- BRepOffset_Type type;
+ ChFiDS_TypeOfConcavity type;
};
//purpose :
//=======================================================================
-inline void BRepOffset_Interval::Type(const BRepOffset_Type T)
+inline void BRepOffset_Interval::Type(const ChFiDS_TypeOfConcavity T)
{
type = T;
}
//purpose :
//=======================================================================
-inline BRepOffset_Type BRepOffset_Interval::Type() const
+inline ChFiDS_TypeOfConcavity BRepOffset_Interval::Type() const
{
return type;
}
BRepTools_WireExplorer Wexp;
for (; Explo.More(); Explo.Next())
+ {
+ TopoDS_Face aFace = TopoDS::Face(Explo.Current());
+ TopoDS_Iterator itf(aFace);
+ for (; itf.More(); itf.Next())
{
- TopoDS_Face aFace = TopoDS::Face(Explo.Current());
- TopoDS_Iterator itf(aFace);
- for (; itf.More(); itf.Next())
+ TopoDS_Wire aWire = TopoDS::Wire(itf.Value());
+ for (Wexp.Init(aWire, aFace); Wexp.More(); Wexp.Next())
+ {
+ TopoDS_Edge anEdge = Wexp.Current();
+ if (BRep_Tool::Degenerated(anEdge))
+ continue;
+ const BRepOffset_ListOfInterval& Lint = Analyser.Type(anEdge);
+ if (!Lint.IsEmpty() && Lint.First().Type() == ChFiDS_FreeBound)
{
- TopoDS_Wire aWire = TopoDS::Wire(itf.Value());
- for (Wexp.Init(aWire, aFace); Wexp.More(); Wexp.Next())
- {
- TopoDS_Edge anEdge = Wexp.Current();
- if (BRep_Tool::Degenerated(anEdge))
- continue;
- const BRepOffset_ListOfInterval& Lint = Analyser.Type(anEdge);
- if (!Lint.IsEmpty() && Lint.First().Type() == BRepOffset_FreeBoundary)
- {
- MapEF.Bind(anEdge, aFace);
- Edges.Append(anEdge);
- }
- }
+ MapEF.Bind(anEdge, aFace);
+ Edges.Append(anEdge);
}
+ }
}
+ }
TopTools_ListIteratorOfListOfShape itl;
while (!Edges.IsEmpty())
aCurOffset = myFaceOffset.IsBound(aF) ? myFaceOffset(aF) : myOffset;
BRepOffset_Offset OF(aF, aCurOffset, ShapeTgt, OffsetOutside, myJoin);
TopTools_ListOfShape Let;
- myAnalyse.Edges(aF,BRepOffset_Tangent,Let);
+ myAnalyse.Edges(aF,ChFiDS_Tangential,Let);
TopTools_ListIteratorOfListOfShape itl(Let);
for (; itl.More(); itl.Next()) {
const TopoDS_Edge& Cur = TopoDS::Edge(itl.Value());
TopExp::Vertices (OTE,OV1,OV2);
TopTools_ListOfShape LE;
if (!ShapeTgt.IsBound(V1)) {
- myAnalyse.Edges(V1,BRepOffset_Tangent,LE);
+ myAnalyse.Edges(V1,ChFiDS_Tangential,LE);
const TopTools_ListOfShape& LA =myAnalyse.Ancestors(V1);
if (LE.Extent() == LA.Extent())
ShapeTgt.Bind(V1,OV1);
}
if (!ShapeTgt.IsBound(V2)) {
LE.Clear();
- myAnalyse.Edges(V2,BRepOffset_Tangent,LE);
+ myAnalyse.Edges(V2,ChFiDS_Tangential,LE);
const TopTools_ListOfShape& LA =myAnalyse.Ancestors(V2);
if (LE.Extent() == LA.Extent())
ShapeTgt.Bind(V2,OV2);
//--------------------------------------------------------
// Construction of tubes on edge.
//--------------------------------------------------------
- BRepOffset_Type OT = BRepOffset_Convex;
- if (myOffset < 0.) OT = BRepOffset_Concave;
+ ChFiDS_TypeOfConcavity OT = ChFiDS_Convex;
+ if (myOffset < 0.) OT = ChFiDS_Concave;
for (Exp.Init(myShape,TopAbs_EDGE); Exp.More(); Exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(Exp.Current());
// Particular processing if V is at least a free border.
//-------------------------------------------------------------
TopTools_ListOfShape LBF;
- myAnalyse.Edges(V,BRepOffset_FreeBoundary,LBF);
+ myAnalyse.Edges(V,ChFiDS_FreeBound,LBF);
if (!LBF.IsEmpty()) {
Standard_Boolean First = Standard_True;
for (it.Initialize(LE) ; it.More(); it.Next()) {
//------------------------------------------------------
// MAJ SD.
//------------------------------------------------------
- BRepOffset_Type RT = BRepOffset_Concave;
- if (myOffset < 0.) RT = BRepOffset_Convex;
+ ChFiDS_TypeOfConcavity RT = ChFiDS_Concave;
+ if (myOffset < 0.) RT = ChFiDS_Convex;
BRepOffset_DataMapIteratorOfDataMapOfShapeOffset It(MapSF);
for ( ; It.More(); It.Next()) {
const TopoDS_Shape& SI = It.Key();
// Reconstruction of faces.
//---------------------------
TopoDS_Face F,NF;
- BRepOffset_Type RT = BRepOffset_Concave;
- if (myOffset < 0.) RT = BRepOffset_Convex;
+ ChFiDS_TypeOfConcavity RT = ChFiDS_Concave;
+ if (myOffset < 0.) RT = ChFiDS_Convex;
TopoDS_Shape OE,NE;
TopAbs_Orientation Or;
CopiedMap.Assign(myFaceOffset);
TopTools_DataMapIteratorOfDataMapOfShapeReal it(CopiedMap);
- BRepOffset_Type RT = BRepOffset_Convex;
- if (myOffset < 0.) RT = BRepOffset_Concave;
+ ChFiDS_TypeOfConcavity RT = ChFiDS_Convex;
+ if (myOffset < 0.) RT = ChFiDS_Concave;
for ( ; it.More(); it.Next()) {
const TopoDS_Face& F = TopoDS::Face(it.Key());
TopTools_MapOfShape Dummy;
Build.Add(Co,F);
if (myJoin == GeomAbs_Arc)
- myAnalyse.AddFaces(F,Co,Dummy,BRepOffset_Tangent,RT);
+ myAnalyse.AddFaces(F,Co,Dummy,ChFiDS_Tangential,RT);
else
- myAnalyse.AddFaces(F,Co,Dummy,BRepOffset_Tangent);
+ myAnalyse.AddFaces(F,Co,Dummy,ChFiDS_Tangential);
TopExp_Explorer exp(Co,TopAbs_FACE);
for (; exp.More(); exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
const TopTools_ListOfShape& LA = myAnalyse.Ancestors(E);
if (LA.Extent() < 2) {
- if (myAnalyse.Type(E).First().Type() == BRepOffset_FreeBoundary) {
+ if (myAnalyse.Type(E).First().Type() == ChFiDS_FreeBound) {
FreeEdges.Add(E);
}
}
if ( myAnalyse.HasAncestor(Ed)) {
const BRepOffset_ListOfInterval& LI = myAnalyse.Type(Ed);
if (LI.Extent() == 1 &&
- LI.First().Type() == BRepOffset_Tangent) {
+ LI.First().Type() == ChFiDS_Tangential) {
B.Continuity(OE,F1,F2,GeomAbs_G1);
}
}
}
}
-//=======================================================================
-//function : OriEdgeInFace
-//purpose :
-//=======================================================================
-
-TopAbs_Orientation BRepOffset_Tool::OriEdgeInFace (const TopoDS_Edge& E,
- const TopoDS_Face& F )
-
-{
- TopExp_Explorer Exp;
- Exp.Init(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
-
- for (; Exp.More() ;Exp.Next()) {
- if (Exp.Current().IsSame(E)) {
- return Exp.Current().Orientation();
- }
- }
- throw Standard_ConstructionError("BRepOffset_Tool::OriEdgeInFace");
-}
-
//=======================================================================
//function : FindPeriod
//purpose :
const BRepOffset_ListOfInterval& L = Analyse.Type(anEdge);
if (!L.IsEmpty() || BRep_Tool::Degenerated(anEdge))
{
- BRepOffset_Type OT = L.First().Type();
- if (OT == BRepOffset_Tangent || BRep_Tool::Degenerated(anEdge))
+ ChFiDS_TypeOfConcavity OT = L.First().Type();
+ if (OT == ChFiDS_Tangential || BRep_Tool::Degenerated(anEdge))
{
Standard_Real fpar, lpar;
Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(anEdge, F, fpar, lpar);
//! taking account the orientation of Edge.
Standard_EXPORT static void EdgeVertices (const TopoDS_Edge& E, TopoDS_Vertex& V1, TopoDS_Vertex& V2);
- //! returns the cumul of the orientation of <Edge>
- //! and thc containing wire in <Face>
- Standard_EXPORT static TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E, const TopoDS_Face& F);
-
//! <E> is a section between <F1> and <F2>. Computes
//! <O1> the orientation of <E> in <F1> influenced by <F2>.
//! idem for <O2>.
+++ /dev/null
-// Created on: 1995-10-12
-// Created by: Bruno DUMORTIER
-// 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_Type_HeaderFile
-#define _BRepOffset_Type_HeaderFile
-
-
-enum BRepOffset_Type
-{
-BRepOffset_Concave,
-BRepOffset_Convex,
-BRepOffset_Tangent,
-BRepOffset_FreeBoundary,
-BRepOffset_Other
-};
-
-#endif // _BRepOffset_Type_HeaderFile
BRepOffset_Status.hxx
BRepOffset_Tool.cxx
BRepOffset_Tool.hxx
-BRepOffset_Type.hxx
face1=TopoDS::Face(It.Value());
It.Next();
face2=TopoDS::Face(It.Value());
+
+ Standard_Boolean IsSeam = face1.IsEqual(face2);
// calcul des deux pcurves
const Handle(Geom2d_Curve) c1 = BRep_Tool::CurveOnSurface
(TopoDS::Edge(edge),face1,f1,l1);
if (c1.IsNull()) return 1;
+
+ if (IsSeam)
+ edge.Reverse();
const Handle(Geom2d_Curve) c2 = BRep_Tool::CurveOnSurface
(TopoDS::Edge(edge),face2,f2,l2);
if (c2.IsNull()) return 1;
It.Next();
face2=TopoDS::Face(It.Value());
+ Standard_Boolean IsSeam = face1.IsEqual(face2);
+
// calcul des deux pcurves
const Handle(Geom2d_Curve) c1 = BRep_Tool::CurveOnSurface
(TopoDS::Edge(edge),face1,f1,l1);
if (c1.IsNull()) return 1;
+
+ if (IsSeam)
+ edge.Reverse();
const Handle(Geom2d_Curve) c2 = BRep_Tool::CurveOnSurface
(TopoDS::Edge(edge),face2,f2,l2);
if (c2.IsNull()) return 1;
face1=TopoDS::Face(It.Value());
It.Next();
face2=TopoDS::Face(It.Value());
+
+ Standard_Boolean IsSeam = face1.IsEqual(face2);
+
// calcul des deux pcurves
const Handle(Geom2d_Curve) c1 = BRep_Tool::CurveOnSurface
(TopoDS::Edge(edge),face1,f1,l1);
if (c1.IsNull()) return 1;
+
+ if (IsSeam)
+ edge.Reverse();
const Handle(Geom2d_Curve) c2 = BRep_Tool::CurveOnSurface
(TopoDS::Edge(edge),face2,f2,l2);
if (c2.IsNull()) return 1;
}
+//=======================================================================
+//function : OriEdgeInFace
+//purpose :
+//=======================================================================
+TopAbs_Orientation BRepTools::OriEdgeInFace (const TopoDS_Edge& E,
+ const TopoDS_Face& F )
+
+{
+ TopExp_Explorer Exp(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
+
+ for (; Exp.More() ;Exp.Next()) {
+ if (Exp.Current().IsSame(E)) {
+ return Exp.Current().Orientation();
+ }
+ }
+ throw Standard_ConstructionError("BRepTools::OriEdgeInFace");
+}
const Standard_Real theF,
const Standard_Real theL);
+ //! returns the cumul of the orientation of <Edge>
+ //! and thc containing wire in <Face>
+ Standard_EXPORT static TopAbs_Orientation OriEdgeInFace(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace);
protected:
// ------------------------------------
TopTools_ListOfShape Let;
if ( AS.ShapeType() == TopAbs_FACE) {
- myAnalyse.Edges(TopoDS::Face(AS),BRepOffset_Tangent,Let);
+ myAnalyse.Edges(TopoDS::Face(AS),ChFiDS_Tangential,Let);
}
TopTools_ListIteratorOfListOfShape itlet(Let);
TopExp::Vertices (OTE,OV1,OV2);
TopTools_ListOfShape LE;
if (!EdgeTgt.IsBound(V1)) {
- myAnalyse.Edges(V1,BRepOffset_Tangent,LE);
+ myAnalyse.Edges(V1,ChFiDS_Tangential,LE);
const TopTools_ListOfShape& LA = myAnalyse.Ancestors(V1);
if (LE.Extent() == LA.Extent())
EdgeTgt.Bind(V1,OV1);
}
if (!EdgeTgt.IsBound(V2)) {
LE.Clear();
- myAnalyse.Edges(V2,BRepOffset_Tangent,LE);
+ myAnalyse.Edges(V2,ChFiDS_Tangential,LE);
const TopTools_ListOfShape& LA = myAnalyse.Ancestors(V2);
if (LE.Extent() == LA.Extent())
EdgeTgt.Bind(V2,OV2);
//--------------------------------------------------------
// Construction of tubes on edge.
//--------------------------------------------------------
- BRepOffset_Type OT = BRepOffset_Convex;
- if (myRadius < 0.) OT = BRepOffset_Concave;
+ ChFiDS_TypeOfConcavity OT = ChFiDS_Convex;
+ if (myRadius < 0.) OT = ChFiDS_Concave;
TopTools_IndexedDataMapOfShapeListOfShape Map;
TopExp::MapShapesAndAncestors(Co,TopAbs_EDGE,TopAbs_FACE,Map);
// Proceed with MakeLoops
TopTools_IndexedDataMapOfShapeListOfShape aDMVV;
- BRepOffset_Type OT = BRepOffset_Concave;
- if (myRadius < 0.) OT = BRepOffset_Convex;
+ ChFiDS_TypeOfConcavity OT = ChFiDS_Concave;
+ if (myRadius < 0.) OT = ChFiDS_Convex;
TopTools_ListOfShape LOF;
//it.Initialize(myFaces);
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
+#include <BRepTools.hxx>
+#include <IntTools_Tools.hxx>
+
+static void Correct2dPoint(const TopoDS_Face& theF, gp_Pnt2d& theP2d);
+//
+
+//=======================================================================
+//function : DefineConnectType
+//purpose :
+//=======================================================================
+ChFiDS_TypeOfConcavity ChFi3d::DefineConnectType(const TopoDS_Edge& E,
+ const TopoDS_Face& F1,
+ const TopoDS_Face& F2,
+ const Standard_Real SinTol,
+ const Standard_Boolean CorrectPoint)
+{
+ TopLoc_Location L;
+ Standard_Real f,l;
+
+ const Handle(Geom_Surface)& S1 = BRep_Tool::Surface(F1);
+ const Handle(Geom_Surface)& S2 = BRep_Tool::Surface(F2);
+ //
+ Handle (Geom2d_Curve) C1 = BRep_Tool::CurveOnSurface(E,F1,f,l);
+ Handle (Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E,F2,f,l);
+
+ BRepAdaptor_Curve C(E);
+ f = C.FirstParameter();
+ l = C.LastParameter();
+//
+ Standard_Real ParOnC = 0.5*(f+l);
+ gp_Vec T1 = C.DN(ParOnC,1).Transformed(L.Transformation());
+ if (T1.SquareMagnitude() <= gp::Resolution())
+ {
+ ParOnC = IntTools_Tools::IntermediatePoint(f,l);
+ T1 = C.DN(ParOnC,1).Transformed(L.Transformation());
+ }
+ if (T1.SquareMagnitude() > gp::Resolution()) {
+ T1.Normalize();
+ }
+
+ if (BRepTools::OriEdgeInFace(E,F1) == TopAbs_REVERSED) {
+ T1.Reverse();
+ }
+ if (F1.Orientation() == TopAbs_REVERSED) T1.Reverse();
+
+ gp_Pnt2d P = C1->Value(ParOnC);
+ gp_Pnt P3;
+ gp_Vec D1U,D1V;
+
+ if(CorrectPoint)
+ Correct2dPoint(F1, P);
+ //
+ S1->D1(P.X(),P.Y(),P3,D1U,D1V);
+ gp_Vec DN1(D1U^D1V);
+ if (F1.Orientation() == TopAbs_REVERSED) DN1.Reverse();
+
+ P = C2->Value(ParOnC);
+ if(CorrectPoint)
+ Correct2dPoint(F2, P);
+ S2->D1(P.X(),P.Y(),P3,D1U,D1V);
+ gp_Vec DN2(D1U^D1V);
+ if (F2.Orientation() == TopAbs_REVERSED) DN2.Reverse();
+
+ DN1.Normalize();
+ DN2.Normalize();
+
+ gp_Vec ProVec = DN1^DN2;
+ Standard_Real NormProVec = ProVec.Magnitude();
+
+ if (Abs(NormProVec) < SinTol) {
+ // plane
+ if (DN1.Dot(DN2) > 0) {
+ //Tangent
+ return ChFiDS_Tangential;
+ }
+ else {
+ //Mixed not finished!
+#ifdef OCCT_DEBUG
+ std::cout <<" faces locally mixed"<<std::endl;
+#endif
+ return ChFiDS_Convex;
+ }
+ }
+ else {
+ if (NormProVec > gp::Resolution())
+ ProVec.Normalize();
+ Standard_Real Prod = T1.Dot(DN1^DN2);
+ if (Prod > 0.) {
+ //
+ return ChFiDS_Convex;
+ }
+ else {
+ //reenters
+ return ChFiDS_Concave;
+ }
+ }
+}
//=======================================================================
//function : ConcaveSide
}
return (o1 == o2);
}
+
+//=======================================================================
+//function : Correct2dPoint
+//purpose :
+//=======================================================================
+void Correct2dPoint(const TopoDS_Face& theF, gp_Pnt2d& theP2d)
+{
+ BRepAdaptor_Surface aBAS(theF, Standard_False);
+ if (aBAS.GetType() < GeomAbs_BezierSurface) {
+ return;
+ }
+ //
+ const Standard_Real coeff = 0.01;
+ Standard_Real eps;
+ Standard_Real u1, u2, v1, v2;
+ //
+ aBAS.Initialize(theF, Standard_True);
+ u1 = aBAS.FirstUParameter();
+ u2 = aBAS.LastUParameter();
+ v1 = aBAS.FirstVParameter();
+ v2 = aBAS.LastVParameter();
+ if (!(Precision::IsInfinite(u1) || Precision::IsInfinite(u2)))
+ {
+ eps = Max(coeff*(u2 - u1), Precision::PConfusion());
+ if (Abs(theP2d.X() - u1) < eps)
+ {
+ theP2d.SetX(u1 + eps);
+ }
+ if (Abs(theP2d.X() - u2) < eps)
+ {
+ theP2d.SetX(u2 - eps);
+ }
+ }
+ if (!(Precision::IsInfinite(v1) || Precision::IsInfinite(v2)))
+ {
+ eps = Max(coeff*(v2 - v1), Precision::PConfusion());
+ if (Abs(theP2d.Y() - v1) < eps)
+ {
+ theP2d.SetY(v1 + eps);
+ }
+ if (Abs(theP2d.Y() - v2) < eps)
+ {
+ theP2d.SetY(v2 - eps);
+ }
+ }
+}
#include <Standard_Integer.hxx>
#include <TopAbs_Orientation.hxx>
#include <Standard_Boolean.hxx>
+#include <ChFiDS_TypeOfConcavity.hxx>
class BRepAdaptor_Surface;
class TopoDS_Edge;
+class TopoDS_Face;
class ChFi3d_Builder;
class ChFi3d_ChBuilder;
class ChFi3d_FilBuilder;
DEFINE_STANDARD_ALLOC
+ //! Defines the type of concavity in the edge of connection of two faces
+ Standard_EXPORT static ChFiDS_TypeOfConcavity DefineConnectType (const TopoDS_Edge& E,
+ const TopoDS_Face& F1,
+ const TopoDS_Face& F2,
+ const Standard_Real SinTol,
+ const Standard_Boolean CorrectPoint);
//! Returns Reversed in Or1 and(or) Or2 if
//! the concave edge defined by the interior of faces F1 and F2,
// Obtaining of pcurves of edge on two faces.
const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface
(theEdge, theFace1, aFirst, aLast);
+ //For the case of seam edge
+ TopoDS_Edge EE = theEdge;
+ if (theFace1.IsSame(theFace2))
+ EE.Reverse();
const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface
- (theEdge, theFace2, aFirst, aLast);
+ (EE, theFace2, aFirst, aLast);
if (aC2d1.IsNull() || aC2d2.IsNull())
return Standard_False;
Standard_Integer NbG1Connections = 0;
for(Standard_Integer ii = 1; ii <= 2; ii++){
- TopoDS_Edge E[3],Ec;
+ TopoDS_Edge E[3];
TopoDS_Vertex V;
ChFiDS_State sst;
Standard_Integer iedge;
if(sst == ChFiDS_BreakPoint){
TopTools_ListIteratorOfListOfShape It;//,Jt;
- Standard_Integer i = 0;
Standard_Boolean sommetpourri = Standard_False;
- TopTools_IndexedMapOfShape EdgesOfV;
- //to avoid repeating of edges
+ TopTools_IndexedMapOfOrientedShape EdgesOfV;
+ TopTools_MapOfShape Edges;
+ Edges.Add(E[0]);
+ EdgesOfV.Add(E[0]);
+ Standard_Integer IndOfE = 0;
for (It.Initialize(myVEMap(V)); It.More(); It.Next())
- EdgesOfV.Add(It.Value());
- for (Standard_Integer ind = 1; ind <= EdgesOfV.Extent(); ind++) {
- Ec = TopoDS::Edge(EdgesOfV(ind));
- Standard_Boolean bonedge = !BRep_Tool::Degenerated(Ec);
- if (bonedge)
{
+ TopoDS_Edge anEdge = TopoDS::Edge(It.Value());
+ if (BRep_Tool::Degenerated(anEdge))
+ continue;
TopoDS_Face F1, F2;
- ChFi3d_conexfaces(Ec, F1, F2, myEFMap);
- if (!F2.IsNull() && ChFi3d_isTangentFaces(Ec, F1, F2, GeomAbs_G2))
+ ChFi3d_conexfaces(anEdge, F1, F2, myEFMap);
+ if (!F2.IsNull() && ChFi3d_isTangentFaces(anEdge, F1, F2, GeomAbs_G2)) //smooth edge
{
- bonedge = Standard_False;
if (!F1.IsSame(F2))
NbG1Connections++;
+ continue;
}
+
+ if (Edges.Add(anEdge))
+ {
+ EdgesOfV.Add(anEdge);
+ if (IndOfE < 2)
+ {
+ IndOfE++;
+ E[IndOfE] = anEdge;
}
- if(bonedge){
- if (!Ec.IsSame(E[0]))
+ }
+ else
+ {
+ TopoDS_Vertex V1, V2;
+ TopExp::Vertices(anEdge, V1, V2);
+ if (V1.IsSame(V2)) //edge is closed - two ends of the edge in the vertex
{
- if( i < 2 ){
- i++;
- E[i] = Ec;
+ Standard_Integer anInd = EdgesOfV.FindIndex(anEdge);
+ if (anInd == 0)
+ anInd = EdgesOfV.FindIndex(anEdge.Reversed());
+ anEdge = TopoDS::Edge(EdgesOfV(anInd));
+ anEdge.Reverse();
+ if (EdgesOfV.Add(anEdge))
+ {
+ if (IndOfE < 2)
+ {
+ IndOfE++;
+ E[IndOfE] = anEdge;
}
- else{
-#ifdef OCCT_DEBUG
- cout<<"top has more than 3 edges"<<endl;
-#endif
- sommetpourri = Standard_True;
- break;
}
}
}
}
- if(i != 2) sommetpourri = Standard_True;
+
+ if (EdgesOfV.Extent() != 3)
+ sommetpourri = Standard_True;
+
if(!sommetpourri){
sst = ChFi3d_EdgeState(E,myEFMap);
}
if (ChFi3d_isTangentFaces(Ec,ff1,ff2)) return 0;
// Modified by Sergey KHROMOV - Fri Dec 21 17:46:24 2001 Begin
+ //Define concavity
+ ChFiDS_TypeOfConcavity TypeOfConcavity = ChFi3d::DefineConnectType(Ec, ff1, ff2,
+ 1.e-5, Standard_True);
+ Spine->SetTypeOfConcavity(TypeOfConcavity);
+
BRepAdaptor_Curve CEc,CEv;
TopAbs_Orientation curor = Ec.Orientation();
TopExp::Vertices(Ec,VStart,LVEc);
CEc.D1(Wl,P2,V1);
Wl = BRep_Tool::Parameter(LVEc,Ec);
CEc.D1(Wl,P2,V2);
- if (V1.IsParallel(V2,ta)) {
- if (FaceTangency(Ec,Ec,VStart)) {
+ Standard_Boolean IsFaceTangency = FaceTangency(Ec,Ec,VStart);
+ if (V1.IsParallel(V2,ta) ||
+ IsFaceTangency)
+ {
+ if (IsFaceTangency) {
CurSt = ChFiDS_Closed;
}
else {
Handle(ChFiDS_Spine) Spine = Stripe->Spine();
if (Spine->IsTangencyExtremity((Sens == 1))) return; //No extension on queue
Standard_Real dU = Spine->LastParameter(Spine->NbEdges());
- if (Sens == 1){
- Spine->SetFirstParameter(-dU*Coeff);
- Spine->SetFirstTgt(0.);
+ if (Sens == 1){
+ if (!(Spine->GetTypeOfConcavity() == ChFiDS_Convex &&
+ Spine->FirstStatus() == ChFiDS_OnSame))
+ {
+ Spine->SetFirstParameter(-dU*Coeff);
+ Spine->SetFirstTgt(0.);
+ }
}
else{
- Spine->SetLastParameter(dU*(1.+Coeff));
- Spine->SetLastTgt(dU);
+ if (!(Spine->GetTypeOfConcavity() == ChFiDS_Convex &&
+ Spine->LastStatus() == ChFiDS_OnSame))
+ {
+ Spine->SetLastParameter(dU*(1.+Coeff));
+ Spine->SetLastTgt(dU);
+ }
}
check.Append(Stripe);
}
#include <ChFiDS_ErrorStatus.hxx>
#include <Standard_Transient.hxx>
#include <GeomAbs_CurveType.hxx>
+#include <ChFiDS_TypeOfConcavity.hxx>
class TopoDS_Edge;
class ChFiDS_HElSpine;
class gp_Lin;
ChFiDS_State Status (const Standard_Boolean IsFirst) const;
+ //! returns the type of concavity in the connection
+ ChFiDS_TypeOfConcavity GetTypeOfConcavity() const;
+
void SetStatus (const ChFiDS_State S, const Standard_Boolean IsFirst);
+ //! sets the type of concavity in the connection
+ void SetTypeOfConcavity (const ChFiDS_TypeOfConcavity theType);
+
//! returns if the set of edges starts (or end) on
//! Tangency point.
Standard_Boolean IsTangencyExtremity (const Standard_Boolean IsFirst) const;
BRepAdaptor_Curve myCurve;
Standard_Integer indexofcurve;
+ ChFiDS_TypeOfConcavity myTypeOfConcavity;
ChFiDS_State firstState;
ChFiDS_State lastState;
TopTools_SequenceOfShape spine;
#include <TopoDS.hxx>
+//=======================================================================
+//function : SetTypeOfConcavity
+//purpose :
+//=======================================================================
+
+inline void ChFiDS_Spine::SetTypeOfConcavity(const ChFiDS_TypeOfConcavity theType)
+{
+ myTypeOfConcavity = theType;
+}
+
//=======================================================================
//function : SetFirstStatus
//purpose :
{
lastState = S;
}
+
+//=======================================================================
+//function : GetTypeOfConcavity
+//purpose :
+//=======================================================================
+
+inline ChFiDS_TypeOfConcavity ChFiDS_Spine::GetTypeOfConcavity()const
+{
+ return myTypeOfConcavity;
+}
+
//=======================================================================
//function : FirstStatus
//purpose :
--- /dev/null
+// Created on: 1995-10-12
+// Created by: Bruno DUMORTIER
+// 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 _ChFiDS_TypeOfConcavity_HeaderFile
+#define _ChFiDS_TypeOfConcavity_HeaderFile
+
+
+enum ChFiDS_TypeOfConcavity
+{
+ChFiDS_Concave,
+ChFiDS_Convex,
+ChFiDS_Tangential,
+ChFiDS_FreeBound,
+ChFiDS_Other
+};
+
+#endif // _ChFiDS_TypeOfConcavity_HeaderFile
ChFiDS_SurfData.cxx
ChFiDS_SurfData.hxx
ChFiDS_SurfData.lxx
+ChFiDS_TypeOfConcavity.hxx
\ No newline at end of file
--- /dev/null
+puts "=================================================================="
+puts "OCC30940: BRepFilletAPI_MakeFillet algorithm fails on closed shell"
+puts "=================================================================="
+puts ""
+
+brestore [locate_data_file bug30940_compfaces.brep] b
+
+sewing a 0.0001 b
+explode a e
+
+blend result a 0.1 a_1 0.1 a_2 0.1 a_3 0.1 a_4 0.1 a_5 0.1 a_6 0.1 a_7 0.1 a_8 0.1 a_9 0.1 a_10 0.1 a_11 0.1 a_12
+
+checkshape result
+
+checknbshapes result -shell 1 -face 26 -wire 26 -edge 56 -vertex 30
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 0.001} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 276.831
--- /dev/null
+puts "=================================================================="
+puts "OCC30940: BRepFilletAPI_MakeFillet algorithm fails on closed shell"
+puts "=================================================================="
+puts ""
+
+beziercurve q 4 0 0 0 10 0 0 0 10 0 0 0 0
+mkedge q q
+wire q q
+mkplane q q
+prism q q 0 0 10
+explode q e
+
+blend result q 0.5 q_3
+
+checkshape result
+
+checknbshapes result -face 4 -edge 5 -vertex 3
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 1.e-4} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 149.268 -deps 1.e-5
--- /dev/null
+puts "=================================================================="
+puts "OCC30940: BRepFilletAPI_MakeFillet algorithm fails on closed shell"
+puts "=================================================================="
+puts ""
+
+beziercurve q 4 0 0 0 10 0 0 0 10 0 0 0 0
+mkedge q q
+wire q q
+mkplane q q
+prism q q 0 0 10
+explode q e
+
+blend result q 0.5 q_1
+
+checkshape result
+
+checknbshapes result -face 4 -edge 6 -vertex 4
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 1.01e-7} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 149.398 -deps 1.e-5
--- /dev/null
+puts "=================================================================="
+puts "OCC30940: BRepFilletAPI_MakeFillet algorithm fails on closed shell"
+puts "=================================================================="
+puts ""
+
+beziercurve q 4 0 0 0 10 0 0 0 10 0 0 0 0
+mkedge q q
+wire q q
+mkplane q q
+prism q q 0 0 10
+explode q e
+
+blend result q 0.5 q_1 0.5 q_2 0.5 q_3
+
+checkshape result
+
+checknbshapes result -face 8 -edge 14 -vertex 6
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 1.e-4} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 147.953 -deps 1.e-5
--- /dev/null
+puts "=================================================================="
+puts "OCC30940: BRepFilletAPI_MakeFillet algorithm fails on closed shell"
+puts "=================================================================="
+puts ""
+
+beziercurve q 5 0 0 0 0 -10 0 50 50 0 -10 0 0 0 0 0
+mkedge q q
+wire q q
+mkplane q q
+prism q q 0 0 10
+explode q e
+
+blend result q 0.1 q_3
+
+checkshape result
+
+checknbshapes result -face 4 -edge 5 -vertex 3
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 1.e-4} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 1028.46 -deps 1.e-5
--- /dev/null
+puts "=================================================================="
+puts "OCC30940: BRepFilletAPI_MakeFillet algorithm fails on closed shell"
+puts "=================================================================="
+puts ""
+
+beziercurve q 5 0 0 0 0 -10 0 50 50 0 -10 0 0 0 0 0
+mkedge q q
+wire q q
+mkplane q q
+prism q q 0 0 10
+explode q e
+
+blend result q 0.1 q_1 0.1 q_2 0.1 q_3
+
+checkshape result
+
+checknbshapes result -face 8 -edge 14 -vertex 8
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 1.e-4} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 1028.37 -deps 1.e-5
--- /dev/null
+puts "========================================================================"
+puts "OCC31030: BRepFilletAPI_MakeFillet algorithm fails on almost smooth edge"
+puts "========================================================================"
+puts ""
+
+brestore [locate_data_file bug31030_compfaces.brep] b
+
+sewing a 0.0001 b
+explode a e
+
+blend result a 0.1 a_3
+
+checkshape result
+
+checknbshapes result -shell 1 -face 4 -wire 4 -edge 5 -vertex 3
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 0.0003} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 1850.13