1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
gelin
b391a95e36 0032818: Modeling Algorithms - Result of sweep operation is invalid
BRepFill_TrimShellCorner.cxx - setting correct orientation for NewEdge
tests/pipe/bugs/bug32818 - new test case added
2022-11-17 09:45:55 +03:00
smoskvin
eeba62cbd3 Increment OCCT version up to 7.8.0dev 2022-11-12 01:20:10 +03:00
3 changed files with 44 additions and 5 deletions

View File

@@ -56,6 +56,7 @@
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <BRepExtrema_ExtCC.hxx>
#include <ShapeFix_Edge.hxx>
static TopoDS_Edge FindEdgeCloseToBisectorPlane(const TopoDS_Vertex& theVertex,
TopoDS_Compound& theComp,
@@ -534,6 +535,26 @@ BRepFill_TrimShellCorner::MakeFacesNonSec(const Standard_Integer
if(bHasNewEdge) {
aNewEdge.Orientation(TopAbs_FORWARD);
// Refer to BrepFill_Sweep.cxx BuildEdge Construct an edge via an iso
gp_Pnt P1, P2;
Standard_Real p11, p12, p21, p22;
P1 = BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(aNewEdge)));
P2 = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(aNewEdge)));
TopoDS_Edge aERef = TopoDS::Edge(fit == 1 ? aE1 : aE2);
p11 = P1.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(aERef)));
p22 = P2.Distance(BRep_Tool::Pnt(TopExp::LastVertex(aERef)));
p12 = P1.Distance(BRep_Tool::Pnt(TopExp::LastVertex(aERef)));
p21 = P2.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(aERef)));
if (p11 > p12 && p22 > p21) {
aNewEdge.Reverse();
}
// for nonPlane surface, we should add pCurve
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge();
sfe->FixAddPCurve(aNewEdge, TopoDS::Face(aFace), Standard_False);
}
TopTools_ListOfShape aOrderedList;

View File

@@ -34,7 +34,7 @@
// Primary definitions
#define OCC_VERSION_MAJOR 7
#define OCC_VERSION_MINOR 7
#define OCC_VERSION_MINOR 8
#define OCC_VERSION_MAINTENANCE 0
//! This macro must be commented in official release, and set to non-empty
@@ -42,12 +42,12 @@
//! - "dev" for development version between releases
//! - "beta..." or "rc..." for beta releases or release candidates
//! - "project..." for version containing project-specific fixes
//#define OCC_VERSION_DEVELOPMENT "dev"
#define OCC_VERSION_DEVELOPMENT "dev"
// Derived (manually): version as real and string (major.minor)
#define OCC_VERSION 7.7
#define OCC_VERSION_STRING "7.7"
#define OCC_VERSION_COMPLETE "7.7.0"
#define OCC_VERSION 7.8
#define OCC_VERSION_STRING "7.8"
#define OCC_VERSION_COMPLETE "7.8.0"
//! Derived: extended version as string ("major.minor.maintenance.dev")
#ifdef OCC_VERSION_DEVELOPMENT

18
tests/pipe/bugs/bug32818 Normal file
View File

@@ -0,0 +1,18 @@
puts "========"
puts "0032818: Modeling Algorithms - Result of sweep operation is invalid"
puts "========"
puts ""
restore [locate_data_file bug32818.brep]
explode bug32818
renamevar bug32818_1 p
renamevar bug32818_2 pr
mksweep p
setsweep -CF
addsweep pr
buildsweep result -R -S
checkshape result
checknbshapes result -vertex 80 -edge 160 -wire 80 -face 80 -shell 1 -solid 1