From cf5195b88c7889b493f9aab69524a7be23450108 Mon Sep 17 00:00:00 2001 From: omy Date: Fri, 22 Feb 2013 13:56:00 +0400 Subject: [PATCH] 0022323: MakeThickSolid raises Construction exception on cylinder. Removed BRepTest/BRepTest_ShellCommands.cxx from OCCT. Added test case for bug 22323. It is placed in bugs/modalg. --- src/BRepTest/BRepTest.cdl | 2 - src/BRepTest/BRepTest.cxx | 1 - src/BRepTest/BRepTest_ShellCommands.cxx | 200 ------------------------ src/BRepTest/FILES | 1 - tests/bugs/modalg/bug22323 | 15 ++ 5 files changed, 15 insertions(+), 204 deletions(-) delete mode 100755 src/BRepTest/BRepTest_ShellCommands.cxx create mode 100644 tests/bugs/modalg/bug22323 diff --git a/src/BRepTest/BRepTest.cdl b/src/BRepTest/BRepTest.cdl index 53cb691a4b..bee5cd3ac0 100755 --- a/src/BRepTest/BRepTest.cdl +++ b/src/BRepTest/BRepTest.cdl @@ -103,8 +103,6 @@ is ProjectionCommands(DI : in out Interpretor from Draw); ---Purpose: Defines the commands to project a wire on a shape. -- - ShellCommands(DI : in out Interpretor from Draw); - ---Purpose: Defines the commands to prepare shell commands. end BRepTest; diff --git a/src/BRepTest/BRepTest.cxx b/src/BRepTest/BRepTest.cxx index 3e5ab59d8e..64bb3429cb 100755 --- a/src/BRepTest/BRepTest.cxx +++ b/src/BRepTest/BRepTest.cxx @@ -56,7 +56,6 @@ void BRepTest::AllCommands(Draw_Interpretor& theCommands) BRepTest::CheckCommands(theCommands); // BRepTest::PlacementCommands(theCommands) ; BRepTest::ProjectionCommands(theCommands) ; - BRepTest::ShellCommands(theCommands); // define the TCL variable Draw_TOPOLOGY const char* com = "set Draw_TOPOLOGY 1"; diff --git a/src/BRepTest/BRepTest_ShellCommands.cxx b/src/BRepTest/BRepTest_ShellCommands.cxx deleted file mode 100755 index 2cde4c97a6..0000000000 --- a/src/BRepTest/BRepTest_ShellCommands.cxx +++ /dev/null @@ -1,200 +0,0 @@ -// Created on: 1998-12-21 -// Created by: Michael KAZAKOV -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// -static - Standard_Boolean issame(TopoDS_Face& face, - TopoDS_Face& newface); -static - TopoDS_Face findface(TopoDS_Shape& shape, - TopoDS_Face& face); -// -static Standard_Integer shell(Draw_Interpretor&, Standard_Integer, const char** ); -static Standard_Integer outershell(Draw_Interpretor&, Standard_Integer, const char** ); - -//======================================================================= -//function : ShellCommands -//purpose : -//======================================================================= -void BRepTest::ShellCommands(Draw_Interpretor& theCommands) -{ - static Standard_Boolean loaded = Standard_False; - if (loaded) return; - loaded = Standard_True; - - const char* g = "Projection of wire commands"; - - theCommands.Add("shell","Make shell on bugged object", __FILE__, shell,g); - theCommands.Add("outershell","use outershell r s", __FILE__, outershell,g); - -} -//modified by NIZNHY-PKV Thu Sep 20 10:44:11 2012f -//======================================================================= -//function : outershell -//purpose : -//======================================================================= -Standard_Integer outershell(Draw_Interpretor& di, Standard_Integer n, const char** a) -{ - TopoDS_Shape aS; - TopoDS_Solid aSd; - TopoDS_Shell aSh; - // - if (n!=3) { - di << " use outershell r s\n"; - return 1; - } - // - aS=DBRep::Get(a[2]); - if (aS.IsNull()) { - di << " Null shape is not allowed\n"; - return 1; - } - if (aS.ShapeType()!=TopAbs_SOLID) { - di << " The shape must be a solid\n"; - return 1; - } - // - aSd=*((TopoDS_Solid*)&aS); - // - aSh=BRepClass3d::OuterShell(aSd); - if (aSh.IsNull()) { - di << " not found\n"; - } - else { - DBRep::Set(a[1],aSh); - } - return 0; -} - -//modified by NIZNHY-PKV Thu Sep 20 10:44:17 2012t -//======================================================================= -//function : shell -//purpose : -//======================================================================= -Standard_Integer shell(Draw_Interpretor& di, Standard_Integer n, const char** a) -{ - TopoDS_Shape Shape = DBRep::Get(a[1]); - TopTools_ListOfShape ListOfCorks; - //cout <<"You have "< 0 = Interior. - BRepOffsetAPI_MakeThickSolid MKTS (Shape, - ListOfCorks, - OffsetValue, - Tol, - BRepOffset_Skin, - 1, Standard_False); - - DBRep::Set("Result.brep",MKTS.Shape()); - TopTools_ListOfShape Larg; - Larg.Append(Shape); - //Check if the shape has at least one face - TopExp_Explorer FExp (MKTS.Shape (), TopAbs_FACE); - if (FExp.More ()) { - //cout << "Standard_True"<