1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,4 +1,12 @@
XSDRAWSTLVRML_ElemNodesMap.hxx
XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx
XSDRAWSTLVRML.cxx
XSDRAWSTLVRML.hxx
XSDRAWSTLVRML_CoordsMap.hxx
XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx
XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx
XSDRAWSTLVRML_DataSource.cxx
XSDRAWSTLVRML_DataSource.hxx
XSDRAWSTLVRML_DataSource3D.cxx
XSDRAWSTLVRML_DataSource3D.hxx
XSDRAWSTLVRML_DrawableMesh.cxx
XSDRAWSTLVRML_DrawableMesh.hxx
XSDRAWSTLVRML_ElemNodesMap.hxx

View File

@@ -1,44 +0,0 @@
-- Created on: 2000-05-30
-- Created by: Sergey MOZOKHIN
-- 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.
package XSDRAWSTLVRML
---Purpose:
uses Draw, MeshVS, StlMesh, TColStd, TCollection, Standard, TopoDS
is
class DataSource;
class DataSource3D;
class DrawableMesh;
imported ElemNodesMap;
imported DataMapIteratorOfElemNodesMap;
imported CoordsMap;
imported DataMapIteratorOfCoordsMap;
InitCommands (theCommands : in out Interpretor from Draw);
---Purpose : Inits commands for writing to STL and VRML formats
Factory (theDI : out Interpretor from Draw);
---Purpose: Loads all Draw commands of TKXSDRAW. Used for plugin.
end XSDRAWSTLVRML;

View File

@@ -13,68 +13,61 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <XSDRAWSTLVRML.ixx>
#include <Draw_Interpretor.hxx>
#include <TopoDS_Shape.hxx>
#include <VrmlAPI.hxx>
#include <OSD_Path.hxx>
#include <StlAPI.hxx>
#include <XSDRAW.hxx>
#include <DBRep.hxx>
#include <VrmlAPI_Writer.hxx>
#include <Quantity_Color.hxx>
#include <Quantity_HArray1OfColor.hxx>
#include <StlAPI_Writer.hxx>
#include <Draw_PluginMacro.hxx>
#include <XSDRAW.hxx>
#include <XSDRAWSTEP.hxx>
#include <XSDRAWIGES.hxx>
#include <AIS_InteractiveContext.hxx>
#include <ViewerTest.hxx>
#include <Draw.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <RWStl.hxx>
#include <Quantity_Color.hxx>
#include <V3d_View.hxx>
#include <TCollection_AsciiString.hxx>
#include <SelectMgr_SelectionManager.hxx>
#include <StdSelect_ViewerSelector3d.hxx>
#include <Aspect_TypeOfMarker.hxx>
#include <Bnd_Box.hxx>
#include <DBRep.hxx>
#include <Draw.hxx>
#include <Draw_Interpretor.hxx>
#include <Draw_PluginMacro.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Graphic3d_MaterialAspect.hxx>
#include <StlMesh_Mesh.hxx>
#include <StlMesh_SequenceOfMeshTriangle.hxx>
#include <MeshVS_Mesh.hxx>
#include <MeshVS_MeshPrsBuilder.hxx>
#include <MeshVS_TextPrsBuilder.hxx>
#include <MeshVS_DataMapOfIntegerAsciiString.hxx>
#include <MeshVS_DeformedDataSource.hxx>
#include <MeshVS_Drawer.hxx>
#include <MeshVS_DrawerAttribute.hxx>
#include <MeshVS_MeshEntityOwner.hxx>
#include <MeshVS_DataMapOfIntegerAsciiString.hxx>
#include <MeshVS_NodalColorPrsBuilder.hxx>
#include <MeshVS_ElementalColorPrsBuilder.hxx>
#include <MeshVS_Mesh.hxx>
#include <MeshVS_MeshEntityOwner.hxx>
#include <MeshVS_MeshPrsBuilder.hxx>
#include <MeshVS_NodalColorPrsBuilder.hxx>
#include <MeshVS_PrsBuilder.hxx>
#include <MeshVS_TextPrsBuilder.hxx>
#include <MeshVS_VectorPrsBuilder.hxx>
#include <MeshVS_DeformedDataSource.hxx>
#include <OSD_Path.hxx>
#include <Quantity_Color.hxx>
#include <Quantity_HArray1OfColor.hxx>
#include <Quantity_NameOfColor.hxx>
#include <RWStl.hxx>
#include <SelectMgr_SelectionManager.hxx>
#include <Standard_ErrorHandler.hxx>
#include <StdSelect_ViewerSelector3d.hxx>
#include <StlAPI.hxx>
#include <StlAPI_Writer.hxx>
#include <StlMesh_Mesh.hxx>
#include <StlMesh_SequenceOfMeshTriangle.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <TCollection_AsciiString.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HPackedMapOfInteger.hxx>
#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
#include <TopoDS_Shape.hxx>
#include <V3d_View.hxx>
#include <ViewerTest.hxx>
#include <VrmlAPI.hxx>
#include <VrmlAPI_Writer.hxx>
#include <VrmlData_DataMapOfShapeAppearance.hxx>
#include <VrmlData_Scene.hxx>
#include <VrmlData_ShapeConvert.hxx>
#include <XSDRAW.hxx>
#include <XSDRAWIGES.hxx>
#include <XSDRAWSTEP.hxx>
#include <XSDRAWSTLVRML.hxx>
#include <XSDRAWSTLVRML_DataSource.hxx>
#include <XSDRAWSTLVRML_DataSource3D.hxx>
#include <XSDRAWSTLVRML_DrawableMesh.hxx>
#include <Quantity_NameOfColor.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <TColStd_HPackedMapOfInteger.hxx>
#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
#include <Standard_ErrorHandler.hxx>
#include <VrmlData_Scene.hxx>
#include <VrmlData_ShapeConvert.hxx>
#include <VrmlData_DataMapOfShapeAppearance.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Bnd_Box.hxx>
#include <MeshVS_PrsBuilder.hxx>
// avoid warnings on 'extern "C"' functions returning C++ classes
#ifdef WNT
#pragma warning(4:4190)

