mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0027267: [Regression to 6.9.1] geom/boolean_operations_06/G3: Cut produces invalid shape
Calling IntPatch_WLineTool::ComputePurgedWLine() algorithm is forbidden if Walking-line is obtained from analytic line. Creation of test case for this issue.
This commit is contained in:
parent
12b86472db
commit
716037dd9c
@ -1204,6 +1204,9 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
if(aWL.IsNull())
|
||||
continue;
|
||||
|
||||
if(!aWL->IsPurgingAllowed())
|
||||
continue;
|
||||
|
||||
Handle(IntPatch_WLine) aRW = IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
|
||||
|
||||
if(aRW.IsNull())
|
||||
@ -1414,7 +1417,8 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
|
||||
}
|
||||
|
||||
IntPatch_ALineToWLine AToW(Quad1,Quad2,0.01,0.05,aNbPointsInALine);
|
||||
Handle(IntPatch_Line) wlin=AToW.MakeWLine((*((Handle(IntPatch_ALine) *)(&line))));
|
||||
Handle(IntPatch_WLine) wlin=AToW.MakeWLine((*((Handle(IntPatch_ALine) *)(&line))));
|
||||
wlin->EnablePurging(Standard_False);
|
||||
slin.Append(wlin);
|
||||
}
|
||||
else
|
||||
|
@ -41,7 +41,8 @@ IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
|
||||
const IntSurf_TypeTrans Trans1,
|
||||
const IntSurf_TypeTrans Trans2) :
|
||||
IntPatch_PointLine(Tang,Trans1,Trans2),fipt(Standard_False),lapt(Standard_False),
|
||||
hasArcOnS1(Standard_False),hasArcOnS2(Standard_False)
|
||||
hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
|
||||
myIsPurgerAllowed(Standard_True)
|
||||
{
|
||||
typ = IntPatch_Walking;
|
||||
curv = Line;
|
||||
@ -57,7 +58,8 @@ IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
|
||||
const IntSurf_Situation Situ1,
|
||||
const IntSurf_Situation Situ2) :
|
||||
IntPatch_PointLine(Tang,Situ1,Situ2),fipt(Standard_False),lapt(Standard_False),
|
||||
hasArcOnS1(Standard_False),hasArcOnS2(Standard_False)
|
||||
hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
|
||||
myIsPurgerAllowed(Standard_True)
|
||||
{
|
||||
typ = IntPatch_Walking;
|
||||
curv = Line;
|
||||
@ -71,7 +73,8 @@ IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
|
||||
IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
|
||||
const Standard_Boolean Tang) :
|
||||
IntPatch_PointLine(Tang),fipt(Standard_False),lapt(Standard_False),
|
||||
hasArcOnS1(Standard_False),hasArcOnS2(Standard_False)
|
||||
hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
|
||||
myIsPurgerAllowed(Standard_True)
|
||||
{
|
||||
typ = IntPatch_Walking;
|
||||
curv = Line;
|
||||
|
@ -164,7 +164,17 @@ public:
|
||||
//! Otherwise, prints list of 2d-points on the 2nd surface
|
||||
Standard_EXPORT void Dump(const Standard_Integer theMode) const;
|
||||
|
||||
//! Allows or forbides purging of existing WLine
|
||||
void EnablePurging(const Standard_Boolean theIsEnabled)
|
||||
{
|
||||
myIsPurgerAllowed = theIsEnabled;
|
||||
}
|
||||
|
||||
//! Returns TRUE if purging is allowed or forbiden for existing WLine
|
||||
Standard_Boolean IsPurgingAllowed()
|
||||
{
|
||||
return myIsPurgerAllowed;
|
||||
}
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(IntPatch_WLine,IntPatch_PointLine)
|
||||
@ -194,6 +204,7 @@ private:
|
||||
Handle(Adaptor2d_HCurve2d) theArcOnS1;
|
||||
Standard_Boolean hasArcOnS2;
|
||||
Handle(Adaptor2d_HCurve2d) theArcOnS2;
|
||||
Standard_Boolean myIsPurgerAllowed;
|
||||
|
||||
|
||||
};
|
||||
|
22
tests/bugs/modalg_6/bug27267
Normal file
22
tests/bugs/modalg_6/bug27267
Normal file
@ -0,0 +1,22 @@
|
||||
puts "================"
|
||||
puts "OCC27267"
|
||||
puts "================"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# [Regression to 6.9.1] geom/boolean_operations_06/G3: Cut produces invalid shape
|
||||
#######################################################################
|
||||
|
||||
restore [locate_data_file bug27267_cmpd.brep] a
|
||||
explode a
|
||||
|
||||
bcut result a_1 a_2
|
||||
checkshape result
|
||||
checknbshapes result -solid 1 -shell 1 -face 7
|
||||
checkprops result -s 0.00128248
|
||||
|
||||
smallview
|
||||
don a_2
|
||||
fit
|
||||
don result
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user