mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0024973: Incorrect PCurve construction
class: BOPTools_AlgoTools2D method: void BOPTools_AlgoTools2D::MakePCurveOnFace (const TopoDS_Face& aF, const Handle(Geom_Curve)& aC3D, const Standard_Real aFirst, const Standard_Real aLast, Handle(Geom2d_Curve)& aC2D, Standard_Real& TolReached2d) has been modified to provide the conformity with the location of the surface Test case for issue CR24973
This commit is contained in:
parent
36f4947b8d
commit
f284355851
@ -589,14 +589,16 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
|
||||
{
|
||||
Standard_Real aTolR;
|
||||
Handle(Geom2d_Curve) aC2DA;
|
||||
|
||||
BRepAdaptor_Surface aBAS(aF, Standard_False);
|
||||
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
|
||||
Handle(GeomAdaptor_HCurve) aBAHC = new
|
||||
GeomAdaptor_HCurve(aC3D, aFirst, aLast);
|
||||
//
|
||||
Handle(Geom_Surface) aS=BRep_Tool::Surface(aF);
|
||||
GeomAdaptor_Surface aGAS(aS);
|
||||
Handle(GeomAdaptor_HSurface) aBAHS=
|
||||
new GeomAdaptor_HSurface(aGAS);
|
||||
Handle(GeomAdaptor_HCurve) aBAHC =
|
||||
new GeomAdaptor_HCurve(aC3D, aFirst, aLast);
|
||||
|
||||
//when the type of surface is GeomAbs_SurfaceOfRevolution
|
||||
if (aBAS.GetType() == GeomAbs_SurfaceOfRevolution) {
|
||||
if (aGAS.GetType() == GeomAbs_SurfaceOfRevolution) {
|
||||
Standard_Real aTR = 1.e-7;
|
||||
ProjLib_ProjectedCurve aProj1(aBAHS, aBAHC, aTR);
|
||||
BOPTools_AlgoTools2D::MakePCurveOfType(aProj1, aC2D);
|
||||
|
26
tests/bugs/modalg_5/bug24973
Executable file
26
tests/bugs/modalg_5/bug24973
Executable file
@ -0,0 +1,26 @@
|
||||
puts "============"
|
||||
puts "OCC24973"
|
||||
puts "============"
|
||||
puts ""
|
||||
######################################################
|
||||
# Incorrect PCurve construction
|
||||
######################################################
|
||||
|
||||
restore [locate_data_file bug24973_Face.brep] f
|
||||
|
||||
pcurve f
|
||||
explode f e
|
||||
|
||||
tcopy f_9 e
|
||||
bhaspc e f do
|
||||
mk2dcurve c e f
|
||||
to3d c3d c
|
||||
mkedge e c3d
|
||||
|
||||
set info [bopargcheck e #F]
|
||||
|
||||
if { [regexp "to be valid for BOP" ${info}] == 1 } {
|
||||
puts "OK : Created curve is correct"
|
||||
} else {
|
||||
puts "Error : Created curve is not correct"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user