View File

@@ -0,0 +1,69 @@
// Created on: 2000-05-30
// Created by: Sergey MOZOKHIN
// 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.
#ifndef _XSDRAWSTLVRML_HeaderFile
#define _XSDRAWSTLVRML_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Draw_Interpretor.hxx>
class XSDRAWSTLVRML_DataSource;
class XSDRAWSTLVRML_DataSource3D;
class XSDRAWSTLVRML_DrawableMesh;
class XSDRAWSTLVRML
{
public:
DEFINE_STANDARD_ALLOC
//! Inits commands for writing to STL and VRML formats
Standard_EXPORT static void InitCommands (Draw_Interpretor& theCommands);
//! Loads all Draw commands of TKXSDRAW. Used for plugin.
Standard_EXPORT static void Factory (Draw_Interpretor& theDI);
protected:
private:
friend class XSDRAWSTLVRML_DataSource;
friend class XSDRAWSTLVRML_DataSource3D;
friend class XSDRAWSTLVRML_DrawableMesh;
};
#endif // _XSDRAWSTLVRML_HeaderFile

View File

@@ -1,88 +0,0 @@
-- Created on: 2004-06-10
-- Created by: Alexander SOLOVYOV
-- Copyright (c) 2004-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 DataSource from XSDRAWSTLVRML inherits DataSource from MeshVS
---Purpose: The sample DataSource for working with STLMesh_Mesh
uses
Mesh from StlMesh,
Integer from Standard,
Boolean from Standard,
Address from Standard,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
SequenceOfInteger from TColStd,
PackedMapOfInteger from TColStd,
EntityType from MeshVS,
HArray2OfInteger from TColStd,
HArray2OfReal from TColStd
is
Create ( aMesh : Mesh from StlMesh ) returns DataSource from XSDRAWSTLVRML;
---Purpose: Constructor
GetGeom ( me; ID : Integer;
IsElement : Boolean;
Coords : out Array1OfReal;
NbNodes : out Integer;
Type : out EntityType ) returns Boolean;
---Purpose: Returns geometry information about node ( if IsElement is False ) or element ( IsElement is True )
-- by co-ordinates. For element this method must return all its nodes co-ordinates in the strict order: X, Y, Z and
-- with nodes order is the same as in wire bounding the face or link. NbNodes is number of nodes of element.
-- It is recommended to return 1 for node. Type is an element type.
GetGeomType ( me; ID : Integer;
IsElement : Boolean;
Type : out EntityType ) returns Boolean;
---Purpose: This method is similar to GetGeom, but returns only element or node type. This method is provided for
-- a fine performance.
GetAddr ( me; ID : Integer;
IsElement : Boolean ) returns Address;
---Purpose: This method returns by number an address of any entity which represents element or node data structure.
GetNodesByElement ( me; ID : Integer;
NodeIDs : out Array1OfInteger from TColStd;
NbNodes : out Integer ) returns Boolean is redefined;
---Purpose: This method returns information about what node this element consist of.
GetAllNodes ( me ) returns PackedMapOfInteger;
---C++: return const &
---Purpose: This method returns map of all nodes the object consist of.
GetAllElements ( me ) returns PackedMapOfInteger;
---C++: return const &
---Purpose: This method returns map of all elements the object consist of.
GetNormal ( me; Id : Integer; Max : Integer;
nx, ny, nz : out Real ) returns Boolean is redefined virtual;
---Purpose: This method calculates normal of face, which is using for correct reflection presentation.
-- There is default method, for advance reflection this method can be redefined.
fields
myMesh : Mesh from StlMesh;
myNodes : PackedMapOfInteger from TColStd;
myElements : PackedMapOfInteger from TColStd;
myElemNodes : HArray2OfInteger from TColStd;
myNodeCoords, myElemNormals : HArray2OfReal from TColStd;
end DataSource;

