return 0;
}
+#include <BRepAlgo_NormalProjection.hxx>
+static Standard_Integer OCC24012 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
+{
+ if (argc != 3) {
+ di << "Usage : " << argv[0] << " should be 2 arguments (face and edge)";
+ return 1;
+ }
+
+ Handle(AIS_InteractiveContext) myAISContext = ViewerTest::GetAISContext();
+ if(myAISContext.IsNull()) {
+ di << "use 'vinit' command before " << argv[0] << "\n";
+ return 1;
+ }
+
+ TopoDS_Face m_Face1 = TopoDS::Face(DBRep::Get(argv[1]));
+ TopoDS_Edge m_Edge = TopoDS::Edge(DBRep::Get(argv[2]));
+
+ BRepAlgo_NormalProjection anormpro(m_Face1);
+ anormpro.Add(m_Edge);
+ anormpro.SetDefaultParams();
+
+ //anormpro.Compute3d();
+ //anormpro.SetLimit();
+
+ anormpro.Build();
+
+ if (anormpro.IsDone())
+ {
+ TopoDS_Shape rshape = anormpro.Projection();
+ Handle(AIS_InteractiveObject) myShape = new AIS_Shape (rshape);
+ myAISContext->SetColor(myShape, Quantity_Color(Quantity_NOC_YELLOW));
+ myAISContext->Display(myShape, Standard_True);
+ }
+
+ return 0;
+}
+
#include <Extrema_FuncExtPS.hxx>
#include <math_FunctionSetRoot.hxx>
#include <math_Vector.hxx>
theCommands.Add ("OCC24271", "Boolean operations on NCollection_Map", __FILE__, OCC24271, group);
theCommands.Add ("OCC24370", "OCC24370 edge pcurve surface prec", __FILE__, OCC24370, group);
theCommands.Add ("OCC24533", "OCC24533", __FILE__, OCC24533, group);
+ theCommands.Add ("OCC24012", "OCC24012 face edge", __FILE__, OCC24012, group);
return;
}
--- /dev/null
+puts "============"
+puts "OCC24012"
+puts "============"
+puts ""
+############################################
+# problem with BRepAlgo_NormalProjection
+############################################
+
+pload XDE
+pload QAcommands
+
+igesread [locate_data_file bug24012_face.igs] face *
+igesread [locate_data_file bug24012_line.igs] edge *
+
+vinit
+OCC24012 face edge
+vsetdispmode 0
+vdisplay face
+vdisplay edge
+vfit
+
+
+set scale 71.101493567712652
+set center_X 8.280398902360842
+set center_Y 7.1615404015522026
+set proj_X -0.14605970947882216
+set proj_Y -0.18639384905183365
+set proj_Z 0.97155745805516014
+set up_X -0.587582742029223
+set up_Y 0.80643668322534767
+set up_Z 0.066380699137021923
+set at_X 3.9226062794202492
+set at_Y -3.6740070074451168
+set at_Z 6.1530005464201167
+
+vviewparams ${scale} ${center_X} ${center_Y} \
+${proj_X} ${proj_Y} ${proj_Z} \
+${up_X} ${up_Y} ${up_Z} \
+${at_X} ${at_Y} ${at_Z}
+
+set only_screen 1