mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,41 +1,54 @@
|
||||
TopTools_MutexForShapeProvider.hxx
|
||||
TopTools_MutexForShapeProvider.cxx
|
||||
TopTools_MapOfShape.hxx
|
||||
TopTools.cxx
|
||||
TopTools.hxx
|
||||
TopTools_Array1OfListOfShape.hxx
|
||||
TopTools_Array1OfShape.hxx
|
||||
TopTools_Array2OfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx
|
||||
TopTools_DataMapOfIntegerListOfShape.hxx
|
||||
TopTools_DataMapOfIntegerShape.hxx
|
||||
TopTools_DataMapOfOrientedShapeInteger.hxx
|
||||
TopTools_DataMapOfOrientedShapeShape.hxx
|
||||
TopTools_DataMapOfShapeInteger.hxx
|
||||
TopTools_DataMapOfShapeListOfInteger.hxx
|
||||
TopTools_DataMapOfShapeListOfShape.hxx
|
||||
TopTools_DataMapOfShapeReal.hxx
|
||||
TopTools_DataMapOfShapeSequenceOfShape.hxx
|
||||
TopTools_DataMapOfShapeShape.hxx
|
||||
TopTools_HArray1OfListOfShape.hxx
|
||||
TopTools_HArray1OfShape.hxx
|
||||
TopTools_HArray2OfShape.hxx
|
||||
TopTools_HSequenceOfShape.hxx
|
||||
TopTools_IndexedDataMapOfShapeAddress.hxx
|
||||
TopTools_IndexedDataMapOfShapeListOfShape.hxx
|
||||
TopTools_IndexedDataMapOfShapeShape.hxx
|
||||
TopTools_IndexedMapOfOrientedShape.hxx
|
||||
TopTools_IndexedMapOfShape.hxx
|
||||
TopTools_ListIteratorOfListOfShape.hxx
|
||||
TopTools_ListOfShape.hxx
|
||||
TopTools_LocationSet.cxx
|
||||
TopTools_LocationSet.hxx
|
||||
TopTools_LocationSetPtr.hxx
|
||||
TopTools_MapIteratorOfMapOfOrientedShape.hxx
|
||||
TopTools_MapIteratorOfMapOfShape.hxx
|
||||
TopTools_MapOfOrientedShape.hxx
|
||||
TopTools_MapIteratorOfMapOfOrientedShape.hxx
|
||||
TopTools_IndexedMapOfShape.hxx
|
||||
TopTools_DataMapOfIntegerShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx
|
||||
TopTools_DataMapOfOrientedShapeInteger.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx
|
||||
TopTools_DataMapOfShapeInteger.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx
|
||||
TopTools_DataMapOfShapeReal.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx
|
||||
TopTools_Array1OfShape.hxx
|
||||
TopTools_HArray1OfShape.hxx
|
||||
TopTools_Array2OfShape.hxx
|
||||
TopTools_HArray2OfShape.hxx
|
||||
TopTools_MapOfShape.hxx
|
||||
TopTools_MutexForShapeProvider.cxx
|
||||
TopTools_MutexForShapeProvider.hxx
|
||||
TopTools_OrientedShapeMapHasher.cxx
|
||||
TopTools_OrientedShapeMapHasher.hxx
|
||||
TopTools_OrientedShapeMapHasher.lxx
|
||||
TopTools_SequenceOfShape.hxx
|
||||
TopTools_HSequenceOfShape.hxx
|
||||
TopTools_ListOfShape.hxx
|
||||
TopTools_ListIteratorOfListOfShape.hxx
|
||||
TopTools_Array1OfListOfShape.hxx
|
||||
TopTools_HArray1OfListOfShape.hxx
|
||||
TopTools_DataMapOfIntegerListOfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx
|
||||
TopTools_DataMapOfShapeListOfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx
|
||||
TopTools_DataMapOfShapeListOfInteger.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx
|
||||
TopTools_IndexedDataMapOfShapeShape.hxx
|
||||
TopTools_IndexedDataMapOfShapeListOfShape.hxx
|
||||
TopTools_DataMapOfShapeShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx
|
||||
TopTools_IndexedMapOfOrientedShape.hxx
|
||||
TopTools_DataMapOfShapeSequenceOfShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeSequenceOfShape.hxx
|
||||
TopTools_IndexedDataMapOfShapeAddress.hxx
|
||||
TopTools_DataMapOfOrientedShapeShape.hxx
|
||||
TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
|
||||
TopTools_ShapeMapHasher.cxx
|
||||
TopTools_ShapeMapHasher.hxx
|
||||
TopTools_ShapeMapHasher.lxx
|
||||
TopTools_ShapeSet.cxx
|
||||
TopTools_ShapeSet.hxx
|
||||
|
@@ -1,191 +0,0 @@
|
||||
-- Created on: 1993-01-14
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
package TopTools
|
||||
|
||||
---Purpose: The TopTools package provides utilities for the
|
||||
-- topological data structure.
|
||||
--
|
||||
-- * ShapeMapHasher. Hash a Shape base on the TShape
|
||||
-- and the Location. The Orientation is not used.
|
||||
--
|
||||
-- * OrientedShapeMapHasher. Hash a Shape base on the
|
||||
-- TShape ,the Location and the Orientation.
|
||||
--
|
||||
-- * Instantiations of TCollection for Shapes :
|
||||
-- MapOfShape
|
||||
-- IndexedMapOfShape
|
||||
-- DataMapOfIntegerShape
|
||||
-- DataMapOfShapeInteger
|
||||
-- DataMapOfShapeReal
|
||||
-- Array1OfShape
|
||||
-- HArray1OfShape
|
||||
-- SequenceOfShape
|
||||
-- HSequenceOfShape
|
||||
-- ListOfShape
|
||||
-- Array1OfListShape
|
||||
-- HArray1OfListShape
|
||||
-- DataMapOfIntegerListOfShape
|
||||
-- DataMapOfShapeListOfShape
|
||||
-- DataMapOfShapeListOfInteger
|
||||
-- IndexedDataMapOfShapeShape
|
||||
-- IndexedDataMapOfShapeListOfShape
|
||||
-- DataMapOfShapeShape
|
||||
-- IndexedMapOfOrientedShape
|
||||
-- DataMapOfShapeSequenceOfShape
|
||||
-- IndexedDataMapOfShapeAddress
|
||||
-- DataMapOfOrientedShapeShape
|
||||
--
|
||||
-- * LocationSet : to write sets of locations.
|
||||
--
|
||||
-- * ShapeSet : to writes sets of TShapes.
|
||||
--
|
||||
-- Package Methods :
|
||||
--
|
||||
-- Dump : To dump the topology of a Shape.
|
||||
--
|
||||
|
||||
--- Level : Public
|
||||
-- All methods of all classes will be public.
|
||||
|
||||
|
||||
uses
|
||||
|
||||
MMgt,
|
||||
TCollection,
|
||||
TColStd,
|
||||
TopLoc,
|
||||
TopAbs,
|
||||
TopoDS,
|
||||
Message
|
||||
|
||||
is
|
||||
|
||||
----------------------------------------------------------
|
||||
-- TCollections for Shapes
|
||||
----------------------------------------------------------
|
||||
|
||||
class ShapeMapHasher;
|
||||
|
||||
class OrientedShapeMapHasher;
|
||||
|
||||
imported MapOfShape;
|
||||
|
||||
imported MapIteratorOfMapOfShape;
|
||||
|
||||
imported MapOfOrientedShape;
|
||||
|
||||
imported MapIteratorOfMapOfOrientedShape;
|
||||
|
||||
imported IndexedMapOfShape;
|
||||
|
||||
imported DataMapOfIntegerShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerShape;
|
||||
|
||||
imported DataMapOfOrientedShapeInteger;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfOrientedShapeInteger;
|
||||
|
||||
imported DataMapOfShapeInteger;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeInteger;
|
||||
|
||||
imported DataMapOfShapeReal;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeReal;
|
||||
|
||||
imported Array1OfShape;
|
||||
|
||||
imported transient class HArray1OfShape;
|
||||
|
||||
imported Array2OfShape;
|
||||
|
||||
imported transient class HArray2OfShape;
|
||||
|
||||
imported SequenceOfShape;
|
||||
|
||||
imported transient class HSequenceOfShape;
|
||||
|
||||
imported ListOfShape;
|
||||
|
||||
imported ListIteratorOfListOfShape;
|
||||
|
||||
imported Array1OfListOfShape;
|
||||
|
||||
imported transient class HArray1OfListOfShape;
|
||||
|
||||
imported DataMapOfIntegerListOfShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerListOfShape;
|
||||
|
||||
imported DataMapOfShapeListOfShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeListOfShape;
|
||||
|
||||
imported DataMapOfShapeListOfInteger;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeListOfInteger;
|
||||
|
||||
imported IndexedDataMapOfShapeShape;
|
||||
imported IndexedDataMapOfShapeListOfShape;
|
||||
|
||||
imported DataMapOfShapeShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeShape;
|
||||
|
||||
imported IndexedMapOfOrientedShape;
|
||||
|
||||
imported DataMapOfShapeSequenceOfShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeSequenceOfShape;
|
||||
|
||||
imported IndexedDataMapOfShapeAddress;
|
||||
|
||||
imported DataMapOfOrientedShapeShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfOrientedShapeShape;
|
||||
|
||||
----------------------------------------------------------
|
||||
-- Tools for writing and reading Locations and Shapes
|
||||
----------------------------------------------------------
|
||||
|
||||
class LocationSet;
|
||||
|
||||
pointer LocationSetPtr to LocationSet from TopTools;
|
||||
|
||||
class ShapeSet;
|
||||
---Purpose: A set of Shapes. Can be dump, wrote or read.
|
||||
|
||||
--
|
||||
-- Package methods
|
||||
--
|
||||
|
||||
imported MutexForShapeProvider;
|
||||
|
||||
Dump(Sh : Shape from TopoDS; S : in out OStream);
|
||||
---Purpose: Dumps the topological structure of <Sh> on the
|
||||
-- stream <S>.
|
||||
|
||||
Dummy(I : Integer);
|
||||
---Purpose: This is to bypass an extraction bug. It will force
|
||||
-- the inclusion of Standard_Integer.hxx itself
|
||||
-- including Standard_OStream.hxx at the correct
|
||||
-- position.
|
||||
|
||||
end TopTools;
|
||||
|
||||
|
@@ -14,14 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <TopTools.ixx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools.hxx>
|
||||
#include <TopTools_ShapeSet.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Dump
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void TopTools::Dump(const TopoDS_Shape& Sh, Standard_OStream& S)
|
||||
{
|
||||
TopTools_ShapeSet SSet;
|
||||
|
118
src/TopTools/TopTools.hxx
Normal file
118
src/TopTools/TopTools.hxx
Normal file
@@ -0,0 +1,118 @@
|
||||
// Created on: 1993-01-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTools_HeaderFile
|
||||
#define _TopTools_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class TopoDS_Shape;
|
||||
class TopTools_ShapeMapHasher;
|
||||
class TopTools_OrientedShapeMapHasher;
|
||||
class TopTools_LocationSet;
|
||||
class TopTools_ShapeSet;
|
||||
|
||||
|
||||
//! The TopTools package provides utilities for the
|
||||
//! topological data structure.
|
||||
//!
|
||||
//! * ShapeMapHasher. Hash a Shape base on the TShape
|
||||
//! and the Location. The Orientation is not used.
|
||||
//!
|
||||
//! * OrientedShapeMapHasher. Hash a Shape base on the
|
||||
//! TShape ,the Location and the Orientation.
|
||||
//!
|
||||
//! * Instantiations of TCollection for Shapes :
|
||||
//! MapOfShape
|
||||
//! IndexedMapOfShape
|
||||
//! DataMapOfIntegerShape
|
||||
//! DataMapOfShapeInteger
|
||||
//! DataMapOfShapeReal
|
||||
//! Array1OfShape
|
||||
//! HArray1OfShape
|
||||
//! SequenceOfShape
|
||||
//! HSequenceOfShape
|
||||
//! ListOfShape
|
||||
//! Array1OfListShape
|
||||
//! HArray1OfListShape
|
||||
//! DataMapOfIntegerListOfShape
|
||||
//! DataMapOfShapeListOfShape
|
||||
//! DataMapOfShapeListOfInteger
|
||||
//! IndexedDataMapOfShapeShape
|
||||
//! IndexedDataMapOfShapeListOfShape
|
||||
//! DataMapOfShapeShape
|
||||
//! IndexedMapOfOrientedShape
|
||||
//! DataMapOfShapeSequenceOfShape
|
||||
//! IndexedDataMapOfShapeAddress
|
||||
//! DataMapOfOrientedShapeShape
|
||||
//!
|
||||
//! * LocationSet : to write sets of locations.
|
||||
//!
|
||||
//! * ShapeSet : to writes sets of TShapes.
|
||||
//!
|
||||
//! Package Methods :
|
||||
//!
|
||||
//! Dump : To dump the topology of a Shape.
|
||||
class TopTools
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! A set of Shapes. Can be dump, wrote or read.
|
||||
//! Dumps the topological structure of <Sh> on the
|
||||
//! stream <S>.
|
||||
Standard_EXPORT static void Dump (const TopoDS_Shape& Sh, Standard_OStream& S);
|
||||
|
||||
//! This is to bypass an extraction bug. It will force
|
||||
//! the inclusion of Standard_Integer.hxx itself
|
||||
//! including Standard_OStream.hxx at the correct
|
||||
//! position.
|
||||
Standard_EXPORT static void Dummy (const Standard_Integer I);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class TopTools_ShapeMapHasher;
|
||||
friend class TopTools_OrientedShapeMapHasher;
|
||||
friend class TopTools_LocationSet;
|
||||
friend class TopTools_ShapeSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTools_HeaderFile
|
@@ -1,86 +0,0 @@
|
||||
-- Created on: 1993-07-16
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
class LocationSet from TopTools
|
||||
|
||||
---Purpose: The class LocationSet stores a set of location in
|
||||
-- a relocatable state.
|
||||
--
|
||||
-- It can be created from Locations.
|
||||
--
|
||||
-- It can create Locations.
|
||||
--
|
||||
-- It can be write and read from a stream.
|
||||
|
||||
uses
|
||||
Location from TopLoc,
|
||||
IndexedMapOfLocation from TopLoc,
|
||||
ProgressIndicator from Message
|
||||
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
|
||||
is
|
||||
Create returns LocationSet from TopTools;
|
||||
---Purpose: Returns an empty set of locations.
|
||||
|
||||
Clear(me : in out)
|
||||
---Purpose: Clears the content of the set.
|
||||
is static;
|
||||
|
||||
Add(me : in out; L : Location from TopLoc) returns Integer
|
||||
---Purpose: Incorporate a new Location in the set and returns
|
||||
-- its index.
|
||||
is static;
|
||||
|
||||
Location(me; I : Integer) returns Location from TopLoc
|
||||
---Purpose: Returns the location of index <I>.
|
||||
--
|
||||
---C++: return const &
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
is static;
|
||||
|
||||
Index(me; L : Location from TopLoc) returns Integer
|
||||
---Purpose: Returns the index of <L>.
|
||||
is static;
|
||||
|
||||
Dump(me; OS : in out OStream)
|
||||
---Purpose: Dumps the content of me on the stream <OS>.
|
||||
is static;
|
||||
|
||||
Write(me; OS : in out OStream)
|
||||
---Purpose: Writes the content of me on the stream <OS> in a
|
||||
-- format that can be read back by Read.
|
||||
is static;
|
||||
|
||||
Read(me : in out; IS : in out IStream)
|
||||
---Purpose: Reads the content of me from the stream <IS>. me
|
||||
-- is first cleared.
|
||||
--
|
||||
is static;
|
||||
|
||||
SetProgress(me : in out; PR : ProgressIndicator from Message);
|
||||
|
||||
GetProgress(me) returns ProgressIndicator from Message;
|
||||
|
||||
fields
|
||||
myMap : IndexedMapOfLocation from TopLoc;
|
||||
myProgress : ProgressIndicator from Message;
|
||||
|
||||
end LocationSet;
|
||||
|
||||
|
@@ -14,21 +14,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <TopTools_LocationSet.ixx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <Message_ProgressSentry.hxx>
|
||||
|
||||
#include <GeomTools.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <Message_ProgressSentry.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopTools_LocationSet.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : TopTools_LocationSet
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
TopTools_LocationSet::TopTools_LocationSet()
|
||||
{
|
||||
}
|
||||
|
104
src/TopTools/TopTools_LocationSet.hxx
Normal file
104
src/TopTools/TopTools_LocationSet.hxx
Normal file
@@ -0,0 +1,104 @@
|
||||
// Created on: 1993-07-16
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTools_LocationSet_HeaderFile
|
||||
#define _TopTools_LocationSet_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopLoc_IndexedMapOfLocation.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
class Message_ProgressIndicator;
|
||||
class Standard_OutOfRange;
|
||||
class TopLoc_Location;
|
||||
|
||||
|
||||
//! The class LocationSet stores a set of location in
|
||||
//! a relocatable state.
|
||||
//!
|
||||
//! It can be created from Locations.
|
||||
//!
|
||||
//! It can create Locations.
|
||||
//!
|
||||
//! It can be write and read from a stream.
|
||||
class TopTools_LocationSet
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns an empty set of locations.
|
||||
Standard_EXPORT TopTools_LocationSet();
|
||||
|
||||
//! Clears the content of the set.
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
//! Incorporate a new Location in the set and returns
|
||||
//! its index.
|
||||
Standard_EXPORT Standard_Integer Add (const TopLoc_Location& L);
|
||||
|
||||
//! Returns the location of index <I>.
|
||||
Standard_EXPORT const TopLoc_Location& Location (const Standard_Integer I) const;
|
||||
|
||||
//! Returns the index of <L>.
|
||||
Standard_EXPORT Standard_Integer Index (const TopLoc_Location& L) const;
|
||||
|
||||
//! Dumps the content of me on the stream <OS>.
|
||||
Standard_EXPORT void Dump (Standard_OStream& OS) const;
|
||||
|
||||
//! Writes the content of me on the stream <OS> in a
|
||||
//! format that can be read back by Read.
|
||||
Standard_EXPORT void Write (Standard_OStream& OS) const;
|
||||
|
||||
//! Reads the content of me from the stream <IS>. me
|
||||
//! is first cleared.
|
||||
Standard_EXPORT void Read (Standard_IStream& IS);
|
||||
|
||||
Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& PR);
|
||||
|
||||
Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TopLoc_IndexedMapOfLocation myMap;
|
||||
Handle(Message_ProgressIndicator) myProgress;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTools_LocationSet_HeaderFile
|
23
src/TopTools/TopTools_LocationSetPtr.hxx
Normal file
23
src/TopTools/TopTools_LocationSetPtr.hxx
Normal file
@@ -0,0 +1,23 @@
|
||||
// Created on: 1993-01-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTools_LocationSetPtr_HeaderFile
|
||||
#define _TopTools_LocationSetPtr_HeaderFile
|
||||
|
||||
class TopTools_LocationSet;
|
||||
typedef TopTools_LocationSet* TopTools_LocationSetPtr;
|
||||
|
||||
#endif // _TopTools_LocationSetPtr_HeaderFile
|
@@ -1,38 +0,0 @@
|
||||
-- Created on: 1993-08-30
|
||||
-- Created by: Modelistation
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
class OrientedShapeMapHasher from TopTools
|
||||
|
||||
uses
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
|
||||
HashCode(myclass; S : Shape from TopoDS; Upper : Integer) returns Integer;
|
||||
---Purpose: Returns a HasCode value for the Key <K> in the
|
||||
-- range 0..Upper.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
IsEqual(myclass; S1, S2 : Shape from TopoDS) returns Boolean;
|
||||
---Purpose: Returns True when the two keys are equal. Two same
|
||||
-- keys must have the same hashcode, the contrary is
|
||||
-- not necessary.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
|
||||
end OrientedShapeMapHasher;
|
@@ -14,4 +14,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <TopTools_OrientedShapeMapHasher.ixx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_OrientedShapeMapHasher.hxx>
|
||||
|
70
src/TopTools/TopTools_OrientedShapeMapHasher.hxx
Normal file
70
src/TopTools/TopTools_OrientedShapeMapHasher.hxx
Normal file
@@ -0,0 +1,70 @@
|
||||
// Created on: 1993-08-30
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
|
||||
#define _TopTools_OrientedShapeMapHasher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
class TopTools_OrientedShapeMapHasher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a HasCode value for the Key <K> in the
|
||||
//! range 0..Upper.
|
||||
static Standard_Integer HashCode (const TopoDS_Shape& S, const Standard_Integer Upper);
|
||||
|
||||
//! Returns True when the two keys are equal. Two same
|
||||
//! keys must have the same hashcode, the contrary is
|
||||
//! not necessary.
|
||||
static Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <TopTools_OrientedShapeMapHasher.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTools_OrientedShapeMapHasher_HeaderFile
|
@@ -1,38 +0,0 @@
|
||||
-- Created on: 1993-01-14
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
class ShapeMapHasher from TopTools
|
||||
---Purpose: Hash tool, used for generating maps of shapes in topology.
|
||||
uses
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
|
||||
HashCode(myclass; S : Shape from TopoDS; Upper : Integer) returns Integer;
|
||||
---Purpose: Returns a HasCode value for the Key <K> in the
|
||||
-- range 0..Upper.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
IsEqual(myclass; S1, S2 : Shape from TopoDS) returns Boolean;
|
||||
---Purpose: Returns True when the two keys are the same. Two
|
||||
-- same keys must have the same hashcode, the
|
||||
-- contrary is not necessary.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
|
||||
end ShapeMapHasher;
|
@@ -14,4 +14,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <TopTools_ShapeMapHasher.ixx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_ShapeMapHasher.hxx>
|
||||
|
70
src/TopTools/TopTools_ShapeMapHasher.hxx
Normal file
70
src/TopTools/TopTools_ShapeMapHasher.hxx
Normal file
@@ -0,0 +1,70 @@
|
||||
// Created on: 1993-01-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTools_ShapeMapHasher_HeaderFile
|
||||
#define _TopTools_ShapeMapHasher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! Hash tool, used for generating maps of shapes in topology.
|
||||
class TopTools_ShapeMapHasher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a HasCode value for the Key <K> in the
|
||||
//! range 0..Upper.
|
||||
static Standard_Integer HashCode (const TopoDS_Shape& S, const Standard_Integer Upper);
|
||||
|
||||
//! Returns True when the two keys are the same. Two
|
||||
//! same keys must have the same hashcode, the
|
||||
//! contrary is not necessary.
|
||||
static Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <TopTools_ShapeMapHasher.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTools_ShapeMapHasher_HeaderFile
|
@@ -1,228 +0,0 @@
|
||||
-- Created on: 1993-07-01
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
class ShapeSet from TopTools
|
||||
|
||||
---Purpose: A ShapeSets contains a Shape and all its
|
||||
-- sub-shapes and locations. It can be dump, write
|
||||
-- and read.
|
||||
--
|
||||
-- Methods to handle the geometry can be redefined.
|
||||
--
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS,
|
||||
IndexedMapOfShape from TopTools,
|
||||
LocationSet from TopTools,
|
||||
ShapeEnum from TopAbs,
|
||||
AsciiString from TCollection,
|
||||
ProgressIndicator from Message
|
||||
|
||||
is
|
||||
|
||||
Create returns ShapeSet from TopTools;
|
||||
---Purpose: Builds an empty ShapeSet.
|
||||
|
||||
Delete(me:out) is virtual;
|
||||
---C++: alias "Standard_EXPORT virtual ~TopTools_ShapeSet(){Delete() ; }"
|
||||
|
||||
SetFormatNb(me : out; theFormatNb : Integer) is static;
|
||||
FormatNb(me) returns Integer is static;
|
||||
---Purpose: two formats available for the moment:
|
||||
-- First: does not write CurveOnSurface UV Points into the file
|
||||
-- on reading calls Check() method.
|
||||
-- Second: stores CurveOnSurface UV Points.
|
||||
-- On reading format is recognized from Version string.
|
||||
|
||||
Clear(me : in out)
|
||||
---Purpose: Clears the content of the set. This method can be
|
||||
-- redefined.
|
||||
is virtual;
|
||||
|
||||
Add(me : in out; S : Shape from TopoDS) returns Integer
|
||||
---Purpose: Stores <S> and its sub-shape. Returns the index of <S>.
|
||||
-- The method AddGeometry is called on each sub-shape.
|
||||
is static;
|
||||
|
||||
Shape(me; I : Integer) returns Shape from TopoDS
|
||||
---Purpose: Returns the sub-shape of index <I>.
|
||||
--
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
||||
Index(me; S : Shape from TopoDS) returns Integer
|
||||
---Purpose: Returns the index of <S>.
|
||||
is static;
|
||||
|
||||
Locations(me) returns LocationSet from TopTools
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
||||
ChangeLocations(me : in out) returns LocationSet from TopTools
|
||||
---C++: return &
|
||||
is static;
|
||||
|
||||
DumpExtent(me; OS : in out OStream) returns OStream
|
||||
---Purpose: Dumps the number of objects in me on the stream <OS>.
|
||||
-- (Number of shapes of each type)
|
||||
---C++: return &
|
||||
is static;
|
||||
|
||||
DumpExtent(me; S : in out AsciiString from TCollection)
|
||||
---Purpose: Dumps the number of objects in me in the string S
|
||||
-- (Number of shapes of each type)
|
||||
is static;
|
||||
|
||||
|
||||
Dump(me; OS : in out OStream)
|
||||
---Purpose: Dumps the content of me on the stream <OS>.
|
||||
--
|
||||
-- Dumps the shapes from first to last.
|
||||
-- For each Shape
|
||||
-- Dump the type, the flags, the subshapes
|
||||
-- calls DumpGeometry(S)
|
||||
--
|
||||
--
|
||||
-- Dumps the geometry calling DumpGeometry.
|
||||
--
|
||||
-- Dumps the locations.
|
||||
is virtual;
|
||||
|
||||
Write(me: in out; OS : in out OStream)
|
||||
---Purpose: Writes the content of me on the stream <OS> in a
|
||||
-- format that can be read back by Read.
|
||||
--
|
||||
-- Writes the locations.
|
||||
--
|
||||
-- Writes the geometry calling WriteGeometry.
|
||||
--
|
||||
-- Dumps the shapes from last to first.
|
||||
-- For each shape :
|
||||
-- Write the type.
|
||||
-- calls WriteGeometry(S).
|
||||
-- Write the flags, the subshapes.
|
||||
is virtual;
|
||||
|
||||
Read(me : in out; IS : in out IStream)
|
||||
---Purpose: Reads the content of me from the stream <IS>. me
|
||||
-- is first cleared.
|
||||
--
|
||||
-- Reads the locations.
|
||||
--
|
||||
-- Reads the geometry calling ReadGeometry.
|
||||
--
|
||||
-- Reads the shapes.
|
||||
-- For each shape
|
||||
-- Reads the type.
|
||||
-- calls ReadGeometry(T,S).
|
||||
-- Reads the flag, the subshapes.
|
||||
is virtual;
|
||||
|
||||
Dump(me; S : Shape from TopoDS; OS : in out OStream)
|
||||
---Purpose: Dumps on <OS> the shape <S>. Dumps the
|
||||
-- orientation, the index of the TShape and the index
|
||||
-- of the Location.
|
||||
is static;
|
||||
|
||||
Write(me; S : Shape from TopoDS; OS : in out OStream)
|
||||
---Purpose: Writes on <OS> the shape <S>. Writes the
|
||||
-- orientation, the index of the TShape and the index
|
||||
-- of the Location.
|
||||
is static;
|
||||
|
||||
Read(me; S : in out Shape from TopoDS; IS : in out IStream)
|
||||
---Purpose: Reads from <IS> a shape and returns it in S.
|
||||
is static;
|
||||
|
||||
Read(me; S : in out Shape from TopoDS; IS : in out IStream;
|
||||
NbShapes : Integer)
|
||||
---Purpose: Reads from <IS> a shape and returns it in S.
|
||||
-- <NbShapes> is the number of tshapes in the set.
|
||||
is static private;
|
||||
|
||||
--
|
||||
-- Auxliary methods for the geometry. They can be redefined. In
|
||||
-- this class the perform nothing.
|
||||
--
|
||||
|
||||
AddGeometry(me : in out; S : Shape from TopoDS)
|
||||
---Purpose: Stores the geometry of <S>.
|
||||
is virtual;
|
||||
|
||||
DumpGeometry(me; OS : in out OStream)
|
||||
---Purpose: Dumps the geometry of me on the stream <OS>.
|
||||
is virtual;
|
||||
|
||||
WriteGeometry(me : in out; OS : in out OStream)
|
||||
---Purpose: Writes the geometry of me on the stream <OS> in a
|
||||
-- format that can be read back by Read.
|
||||
is virtual;
|
||||
|
||||
ReadGeometry(me : in out; IS : in out IStream)
|
||||
---Purpose: Reads the geometry of me from the stream <IS>.
|
||||
is virtual;
|
||||
|
||||
DumpGeometry(me; S : Shape from TopoDS; OS : in out OStream)
|
||||
---Purpose: Dumps the geometry of <S> on the stream <OS>.
|
||||
is virtual;
|
||||
|
||||
WriteGeometry(me; S : Shape from TopoDS; OS : in out OStream)
|
||||
---Purpose: Writes the geometry of <S> on the stream <OS> in a
|
||||
-- format that can be read back by Read.
|
||||
is virtual;
|
||||
|
||||
ReadGeometry(me : in out; T : ShapeEnum from TopAbs;
|
||||
IS : in out IStream;
|
||||
S : out Shape from TopoDS)
|
||||
---Purpose: Reads the geometry of a shape of type <T> from the
|
||||
-- stream <IS> and returns it in <S>.
|
||||
is virtual;
|
||||
|
||||
|
||||
AddShapes(me : in out; S1 : in out Shape from TopoDS;
|
||||
S2 : Shape from TopoDS)
|
||||
---Purpose: Inserts the shape <S2> in the shape <S1>. This
|
||||
-- method must be redefined to use the correct
|
||||
-- builder.
|
||||
is virtual;
|
||||
|
||||
|
||||
Check(me : in out; T : ShapeEnum from TopAbs;
|
||||
S : in out Shape from TopoDS)
|
||||
---Purpose: This method is called after each new completed
|
||||
-- shape. <T> is the type. <S> is the shape. In this
|
||||
-- class it does nothing, but it gives the opportunity
|
||||
-- in derived classes to perform extra treatment on
|
||||
-- shapes.
|
||||
is virtual;
|
||||
|
||||
NbShapes(me) returns Integer;
|
||||
---Purpose:Returns number of shapes read from file.
|
||||
|
||||
SetProgress(me : in out; PR : ProgressIndicator from Message);
|
||||
|
||||
GetProgress(me) returns ProgressIndicator from Message;
|
||||
|
||||
fields
|
||||
myShapes : IndexedMapOfShape from TopTools;
|
||||
myLocations : LocationSet from TopTools;
|
||||
myFormatNb : Integer from Standard; -- jfa 26.09.2001
|
||||
myProgress : ProgressIndicator from Message;
|
||||
|
||||
end ShapeSet;
|
||||
|
||||
|
@@ -22,15 +22,16 @@
|
||||
// authentification we cut last '\r' in the line (which will
|
||||
// be present if file is in DOS coding)
|
||||
|
||||
#include <TopTools_ShapeSet.ixx>
|
||||
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <Message_ProgressSentry.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_LocationSet.hxx>
|
||||
#include <TopTools_ShapeSet.hxx>
|
||||
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Message_ProgressSentry.hxx>
|
||||
|
||||
const char* Version = "CASCADE Topology V1, (c) Matra-Datavision";
|
||||
const char* Version2 = "CASCADE Topology V2, (c) Matra-Datavision";
|
||||
|
||||
|
216
src/TopTools/TopTools_ShapeSet.hxx
Normal file
216
src/TopTools/TopTools_ShapeSet.hxx
Normal file
@@ -0,0 +1,216 @@
|
||||
// Created on: 1993-07-01
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTools_ShapeSet_HeaderFile
|
||||
#define _TopTools_ShapeSet_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_LocationSet.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
class Message_ProgressIndicator;
|
||||
class TopoDS_Shape;
|
||||
class TopTools_LocationSet;
|
||||
class TCollection_AsciiString;
|
||||
|
||||
|
||||
//! A ShapeSets contains a Shape and all its
|
||||
//! sub-shapes and locations. It can be dump, write
|
||||
//! and read.
|
||||
//!
|
||||
//! Methods to handle the geometry can be redefined.
|
||||
class TopTools_ShapeSet
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Builds an empty ShapeSet.
|
||||
Standard_EXPORT TopTools_ShapeSet();
|
||||
|
||||
Standard_EXPORT virtual void Delete();
|
||||
Standard_EXPORT virtual ~TopTools_ShapeSet(){Delete() ; }
|
||||
|
||||
Standard_EXPORT void SetFormatNb (const Standard_Integer theFormatNb);
|
||||
|
||||
//! two formats available for the moment:
|
||||
//! First: does not write CurveOnSurface UV Points into the file
|
||||
//! on reading calls Check() method.
|
||||
//! Second: stores CurveOnSurface UV Points.
|
||||
//! On reading format is recognized from Version string.
|
||||
Standard_EXPORT Standard_Integer FormatNb() const;
|
||||
|
||||
//! Clears the content of the set. This method can be
|
||||
//! redefined.
|
||||
Standard_EXPORT virtual void Clear();
|
||||
|
||||
//! Stores <S> and its sub-shape. Returns the index of <S>.
|
||||
//! The method AddGeometry is called on each sub-shape.
|
||||
Standard_EXPORT Standard_Integer Add (const TopoDS_Shape& S);
|
||||
|
||||
//! Returns the sub-shape of index <I>.
|
||||
Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer I) const;
|
||||
|
||||
//! Returns the index of <S>.
|
||||
Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& S) const;
|
||||
|
||||
Standard_EXPORT const TopTools_LocationSet& Locations() const;
|
||||
|
||||
Standard_EXPORT TopTools_LocationSet& ChangeLocations();
|
||||
|
||||
//! Dumps the number of objects in me on the stream <OS>.
|
||||
//! (Number of shapes of each type)
|
||||
Standard_EXPORT Standard_OStream& DumpExtent (Standard_OStream& OS) const;
|
||||
|
||||
//! Dumps the number of objects in me in the string S
|
||||
//! (Number of shapes of each type)
|
||||
Standard_EXPORT void DumpExtent (TCollection_AsciiString& S) const;
|
||||
|
||||
//! Dumps the content of me on the stream <OS>.
|
||||
//!
|
||||
//! Dumps the shapes from first to last.
|
||||
//! For each Shape
|
||||
//! Dump the type, the flags, the subshapes
|
||||
//! calls DumpGeometry(S)
|
||||
//!
|
||||
//! Dumps the geometry calling DumpGeometry.
|
||||
//!
|
||||
//! Dumps the locations.
|
||||
Standard_EXPORT virtual void Dump (Standard_OStream& OS) const;
|
||||
|
||||
//! Writes the content of me on the stream <OS> in a
|
||||
//! format that can be read back by Read.
|
||||
//!
|
||||
//! Writes the locations.
|
||||
//!
|
||||
//! Writes the geometry calling WriteGeometry.
|
||||
//!
|
||||
//! Dumps the shapes from last to first.
|
||||
//! For each shape :
|
||||
//! Write the type.
|
||||
//! calls WriteGeometry(S).
|
||||
//! Write the flags, the subshapes.
|
||||
Standard_EXPORT virtual void Write (Standard_OStream& OS);
|
||||
|
||||
//! Reads the content of me from the stream <IS>. me
|
||||
//! is first cleared.
|
||||
//!
|
||||
//! Reads the locations.
|
||||
//!
|
||||
//! Reads the geometry calling ReadGeometry.
|
||||
//!
|
||||
//! Reads the shapes.
|
||||
//! For each shape
|
||||
//! Reads the type.
|
||||
//! calls ReadGeometry(T,S).
|
||||
//! Reads the flag, the subshapes.
|
||||
Standard_EXPORT virtual void Read (Standard_IStream& IS);
|
||||
|
||||
//! Dumps on <OS> the shape <S>. Dumps the
|
||||
//! orientation, the index of the TShape and the index
|
||||
//! of the Location.
|
||||
Standard_EXPORT void Dump (const TopoDS_Shape& S, Standard_OStream& OS) const;
|
||||
|
||||
//! Writes on <OS> the shape <S>. Writes the
|
||||
//! orientation, the index of the TShape and the index
|
||||
//! of the Location.
|
||||
Standard_EXPORT void Write (const TopoDS_Shape& S, Standard_OStream& OS) const;
|
||||
|
||||
//! Reads from <IS> a shape and returns it in S.
|
||||
Standard_EXPORT void Read (TopoDS_Shape& S, Standard_IStream& IS) const;
|
||||
|
||||
//! Stores the geometry of <S>.
|
||||
Standard_EXPORT virtual void AddGeometry (const TopoDS_Shape& S);
|
||||
|
||||
//! Dumps the geometry of me on the stream <OS>.
|
||||
Standard_EXPORT virtual void DumpGeometry (Standard_OStream& OS) const;
|
||||
|
||||
//! Writes the geometry of me on the stream <OS> in a
|
||||
//! format that can be read back by Read.
|
||||
Standard_EXPORT virtual void WriteGeometry (Standard_OStream& OS);
|
||||
|
||||
//! Reads the geometry of me from the stream <IS>.
|
||||
Standard_EXPORT virtual void ReadGeometry (Standard_IStream& IS);
|
||||
|
||||
//! Dumps the geometry of <S> on the stream <OS>.
|
||||
Standard_EXPORT virtual void DumpGeometry (const TopoDS_Shape& S, Standard_OStream& OS) const;
|
||||
|
||||
//! Writes the geometry of <S> on the stream <OS> in a
|
||||
//! format that can be read back by Read.
|
||||
Standard_EXPORT virtual void WriteGeometry (const TopoDS_Shape& S, Standard_OStream& OS) const;
|
||||
|
||||
//! Reads the geometry of a shape of type <T> from the
|
||||
//! stream <IS> and returns it in <S>.
|
||||
Standard_EXPORT virtual void ReadGeometry (const TopAbs_ShapeEnum T, Standard_IStream& IS, TopoDS_Shape& S);
|
||||
|
||||
//! Inserts the shape <S2> in the shape <S1>. This
|
||||
//! method must be redefined to use the correct
|
||||
//! builder.
|
||||
Standard_EXPORT virtual void AddShapes (TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
//! This method is called after each new completed
|
||||
//! shape. <T> is the type. <S> is the shape. In this
|
||||
//! class it does nothing, but it gives the opportunity
|
||||
//! in derived classes to perform extra treatment on
|
||||
//! shapes.
|
||||
Standard_EXPORT virtual void Check (const TopAbs_ShapeEnum T, TopoDS_Shape& S);
|
||||
|
||||
//! Returns number of shapes read from file.
|
||||
Standard_EXPORT Standard_Integer NbShapes() const;
|
||||
|
||||
Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& PR);
|
||||
|
||||
Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Reads from <IS> a shape and returns it in S.
|
||||
//! <NbShapes> is the number of tshapes in the set.
|
||||
Standard_EXPORT void Read (TopoDS_Shape& S, Standard_IStream& IS, const Standard_Integer NbShapes) const;
|
||||
|
||||
|
||||
TopTools_IndexedMapOfShape myShapes;
|
||||
TopTools_LocationSet myLocations;
|
||||
Standard_Integer myFormatNb;
|
||||
Handle(Message_ProgressIndicator) myProgress;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTools_ShapeSet_HeaderFile
|
Reference in New Issue
Block a user