View File

@@ -13,13 +13,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <XSDRAWSTLVRML_DataSource.ixx>
#include <StlMesh_SequenceOfMeshTriangle.hxx>
#include <Standard_Type.hxx>
#include <StlMesh_Mesh.hxx>
#include <StlMesh_MeshTriangle.hxx>
#include <StlMesh_SequenceOfMeshTriangle.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <TColStd_DataMapOfIntegerReal.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TColStd_DataMapOfIntegerReal.hxx>
#include <XSDRAWSTLVRML_DataSource.hxx>
//================================================================
// Function : Constructor

View File

@@ -0,0 +1,104 @@
// Created on: 2004-06-10
// Created by: Alexander SOLOVYOV
// Copyright (c) 2004-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 _XSDRAWSTLVRML_DataSource_HeaderFile
#define _XSDRAWSTLVRML_DataSource_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <MeshVS_DataSource.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <MeshVS_EntityType.hxx>
#include <Standard_Address.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_Real.hxx>
class StlMesh_Mesh;
class XSDRAWSTLVRML_DataSource;
DEFINE_STANDARD_HANDLE(XSDRAWSTLVRML_DataSource, MeshVS_DataSource)
//! The sample DataSource for working with STLMesh_Mesh
class XSDRAWSTLVRML_DataSource : public MeshVS_DataSource
{
public:
//! Constructor
Standard_EXPORT XSDRAWSTLVRML_DataSource(const Handle(StlMesh_Mesh)& aMesh);
//! Returns geometry information about node ( if IsElement is False ) or element ( IsElement is True )
//! by co-ordinates. For element this method must return all its nodes co-ordinates in the strict order: X, Y, Z and
//! with nodes order is the same as in wire bounding the face or link. NbNodes is number of nodes of element.
//! It is recommended to return 1 for node. Type is an element type.
Standard_EXPORT Standard_Boolean GetGeom (const Standard_Integer ID, const Standard_Boolean IsElement, TColStd_Array1OfReal& Coords, Standard_Integer& NbNodes, MeshVS_EntityType& Type) const;
//! This method is similar to GetGeom, but returns only element or node type. This method is provided for
//! a fine performance.
Standard_EXPORT Standard_Boolean GetGeomType (const Standard_Integer ID, const Standard_Boolean IsElement, MeshVS_EntityType& Type) const;
//! This method returns by number an address of any entity which represents element or node data structure.
Standard_EXPORT Standard_Address GetAddr (const Standard_Integer ID, const Standard_Boolean IsElement) const;
//! This method returns information about what node this element consist of.
Standard_EXPORT virtual Standard_Boolean GetNodesByElement (const Standard_Integer ID, TColStd_Array1OfInteger& NodeIDs, Standard_Integer& NbNodes) const Standard_OVERRIDE;
//! This method returns map of all nodes the object consist of.
Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllNodes() const;
//! This method returns map of all elements the object consist of.
Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllElements() const;
//! This method calculates normal of face, which is using for correct reflection presentation.
//! There is default method, for advance reflection this method can be redefined.
Standard_EXPORT virtual Standard_Boolean GetNormal (const Standard_Integer Id, const Standard_Integer Max, Standard_Real& nx, Standard_Real& ny, Standard_Real& nz) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(XSDRAWSTLVRML_DataSource,MeshVS_DataSource)
protected:
private:
Handle(StlMesh_Mesh) myMesh;
TColStd_PackedMapOfInteger myNodes;
TColStd_PackedMapOfInteger myElements;
Handle(TColStd_HArray2OfInteger) myElemNodes;
Handle(TColStd_HArray2OfReal) myNodeCoords;
Handle(TColStd_HArray2OfReal) myElemNormals;
};
#endif // _XSDRAWSTLVRML_DataSource_HeaderFile

View File

