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

Compare commits

...

2 Commits

Author SHA1 Message Date
mgerus
6acb227333 33150 fix(?) for wrong translate of 2dCurve 2022-09-30 10:58:48 +03:00
mgerus
5d0249c145 26920 fix exception call in fillet(wrong choice of face) 2022-09-30 10:57:43 +03:00
3 changed files with 25 additions and 3 deletions

View File

@@ -3238,7 +3238,9 @@ Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_Surface)& S1,
Pc2->Value(Uf).Coord(x,y); Pc2->Value(Uf).Coord(x,y);
x = Pardeb(3) - x; x = Pardeb(3) - x;
y = Pardeb(4) - y; y = Pardeb(4) - y;
if(Abs(x) > tol2d || Abs(y) > tol2d) Pc2->Translate(gp_Vec2d(x,y));
if(Abs(x) > tol2d || Abs(y) > tol2d)
Pc2->Translate(gp_Vec2d(-6.2831853, 0));
tolreached = ChFi3d_EvalTolReached(S1,Pc1,S2,Pc2,C3d); tolreached = ChFi3d_EvalTolReached(S1,Pc1,S2,Pc2,C3d);
return Standard_True; return Standard_True;
} }

View File

@@ -2708,7 +2708,14 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
TopoDS_Edge aLocalEdge = edgesau; TopoDS_Edge aLocalEdge = edgesau;
if (edgesau.Orientation() != orient) if (edgesau.Orientation() != orient)
aLocalEdge.Reverse(); aLocalEdge.Reverse();
C2dint1 = BRep_Tool::CurveOnSurface(aLocalEdge,Face[0],ubid,vbid); C2dint1 = BRep_Tool::CurveOnSurface(aLocalEdge, Face[0], ubid, vbid);
if (C2dint1.IsNull())
{
//std::swap(Face[0], facesau);
C2dint1 = BRep_Tool::CurveOnSurface(aLocalEdge, facesau, ubid, vbid);
}
} }
} }
else { else {
@@ -2718,7 +2725,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
//// for periodic 3d curves //// //// for periodic 3d curves ////
if (cad.IsPeriodic()) if (cad.IsPeriodic())
{ {
gp_Pnt2d P2d = BRep_Tool::Parameters( Vtx, Face[0] ); gp_Pnt2d P2d = BRep_Tool::Parameters(Vtx, facesau);
Geom2dAPI_ProjectPointOnCurve Projector( P2d, C2dint1 ); Geom2dAPI_ProjectPointOnCurve Projector( P2d, C2dint1 );
par = Projector.LowerDistanceParameter(); par = Projector.LowerDistanceParameter();
Standard_Real shift = par-ParVtx; Standard_Real shift = par-ParVtx;

View File

@@ -0,0 +1,13 @@
puts "========"
puts "0026920: BRepBuidlerAPI_MakeFillet crash 2"
puts "========"
restore C:/WORK/opencascade/bugs/CR26920/bug26920.brep b1
explode b1 e
fillet result b1 0.25 b1_15
checkprops result -s 1653.78
checkshape result
checknbshapes result -vertex 20 -edge 31 -wire 13 -face 13 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 80
checkview -display result -2d -path ${imagedir}/${test_image}.png