{
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);
--- /dev/null
+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"
+}