@@ -1,98 +0,0 @@
-- Created on: 2014-08-04
-- Created by: Artem NOVIKOV
-- Copyright (c) 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 DataSource3D from XSDRAWSTLVRML inherits DataSource from MeshVS
---Purpose: The sample DataSource3D for working with STLMesh_Mesh
uses
Mesh from StlMesh,
Integer from Standard,
Boolean from Standard,
Address from Standard,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
SequenceOfInteger from TColStd,
PackedMapOfInteger from TColStd,
EntityType from MeshVS,
HArray1OfInteger from TColStd,
HArray2OfInteger from TColStd,
HArray2OfReal from TColStd,
HArray1OfSequenceOfInteger from MeshVS,
DataMapOfHArray1OfSequenceOfInteger from MeshVS
is
Create returns DataSource3D from XSDRAWSTLVRML;
---Purpose: Constructor
GetGeom ( me; theID : Integer;
theIsElement : Boolean;
theCoords : out Array1OfReal;
theNbNodes : out Integer;
theType : out EntityType ) returns Boolean;
---Purpose: Returns geometry information about node ( if IsElement is False ) or element ( IsElement is True )
-- by co-ordinates. For element this method must return all its nodes co-ordinates in the strict order: X, Y, Z and
-- with nodes order is the same as in wire bounding the face or link. NbNodes is number of nodes of element.
-- It is recommended to return 1 for node. Type is an element type.
Get3DGeom ( me; theID : Integer;
theNbNodes : out Integer;
theData : out HArray1OfSequenceOfInteger from MeshVS ) returns Boolean is redefined virtual;
---Purpose: This method returns topology information about 3D-element
-- Returns false if element with ID isn't 3D or because other troubles
GetGeomType ( me; theID : Integer;
theIsElement : Boolean;
theType : out EntityType ) returns Boolean;
---Purpose: This method is similar to GetGeom, but returns only element or node type. This method is provided for
-- a fine performance.
GetAddr ( me; theID : Integer;
theIsElement : Boolean ) returns Address;
---Purpose: This method returns by number an address of any entity which represents element or node data structure.
GetNodesByElement ( me; theID : Integer;
theNodeIDs : out Array1OfInteger from TColStd;
theNbNodes : out Integer ) returns Boolean is redefined;
---Purpose: This method returns information about what node this element consist of.
GetAllNodes ( me ) returns PackedMapOfInteger;
---C++: return const &
---Purpose: This method returns map of all nodes the object consist of.
GetAllElements ( me ) returns PackedMapOfInteger;
---C++: return const &
---Purpose: This method returns map of all elements the object consist of.
GetNormal ( me; theID : Integer;
theMax : Integer;
theNx, theNy, theNz : out Real ) returns Boolean is redefined virtual;
---Purpose: This method calculates normal of face, which is using for correct reflection presentation.
-- There is default method, for advance reflection this method can be redefined.
fields
myNodes : PackedMapOfInteger from TColStd;
myElements : PackedMapOfInteger from TColStd;
myElemNbNodes : HArray1OfInteger from TColStd;
myNodeCoords : HArray2OfReal from TColStd;
myElemNodes : HArray2OfInteger from TColStd;
end DataSource3D;

View File

@@ -13,13 +13,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <XSDRAWSTLVRML_DataSource3D.ixx>
#include <StlMesh_SequenceOfMeshTriangle.hxx>
#include <Standard_Type.hxx>
#include <StlMesh_MeshTriangle.hxx>
#include <StlMesh_SequenceOfMeshTriangle.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <TColStd_DataMapOfIntegerReal.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TColStd_DataMapOfIntegerReal.hxx>
#include <XSDRAWSTLVRML_DataSource3D.hxx>
//================================================================
// Function : Constructor

View File

