mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0028579: Get rid of the obsolete QANewModTopOpe_* and QANewBRepNaming_* algorithms
1. The packages *QANewModTopOpe*, *QANewBRepNaming* and *QANewDBRepNaming* have been removed as containing obsolete features. The corresponding QA commands (such as OCC252, OCC307 and OCC294) and test cases have also been removed. 2. The QA command buc60609 has been removed. The corresponding test case bugs/moddata_1/buc60609 has been rewritten using b2dclassify command.
This commit is contained in:
@@ -2030,9 +2030,6 @@ TopoDS_Shape OCC1077_boolbl(BRepAlgoAPI_BooleanOperation& aBoolenaOperation,cons
|
||||
|
||||
TopoDS_Shape ShapeCut = aBoolenaOperation.Shape();
|
||||
|
||||
//#ifdef OCC40
|
||||
// Handle(TopOpeBRepBuild_HBuilder) build = aBoolenaOperation.Builder();
|
||||
//#endif
|
||||
TopTools_ListIteratorOfListOfShape its;
|
||||
|
||||
TopoDS_Compound result;
|
||||
@@ -2047,11 +2044,7 @@ TopoDS_Shape OCC1077_boolbl(BRepAlgoAPI_BooleanOperation& aBoolenaOperation,cons
|
||||
BRepFilletAPI_MakeFillet fill(cutsol);
|
||||
fill.SetParams(ta, t3d, t2d, t3d, t2d, fl);
|
||||
fill.SetContinuity(blend_cont, tapp_angle);
|
||||
//#ifdef OCC40
|
||||
// its = build->Section();
|
||||
//#else //OCC40DEV
|
||||
its = aBoolenaOperation.SectionEdges();
|
||||
//#endif
|
||||
while (its.More())
|
||||
{
|
||||
TopoDS_Edge E = TopoDS::Edge(its.Value());
|
||||
|
@@ -58,20 +58,11 @@
|
||||
#include <OSD_Path.hxx>
|
||||
#include <Standard_ProgramError.hxx>
|
||||
|
||||
//#include <QAModTopOpe_Limitation.hxx>
|
||||
#include <QANewModTopOpe_Limitation.hxx>
|
||||
|
||||
//#include <QAModTopOpe_Glue.hxx>
|
||||
#include <QANewModTopOpe_Glue.hxx>
|
||||
|
||||
#include <ShapeFix_Wireframe.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
|
||||
//#include <QAModTopOpe_ReShaper.hxx>
|
||||
#include <QANewModTopOpe_ReShaper.hxx>
|
||||
|
||||
#include <ViewerTest_EventManager.hxx>
|
||||
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
@@ -512,76 +503,6 @@ static Standard_Integer OCC405 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
else return 1;
|
||||
}
|
||||
|
||||
static Standard_Integer OCC252 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
if(!(argc == 4 || argc == 5)) {
|
||||
di << "Usage : " << argv[0] << " result part tool [ModeOfLimitation=0/1/2]\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape s1 = DBRep::Get(argv[2]);
|
||||
TopoDS_Shape s2 = DBRep::Get(argv[3]);
|
||||
if (s1.IsNull() || s2.IsNull()) return 1;
|
||||
|
||||
//QAModTopOpe_ModeOfLimitation ModeOfLimitation = QAModTopOpe_Forward;
|
||||
QANewModTopOpe_ModeOfLimitation ModeOfLimitation = QANewModTopOpe_Forward;
|
||||
if(argc==5) {
|
||||
Standard_Integer ModeOfLimitationInteger = Draw::Atoi(argv[4]);
|
||||
if(!(ModeOfLimitationInteger == 0 || ModeOfLimitationInteger == 1 || ModeOfLimitationInteger == 2)) {
|
||||
di << "Usage : " << argv[0] << " result part tool [ModeOfLimitation=0/1/2]\n";
|
||||
return 1;
|
||||
}
|
||||
//if (ModeOfLimitationInteger == 1) ModeOfLimitation = QAModTopOpe_Reversed;
|
||||
//if (ModeOfLimitationInteger == 2) ModeOfLimitation = QAModTopOpe_BothParts;
|
||||
if (ModeOfLimitationInteger == 1) ModeOfLimitation = QANewModTopOpe_Reversed;
|
||||
if (ModeOfLimitationInteger == 2) ModeOfLimitation = QANewModTopOpe_BothParts;
|
||||
}
|
||||
|
||||
//TopoDS_Shape res = QAModTopOpe_Limitation(s1,s2,ModeOfLimitation);
|
||||
TopoDS_Shape res = QANewModTopOpe_Limitation(s1,s2,ModeOfLimitation);
|
||||
if (res.IsNull()) {
|
||||
di << "Error : result is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
DBRep::Set(argv[1],res);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Standard_Integer OCC307 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
if(!(argc == 4 || argc == 5)) {
|
||||
di << "Usage : " << argv[0] << " result part tool [AllowCutting=0/1]\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape s1 = DBRep::Get(argv[2]);
|
||||
TopoDS_Shape s2 = DBRep::Get(argv[3]);
|
||||
if (s1.IsNull() || s2.IsNull()) return 1;
|
||||
|
||||
Standard_Boolean AllowCutting = Standard_False;
|
||||
if(argc==5) {
|
||||
Standard_Integer AllowCuttingInteger = Draw::Atoi(argv[4]);
|
||||
if(!( AllowCuttingInteger == 0 || AllowCuttingInteger == 1)) {
|
||||
di << "Usage : " << argv[0] << " result part tool [AllowCutting=0/1]\n";
|
||||
return 1;
|
||||
}
|
||||
if (AllowCuttingInteger == 1) AllowCutting = Standard_True;
|
||||
}
|
||||
|
||||
//TopoDS_Shape res = QAModTopOpe_Glue(s1,s2,AllowCutting);
|
||||
TopoDS_Shape res = QANewModTopOpe_Glue(s1,s2,AllowCutting);
|
||||
if (res.IsNull()) {
|
||||
di << "Error : result is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
DBRep::Set(argv[1],res);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Standard_Integer OCC395 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
if(argc != 4) {
|
||||
@@ -713,30 +634,6 @@ static Standard_Integer OCC301 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Standard_Integer OCC294 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
if(argc < 4) {
|
||||
di << "Usage : " << argv[0] << " shape_result shape edge\n";
|
||||
return 1;
|
||||
}
|
||||
TopoDS_Shape Sh1 = DBRep::Get(argv[2]);
|
||||
TopoDS_Shape Sh2 = DBRep::Get(argv[3]);
|
||||
if(Sh1.IsNull() || Sh2.IsNull()) return 1;
|
||||
if(Sh2.ShapeType() != TopAbs_EDGE) return 1;
|
||||
|
||||
//QAModTopOpe_ReShaper ReShaper(Sh1);
|
||||
QANewModTopOpe_ReShaper ReShaper(Sh1);
|
||||
ReShaper.Remove(Sh2);
|
||||
const TopoDS_Shape& ResultShape = ReShaper.GetResult();
|
||||
if(ResultShape.IsNull()) {
|
||||
di << "Faulty " << argv[0] << " : " << argv[1] << " - shape_result is null\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
DBRep::Set ( argv[1], ResultShape);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Standard_Integer OCC60 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||
{
|
||||
Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
|
||||
@@ -858,12 +755,9 @@ void QABugs::Commands_16(Draw_Interpretor& theCommands) {
|
||||
theCommands.Add ("OCC49", "OCC49 name", __FILE__, OCC49, group);
|
||||
theCommands.Add ("OCC132", "OCC132 DependentName", __FILE__, OCC132, group);
|
||||
theCommands.Add ("OCC405", "OCC405 edge_result edge1 edge2; merge two edges", __FILE__, OCC405, group);
|
||||
theCommands.Add ("OCC252", "OCC252 result part tool [ModeOfLimitation=0/1/2]", __FILE__, OCC252, group);
|
||||
theCommands.Add ("OCC307", "OCC307 result part tool [AllowCutting=0/1]", __FILE__, OCC307, group);
|
||||
theCommands.Add ("OCC395", "OCC395 edge_result edge1 edge2", __FILE__, OCC395, group);
|
||||
theCommands.Add ("OCC394", "OCC394 edge_result edge [tol [mode [tolang]]]", __FILE__, OCC394, group);
|
||||
theCommands.Add ("OCC301", "OCC301 ArcRadius ArrowSize", __FILE__, OCC301, group);
|
||||
theCommands.Add ("OCC294", "OCC294 shape_result shape edge", __FILE__, OCC294, group);
|
||||
theCommands.Add ("OCC60", "OCC60 xmin ymin xmax ymax; selection window", __FILE__, OCC60, group);
|
||||
theCommands.Add ("OCC70", "OCC70 x1 y1 x2 y2 x3 y3 [x y ...]; polygon of selection", __FILE__, OCC70, group);
|
||||
theCommands.Add ("OCC261", "OCC261 Doc", __FILE__, OCC261, group);
|
||||
|
@@ -126,112 +126,6 @@ static int BUC60614(Draw_Interpretor& di, Standard_Integer argc, const char ** a
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include<BRep_Builder.hxx>
|
||||
#include<BRepTools_ShapeSet.hxx>
|
||||
#include<BRepTools.hxx>
|
||||
#include<BRepAdaptor_HSurface.hxx>
|
||||
#include<TopOpeBRep_PointClassifier.hxx>
|
||||
#include<Precision.hxx>
|
||||
#ifdef _MSC_VER
|
||||
#include<stdio.h>
|
||||
#endif
|
||||
|
||||
static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
|
||||
gp_Pnt2d uvSurf;
|
||||
TopAbs_State state;
|
||||
|
||||
if (argc == 3) {
|
||||
// BUC60609 shape name
|
||||
} else if ( argc == 5 ) {
|
||||
// BUC60609 shape name U V
|
||||
} else {
|
||||
di << "Usage : "<< argv[0] << " shape name [U V]\n";
|
||||
return(-1);
|
||||
}
|
||||
|
||||
TCollection_AsciiString aFilePath(argv[1]);
|
||||
|
||||
filebuf fic;
|
||||
istream in(&fic);
|
||||
if (!fic.open(aFilePath.ToCString(),ios::in)) {
|
||||
di << "Cannot open file for reading : " << aFilePath << "\n";
|
||||
return(-1);
|
||||
}
|
||||
|
||||
TopoDS_Shape theShape;
|
||||
char typ[255];
|
||||
in >> typ;
|
||||
if (!in.fail()) {
|
||||
if( !strcmp(typ, "DBRep_DrawableShape") ){
|
||||
BRep_Builder B;
|
||||
BRepTools_ShapeSet S(B);
|
||||
S.Read(in);
|
||||
S.Read(theShape,in);
|
||||
}else{
|
||||
di << "Wrong entity type in " << aFilePath << "\n";
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
const TopoDS_Face &face = TopoDS::Face (theShape);
|
||||
|
||||
if(argc > 2){
|
||||
DBRep::Set(argv[2],face);
|
||||
}
|
||||
|
||||
Standard_Real faceUMin,faceUMax,faceVMin,faceVMax;
|
||||
|
||||
BRepTools::UVBounds (face, faceUMin,faceUMax,faceVMin,faceVMax);
|
||||
|
||||
di << "The bounds of the trimmed face:\n";
|
||||
di << faceUMin << " <= U <= " << faceUMax << "\n";
|
||||
di << faceVMin << " <= V <= " << faceVMax << "\n";
|
||||
|
||||
Handle(BRepAdaptor_HSurface) hsurfa = new BRepAdaptor_HSurface(face);
|
||||
|
||||
TopOpeBRep_PointClassifier PClass;
|
||||
|
||||
di << "Now test the point classifier by inputting U,V values\n";
|
||||
di << "inside or outside the bounds displayed above\n";
|
||||
di << "Type stop to exit\n";
|
||||
|
||||
// Please register this:
|
||||
// ***********************************************
|
||||
// Note also that for periodic surfaces such as nimpod_1.topo,
|
||||
// the U/V values may be +- 2pi compared to the actual face bounds
|
||||
// (because U,V is probably coming from a Geom package routine).
|
||||
// Hence IT WOULD BE USEFUL IF TopOpeBRep_PointClassifier COULD
|
||||
// COPE WITH PERIODIC SURFACES, i.e. U,V +-Period giving same result.
|
||||
// *************************************************
|
||||
|
||||
if (argc == 3) {
|
||||
uvSurf = gp_Pnt2d(0.14,5.1);
|
||||
state = PClass.Classify(face,uvSurf,Precision::PConfusion());
|
||||
if(state == TopAbs_IN || state == TopAbs_ON){
|
||||
di << "U=" << 0.14 << " V=" << 5.1 << " classified INSIDE\n";
|
||||
}else{
|
||||
di << "U=" << 0.14 << " V=" << 5.1 << " classified OUTSIDE\n";
|
||||
}
|
||||
|
||||
uvSurf = gp_Pnt2d(1.28,5.1);
|
||||
state = PClass.Classify(face,uvSurf,Precision::PConfusion());
|
||||
if(state == TopAbs_IN || state == TopAbs_ON){
|
||||
di << "U=" << 1.28 << " V=" << 5.1 << " classified INSIDE\n";
|
||||
}else{
|
||||
di << "U=" << 1.28 << " V=" << 5.1 << " classified OUTSIDE\n";
|
||||
}
|
||||
} else {
|
||||
uvSurf = gp_Pnt2d(Draw::Atof(argv[3]),Draw::Atof(argv[4]));
|
||||
state = PClass.Classify(face,uvSurf,Precision::PConfusion());
|
||||
if(state == TopAbs_IN || state == TopAbs_ON){
|
||||
di << "U=" << Draw::Atof(argv[3]) << " V=" << Draw::Atof(argv[4]) << " classified INSIDE\n";
|
||||
}else{
|
||||
di << "U=" << Draw::Atof(argv[3]) << " V=" << Draw::Atof(argv[4]) << " classified OUTSIDE\n";
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include<BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include<TCollection_ExtendedString.hxx>
|
||||
#include<AIS_LengthDimension.hxx>
|
||||
@@ -274,6 +168,7 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
}
|
||||
|
||||
#include<TopoDS_Wire.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
|
||||
static Standard_Integer BUC60652(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
|
||||
{
|
||||
@@ -434,7 +329,8 @@ return 0;
|
||||
#include <Bnd_BoundSortBox.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <Bnd_HArray1OfBox.hxx>
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
static Standard_Integer BUC60729 (Draw_Interpretor& /*di*/,Standard_Integer /*argc*/, const char ** /*argv*/ )
|
||||
{
|
||||
Bnd_Box aMainBox;
|
||||
@@ -1552,7 +1448,6 @@ void QABugs::Commands_3(Draw_Interpretor& theCommands) {
|
||||
theCommands.Add("BUC60623","BUC60623 result Shape1 Shape2",__FILE__,BUC60623,group);
|
||||
theCommands.Add("BUC60569","BUC60569 shape",__FILE__,BUC60569,group);
|
||||
theCommands.Add("BUC60614","BUC60614 shape",__FILE__,BUC60614,group);
|
||||
theCommands.Add("BUC60609","BUC60609 shape name [U V]",__FILE__,BUC60609,group);
|
||||
theCommands.Add("BUC60632","BUC60632 mode length",__FILE__,BUC60632,group);
|
||||
theCommands.Add("BUC60652","BUC60652 face",__FILE__,BUC60652,group);
|
||||
theCommands.Add("BUC60574","BUC60574 ",__FILE__,BUC60574,group);
|
||||
|
Reference in New Issue
Block a user