// Created by: Peter KURNEV // Copyright (c) 1999-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 //======================================================================= //function : //purpose : //======================================================================= inline BOPDS_ShapeInfo::BOPDS_ShapeInfo() : myType(TopAbs_SHAPE), myReference(-1), myFlag(-1) { } //======================================================================= //function : //purpose : //======================================================================= inline BOPDS_ShapeInfo::BOPDS_ShapeInfo (const Handle(NCollection_BaseAllocator)& theAllocator) : myType(TopAbs_SHAPE), mySubShapes(theAllocator), myReference(-1), myFlag(-1) { } //======================================================================= //function : ~ //purpose : //======================================================================= inline BOPDS_ShapeInfo::~BOPDS_ShapeInfo() { } //======================================================================= //function : SetShape //purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetShape(const TopoDS_Shape& theS) { myShape=theS; } //======================================================================= //function : Shape //purpose : //======================================================================= inline const TopoDS_Shape& BOPDS_ShapeInfo::Shape()const { return myShape; } //======================================================================= //function : SetShapeType //purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetShapeType(const TopAbs_ShapeEnum theType) { myType=theType; } //======================================================================= //function : ShapeType //purpose : //======================================================================= inline TopAbs_ShapeEnum BOPDS_ShapeInfo::ShapeType()const { return myType; } //======================================================================= //function : SetBox //purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetBox(const Bnd_Box& theBox) { myBox=theBox; } //======================================================================= //function : Box //purpose : //======================================================================= inline const Bnd_Box& BOPDS_ShapeInfo::Box()const { return myBox; } //======================================================================= //function : ChangeBox //purpose : //======================================================================= inline Bnd_Box& BOPDS_ShapeInfo::ChangeBox() { return myBox; } //======================================================================= //function : SubShapes //purpose : //======================================================================= inline const BOPCol_ListOfInteger& BOPDS_ShapeInfo::SubShapes()const { return mySubShapes; } //======================================================================= //function : ChangeSubShapes //purpose : //======================================================================= inline BOPCol_ListOfInteger& BOPDS_ShapeInfo::ChangeSubShapes() { return mySubShapes; } //======================================================================= //function : HasSubShape //purpose : //======================================================================= inline Standard_Boolean BOPDS_ShapeInfo::HasSubShape (const Standard_Integer theI)const { Standard_Boolean bRet; BOPCol_ListIteratorOfListOfInteger aIt; // bRet=Standard_False; aIt.Initialize(mySubShapes); for (; aIt.More(); aIt.Next()) { bRet=(theI==aIt.Value()); if (bRet) { return bRet; } } return bRet; } //======================================================================= //function : HasReference //purpose : //======================================================================= inline Standard_Boolean BOPDS_ShapeInfo::HasReference()const { return (myReference>=0); } //======================================================================= //function : SetReference //purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetReference(const Standard_Integer theI) { myReference=theI; } //======================================================================= //function : Reference //purpose : //======================================================================= inline Standard_Integer BOPDS_ShapeInfo::Reference()const { return myReference; } //======================================================================= //function : HasBRep //purpose : //======================================================================= inline Standard_Boolean BOPDS_ShapeInfo::HasBRep()const { return (BOPDS_Tools::HasBRep(myType)); } //======================================================================= //function : IsInterfering //purpose : //======================================================================= inline Standard_Boolean BOPDS_ShapeInfo::IsInterfering()const { return (HasBRep() || myType==TopAbs_SOLID); } //======================================================================= //function : HasFlag //purpose : //======================================================================= inline Standard_Boolean BOPDS_ShapeInfo::HasFlag()const { return (myFlag>=0); } //======================================================================= //function : HasFlag //purpose : //======================================================================= inline Standard_Boolean BOPDS_ShapeInfo::HasFlag (Standard_Integer& theFlag)const { theFlag=myFlag; return (myFlag>=0); } //======================================================================= //function : SetFlag //purpose : //======================================================================= inline void BOPDS_ShapeInfo::SetFlag(const Standard_Integer theFlag) { myFlag=theFlag; } //======================================================================= //function : Flag //purpose : //======================================================================= inline Standard_Integer BOPDS_ShapeInfo::Flag()const { return myFlag; }