1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0028677: Avoid change of wire orientation in BRepLib_MakeFace if the wire is open

Method BRepLib_MakeFace::CheckInside() is not called for open wire. So, if the input wire is open its orientation is not changed in the result face.
This commit is contained in:
nbv
2017-04-24 13:48:28 +03:00
committed by bugmaster
parent 752f9d7201
commit b608f6a564
16 changed files with 50 additions and 21 deletions

View File

@@ -44,9 +44,18 @@ class Bisector_Bisec;
class BRepFill_TrimEdgeTool;
//! Constructs a Offset Wire to a spine (wire or face)
//! on the left of spine.
//! The Wire or the Face must be planar.
//! Constructs a Offset Wire to a spine (wire or face).
//! Offset direction will be to outer region in case of
//! positive offset value and to inner region in case of
//! negative offset value.
//! Inner/Outer region for open wire is defined by the
//! following rule: when we go along the wire (taking into
//! account of edges orientation) then outer region will be
//! on the right side, inner region will be on the left side.
//! In case of closed wire, inner region will always be
//! inside the wire (at that, edges orientation is not taken
//! into account).
//! The Wire or the Face must be planar and oriented correctly.
class BRepFill_OffsetWire
{
public:

View File

@@ -270,7 +270,8 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W,
//
BRepLib::SameParameter(myShape, tol, Standard_True);
//
CheckInside();
if (BRep_Tool::IsClosed(W))
CheckInside();
}
@@ -286,7 +287,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const gp_Pln& P,
Handle(Geom_Plane) Pl = new Geom_Plane(P);
Init(Pl, Standard_False, Precision::Confusion());
Add(W);
if (Inside) CheckInside();
if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
@@ -302,7 +303,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const gp_Cylinder& C,
Handle(Geom_CylindricalSurface) GC = new Geom_CylindricalSurface(C);
Init(GC, Standard_False, Precision::Confusion());
Add(W);
if (Inside) CheckInside();
if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
@@ -318,7 +319,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const gp_Cone& C,
Handle(Geom_ConicalSurface) GC = new Geom_ConicalSurface(C);
Init(GC, Standard_False, Precision::Confusion());
Add(W);
if (Inside) CheckInside();
if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
@@ -334,7 +335,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const gp_Sphere& S,
Handle(Geom_SphericalSurface) GS = new Geom_SphericalSurface(S);
Init(GS, Standard_False, Precision::Confusion());
Add(W);
if (Inside) CheckInside();
if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
@@ -350,7 +351,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const gp_Torus& T,
Handle(Geom_ToroidalSurface) GT = new Geom_ToroidalSurface(T);
Init(GT, Standard_False, Precision::Confusion());
Add(W);
if (Inside) CheckInside();
if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
@@ -365,7 +366,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const Handle(Geom_Surface)& S,
{
Init(S, Standard_False, Precision::Confusion());
Add(W);
if (Inside) CheckInside();
if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}