@@ -0,0 +1,108 @@
// Created on: 2014-08-04
// Created by: Artem NOVIKOV
// Copyright (c) 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 _XSDRAWSTLVRML_DataSource3D_HeaderFile
#define _XSDRAWSTLVRML_DataSource3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <MeshVS_DataSource.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <MeshVS_EntityType.hxx>
#include <MeshVS_HArray1OfSequenceOfInteger.hxx>
#include <Standard_Address.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_Real.hxx>
class XSDRAWSTLVRML_DataSource3D;
DEFINE_STANDARD_HANDLE(XSDRAWSTLVRML_DataSource3D, MeshVS_DataSource)
//! The sample DataSource3D for working with STLMesh_Mesh
class XSDRAWSTLVRML_DataSource3D : public MeshVS_DataSource
{
public:
//! Constructor
Standard_EXPORT XSDRAWSTLVRML_DataSource3D();
//! Returns geometry information about node ( if IsElement is False ) or element ( IsElement is True )
//! by co-ordinates. For element this method must return all its nodes co-ordinates in the strict order: X, Y, Z and
//! with nodes order is the same as in wire bounding the face or link. NbNodes is number of nodes of element.
//! It is recommended to return 1 for node. Type is an element type.
Standard_EXPORT Standard_Boolean GetGeom (const Standard_Integer theID, const Standard_Boolean theIsElement, TColStd_Array1OfReal& theCoords, Standard_Integer& theNbNodes, MeshVS_EntityType& theType) const;
//! This method returns topology information about 3D-element
//! Returns false if element with ID isn't 3D or because other troubles
Standard_EXPORT virtual Standard_Boolean Get3DGeom (const Standard_Integer theID, Standard_Integer& theNbNodes, Handle(MeshVS_HArray1OfSequenceOfInteger)& theData) const Standard_OVERRIDE;
//! This method is similar to GetGeom, but returns only element or node type. This method is provided for
//! a fine performance.
Standard_EXPORT Standard_Boolean GetGeomType (const Standard_Integer theID, const Standard_Boolean theIsElement, MeshVS_EntityType& theType) const;
//! This method returns by number an address of any entity which represents element or node data structure.
Standard_EXPORT Standard_Address GetAddr (const Standard_Integer theID, const Standard_Boolean theIsElement) const;
//! This method returns information about what node this element consist of.
Standard_EXPORT virtual Standard_Boolean GetNodesByElement (const Standard_Integer theID, TColStd_Array1OfInteger& theNodeIDs, Standard_Integer& theNbNodes) const Standard_OVERRIDE;
//! This method returns map of all nodes the object consist of.
Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllNodes() const;
//! This method returns map of all elements the object consist of.
Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllElements() const;
//! This method calculates normal of face, which is using for correct reflection presentation.
//! There is default method, for advance reflection this method can be redefined.
Standard_EXPORT virtual Standard_Boolean GetNormal (const Standard_Integer theID, const Standard_Integer theMax, Standard_Real& theNx, Standard_Real& theNy, Standard_Real& theNz) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(XSDRAWSTLVRML_DataSource3D,MeshVS_DataSource)
protected:
private:
TColStd_PackedMapOfInteger myNodes;
TColStd_PackedMapOfInteger myElements;
Handle(TColStd_HArray1OfInteger) myElemNbNodes;
Handle(TColStd_HArray2OfReal) myNodeCoords;
Handle(TColStd_HArray2OfInteger) myElemNodes;
};
#endif // _XSDRAWSTLVRML_DataSource3D_HeaderFile

View File

@@ -1,32 +0,0 @@
-- Created on: 2004-06-11
-- Created by: Alexander SOLOVYOV
-- Copyright (c) 2004-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 DrawableMesh from XSDRAWSTLVRML inherits Drawable3D from Draw
---Purpose:
uses
Display from Draw,
Mesh from MeshVS
is
Create ( aMesh : Mesh from MeshVS ) returns DrawableMesh from XSDRAWSTLVRML;
DrawOn(me; dis : in out Display) is redefined virtual;
GetMesh( me ) returns Mesh;
fields
myMesh : Mesh;
end DrawableMesh;

View File

@@ -13,7 +13,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <XSDRAWSTLVRML_DrawableMesh.ixx>
#include <Draw_Display.hxx>
#include <MeshVS_Mesh.hxx>
#include <Standard_Type.hxx>
#include <XSDRAWSTLVRML_DrawableMesh.hxx>
//================================================================
// Function : DrawOn

View File

@@ -0,0 +1,67 @@
// Created on: 2004-06-11
// Created by: Alexander SOLOVYOV
// Copyright (c) 2004-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 _XSDRAWSTLVRML_DrawableMesh_HeaderFile
#define _XSDRAWSTLVRML_DrawableMesh_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Draw_Drawable3D.hxx>
class MeshVS_Mesh;
class Draw_Display;
class XSDRAWSTLVRML_DrawableMesh;
DEFINE_STANDARD_HANDLE(XSDRAWSTLVRML_DrawableMesh, Draw_Drawable3D)
class XSDRAWSTLVRML_DrawableMesh : public Draw_Drawable3D
{
public:
Standard_EXPORT XSDRAWSTLVRML_DrawableMesh(const Handle(MeshVS_Mesh)& aMesh);
Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
Standard_EXPORT Handle(MeshVS_Mesh) GetMesh() const;
DEFINE_STANDARD_RTTI(XSDRAWSTLVRML_DrawableMesh,Draw_Drawable3D)
protected:
private:
Handle(MeshVS_Mesh) myMesh;
};
#endif // _XSDRAWSTLVRML_DrawableMesh_HeaderFile