// Created on: 2000-10-31 // Created by: Vladislav ROMASHKO // Copyright (c) 2000-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #include #include #include #include #include #include #include #include #ifdef OCCT_DEBUG #include #include #endif enum BoolArguments { SOLID_SOLID, SOLID_SHELL, SOLID_WIRE, SHELL_SOLID, SHELL_SHELL, SHELL_WIRE, WIRE_SOLID, WIRE_SHELL, WIRE_WIRE, UNEXPECTED }; //======================================================================= //function : QANewBRepNaming_Intersection //purpose : //======================================================================= QANewBRepNaming_Intersection::QANewBRepNaming_Intersection() {} //======================================================================= //function : QANewBRepNaming_Intersection //purpose : //======================================================================= QANewBRepNaming_Intersection::QANewBRepNaming_Intersection(const TDF_Label& ResultLabel) :QANewBRepNaming_BooleanOperationFeat(ResultLabel) {} //======================================================================= //function : Load //purpose : //======================================================================= void QANewBRepNaming_Intersection::Load(BRepAlgoAPI_BooleanOperation& MS) const { TopoDS_Shape ResSh = MS.Shape(); if (ResSh.IsNull()) { #ifdef OCCT_DEBUG cout<<"QANewBRepNaming_Intersection::Load(): The result of the Intersection is null"< Vertex if(MS.HasGenerated()) { TNaming_Builder nBuilder (NewShapes()); QANewBRepNaming_Loader::LoadGeneratedShapes (MS, ObjSh, TopAbs_FACE, nBuilder); QANewBRepNaming_Loader::LoadGeneratedShapes (MS, ToolSh, TopAbs_FACE, nBuilder); QANewBRepNaming_Loader::LoadGeneratedShapes (MS, ObjSh, TopAbs_EDGE, nBuilder); QANewBRepNaming_Loader::LoadGeneratedShapes (MS, ToolSh, TopAbs_EDGE, nBuilder); } if(MS.HasDeleted()){ TNaming_Builder DelFBuilder(DeletedFaces()); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ObjSh, TopAbs_FACE, DelFBuilder); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ToolSh, TopAbs_FACE, DelFBuilder); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ObjSh, TopAbs_EDGE, DelFBuilder); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ToolSh, TopAbs_EDGE, DelFBuilder); if(anArg == SOLID_WIRE || anArg == SHELL_WIRE) { QANewBRepNaming_Loader::LoadDeletedShapes(MS, ToolSh, TopAbs_VERTEX, DelFBuilder); } else QANewBRepNaming_Loader::LoadDeletedShapes(MS, ObjSh, TopAbs_VERTEX, DelFBuilder); } } else if (anArg == WIRE_WIRE) { if(MS.HasGenerated()) { TNaming_Builder nBuilder (NewShapes()); QANewBRepNaming_Loader::LoadGeneratedShapes (MS, ObjSh, TopAbs_EDGE, nBuilder); QANewBRepNaming_Loader::LoadGeneratedShapes (MS, ToolSh, TopAbs_EDGE, nBuilder); } if(MS.HasDeleted()){ TNaming_Builder DelFBuilder(DeletedFaces()); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ObjSh, TopAbs_EDGE, DelFBuilder); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ToolSh, TopAbs_EDGE, DelFBuilder); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ToolSh, TopAbs_VERTEX, DelFBuilder); QANewBRepNaming_Loader::LoadDeletedShapes(MS, ObjSh, TopAbs_VERTEX, DelFBuilder); } } LoadDegenerated(MS); // Naming of the content: // if (ShapeType(ResSh) == TopAbs_VERTEX) LoadContent(MS); }