mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00: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,8 +1,14 @@
|
||||
XCAFPrs_AISObject.hxx
|
||||
XCAFPrs.cxx
|
||||
XCAFPrs.hxx
|
||||
XCAFPrs_AISObject.cxx
|
||||
XCAFPrs_DataMapOfShapeStyle.hxx
|
||||
XCAFPrs_AISObject.hxx
|
||||
XCAFPrs_DataMapIteratorOfDataMapOfShapeStyle.hxx
|
||||
XCAFPrs_DataMapOfStyleShape.hxx
|
||||
XCAFPrs_DataMapIteratorOfDataMapOfStyleShape.hxx
|
||||
XCAFPrs_DataMapOfStyleTransient.hxx
|
||||
XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient.hxx
|
||||
XCAFPrs_DataMapOfShapeStyle.hxx
|
||||
XCAFPrs_DataMapOfStyleShape.hxx
|
||||
XCAFPrs_DataMapOfStyleTransient.hxx
|
||||
XCAFPrs_Driver.cxx
|
||||
XCAFPrs_Driver.hxx
|
||||
XCAFPrs_Style.cxx
|
||||
XCAFPrs_Style.hxx
|
||||
|
@@ -1,74 +0,0 @@
|
||||
-- Created on: 2000-08-11
|
||||
-- Created by: Andrey BETENEV
|
||||
-- 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 XCAFPrs
|
||||
|
||||
---Purpose: Presentation (visualiation, selection etc.) tools for
|
||||
-- DECAF documents
|
||||
|
||||
uses
|
||||
Quantity,
|
||||
TCollection,
|
||||
TopAbs,
|
||||
TopLoc,
|
||||
TopoDS,
|
||||
TopTools,
|
||||
Graphic3d,
|
||||
Prs3d,
|
||||
PrsMgr,
|
||||
TPrsStd,
|
||||
AIS,
|
||||
TDF,
|
||||
XCAFDoc
|
||||
|
||||
is
|
||||
|
||||
class Driver;
|
||||
|
||||
imported AISObject;
|
||||
|
||||
class Style;
|
||||
|
||||
imported DataMapOfShapeStyle;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfShapeStyle;
|
||||
|
||||
imported DataMapOfStyleShape;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfStyleShape;
|
||||
|
||||
imported DataMapOfStyleTransient;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfStyleTransient;
|
||||
|
||||
---Methods: Work with styles of the document
|
||||
|
||||
CollectStyleSettings (L: Label from TDF;
|
||||
loc: Location from TopLoc;
|
||||
settings: in out DataMapOfShapeStyle from XCAFPrs);
|
||||
---Purpose: Collect styles defined for shape on label L
|
||||
-- and its components and subshapes and fills a map of
|
||||
-- shape - style correspondence
|
||||
-- The location <loc> is for internal use, it
|
||||
-- should be Null location for external call
|
||||
|
||||
SetViewNameMode ( viewNameMode: Boolean from Standard);
|
||||
|
||||
---Purpose: Set ViewNameMode for indicate display names or not.
|
||||
|
||||
GetViewNameMode returns Boolean;
|
||||
|
||||
|
||||
end XCAFPrs;
|
@@ -13,21 +13,24 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFPrs.ixx>
|
||||
#include <XCAFDoc_ShapeTool.hxx>
|
||||
#include <XCAFDoc_ColorTool.hxx>
|
||||
#include <TDF_LabelSequence.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <TColStd_HSequenceOfExtendedString.hxx>
|
||||
#include <TDF_AttributeSequence.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TDF_LabelSequence.hxx>
|
||||
#include <TopLoc_IndexedMapOfLocation.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <XCAFDoc_DocumentTool.hxx>
|
||||
#include <TColStd_HSequenceOfExtendedString.hxx>
|
||||
#include <XCAFDoc_LayerTool.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <TopLoc_IndexedMapOfLocation.hxx>
|
||||
#include <TDF_AttributeSequence.hxx>
|
||||
#include <XCAFDoc_ColorTool.hxx>
|
||||
#include <XCAFDoc_DocumentTool.hxx>
|
||||
#include <XCAFDoc_GraphNode.hxx>
|
||||
#include <XCAFDoc_LayerTool.hxx>
|
||||
#include <XCAFDoc_ShapeTool.hxx>
|
||||
#include <XCAFPrs.hxx>
|
||||
#include <XCAFPrs_Style.hxx>
|
||||
|
||||
static Standard_Boolean viewnameMode = Standard_False;
|
||||
|
77
src/XCAFPrs/XCAFPrs.hxx
Normal file
77
src/XCAFPrs/XCAFPrs.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 2000-08-11
|
||||
// Created by: Andrey BETENEV
|
||||
// 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 _XCAFPrs_HeaderFile
|
||||
#define _XCAFPrs_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <XCAFPrs_DataMapOfShapeStyle.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TDF_Label;
|
||||
class TopLoc_Location;
|
||||
class XCAFPrs_Driver;
|
||||
class XCAFPrs_Style;
|
||||
|
||||
|
||||
//! Presentation (visualiation, selection etc.) tools for
|
||||
//! DECAF documents
|
||||
class XCAFPrs
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Collect styles defined for shape on label L
|
||||
//! and its components and subshapes and fills a map of
|
||||
//! shape - style correspondence
|
||||
//! The location <loc> is for internal use, it
|
||||
//! should be Null location for external call
|
||||
Standard_EXPORT static void CollectStyleSettings (const TDF_Label& L, const TopLoc_Location& loc, XCAFPrs_DataMapOfShapeStyle& settings);
|
||||
|
||||
//! Set ViewNameMode for indicate display names or not.
|
||||
Standard_EXPORT static void SetViewNameMode (const Standard_Boolean viewNameMode);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean GetViewNameMode();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class XCAFPrs_Driver;
|
||||
friend class XCAFPrs_Style;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XCAFPrs_HeaderFile
|
@@ -1,36 +0,0 @@
|
||||
-- Created on: 2000-08-11
|
||||
-- Created by: data exchange team
|
||||
-- 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.
|
||||
|
||||
class Driver from XCAFPrs inherits Driver from TPrsStd
|
||||
|
||||
---Purpose: Implements a driver for presentation of shapes in DECAF
|
||||
-- document. Its the only purpose is to initialize and return
|
||||
-- XCAFPrs_AISObject object on request
|
||||
|
||||
uses
|
||||
Label from TDF,
|
||||
InteractiveObject from AIS
|
||||
|
||||
is
|
||||
|
||||
Update (me : mutable ; L : Label from TDF;
|
||||
ais : in out InteractiveObject from AIS)
|
||||
returns Boolean from Standard is redefined;
|
||||
|
||||
GetID (myclass) returns GUID;
|
||||
---Purpose: returns GUID of the driver
|
||||
---C++: return const &
|
||||
|
||||
end Driver;
|
@@ -13,18 +13,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFPrs_Driver.ixx>
|
||||
#include <XCAFPrs_AISObject.hxx>
|
||||
#include <XCAFDoc_ShapeTool.hxx>
|
||||
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
#include <Standard_GUID.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TDocStd_Document.hxx>
|
||||
#include <XCAFDoc_ShapeTool.hxx>
|
||||
#include <XCAFPrs_AISObject.hxx>
|
||||
#include <XCAFPrs_Driver.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Update
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean XCAFPrs_Driver::Update (const TDF_Label& L,
|
||||
Handle(AIS_InteractiveObject)& ais)
|
||||
|
||||
|
69
src/XCAFPrs/XCAFPrs_Driver.hxx
Normal file
69
src/XCAFPrs/XCAFPrs_Driver.hxx
Normal file
@@ -0,0 +1,69 @@
|
||||
// Created on: 2000-08-11
|
||||
// Created by: data exchange team
|
||||
// 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 _XCAFPrs_Driver_HeaderFile
|
||||
#define _XCAFPrs_Driver_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TPrsStd_Driver.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TDF_Label;
|
||||
class AIS_InteractiveObject;
|
||||
class Standard_GUID;
|
||||
|
||||
|
||||
class XCAFPrs_Driver;
|
||||
DEFINE_STANDARD_HANDLE(XCAFPrs_Driver, TPrsStd_Driver)
|
||||
|
||||
//! Implements a driver for presentation of shapes in DECAF
|
||||
//! document. Its the only purpose is to initialize and return
|
||||
//! XCAFPrs_AISObject object on request
|
||||
class XCAFPrs_Driver : public TPrsStd_Driver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& L, Handle(AIS_InteractiveObject)& ais) Standard_OVERRIDE;
|
||||
|
||||
//! returns GUID of the driver
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(XCAFPrs_Driver,TPrsStd_Driver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XCAFPrs_Driver_HeaderFile
|
@@ -1,73 +0,0 @@
|
||||
-- Created on: 2000-08-11
|
||||
-- Created by: Andrey BETENEV
|
||||
-- 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.
|
||||
|
||||
class Style from XCAFPrs
|
||||
|
||||
---Purpose: Represents a set of styling settings applicable to
|
||||
-- a (sub)shape
|
||||
|
||||
uses
|
||||
Color from Quantity
|
||||
|
||||
is
|
||||
|
||||
Create returns Style from XCAFPrs;
|
||||
|
||||
IsSetColorSurf (me) returns Boolean;
|
||||
GetColorSurf (me) returns Color from Quantity;
|
||||
SetColorSurf (me: in out; col: Color from Quantity);
|
||||
UnSetColorSurf (me: in out);
|
||||
---Purpose: Manage surface color setting
|
||||
|
||||
IsSetColorCurv (me) returns Boolean;
|
||||
GetColorCurv (me) returns Color from Quantity;
|
||||
SetColorCurv (me: in out; col: Color from Quantity);
|
||||
UnSetColorCurv (me: in out);
|
||||
---Purpose: Manage curve color setting
|
||||
|
||||
SetVisibility(me: in out; visibility: Boolean from Standard);
|
||||
IsVisible(me) returns Boolean;
|
||||
---Purpose: Manage visibility
|
||||
-- Note: Setting visibility to False makes colors undefined
|
||||
-- This is necessary for HashCode
|
||||
|
||||
IsEqual (me; other: Style from XCAFPrs) returns Boolean;
|
||||
---Purpose: Returs True if styles are the same
|
||||
---C++: alias operator ==
|
||||
|
||||
---Purpose: Methods for using Style as key in maps
|
||||
|
||||
HashCode(myclass; S : Style from XCAFPrs; Upper : Integer) returns Integer;
|
||||
---Purpose: Returns a HasCode value for the Key <K> in the
|
||||
-- range 0..Upper.
|
||||
|
||||
IsEqual(myclass; S1, S2 : Style from XCAFPrs) 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.
|
||||
|
||||
fields
|
||||
|
||||
-- defColor: Boolean;
|
||||
defColorSurf: Boolean;
|
||||
defColorCurv: Boolean;
|
||||
myVisibility: Boolean from Standard;
|
||||
|
||||
-- myColor: Color from Quantity;
|
||||
myColorSurf: Color from Quantity;
|
||||
myColorCurv: Color from Quantity;
|
||||
|
||||
|
||||
end Style;
|
@@ -13,13 +13,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XCAFPrs_Style.ixx>
|
||||
|
||||
#include <Quantity_Color.hxx>
|
||||
#include <XCAFPrs_Style.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XCAFPrs_Style
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
XCAFPrs_Style::XCAFPrs_Style () :
|
||||
defColorSurf(Standard_False),
|
||||
defColorCurv(Standard_False),
|
||||
|
110
src/XCAFPrs/XCAFPrs_Style.hxx
Normal file
110
src/XCAFPrs/XCAFPrs_Style.hxx
Normal file
@@ -0,0 +1,110 @@
|
||||
// Created on: 2000-08-11
|
||||
// Created by: Andrey BETENEV
|
||||
// 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 _XCAFPrs_Style_HeaderFile
|
||||
#define _XCAFPrs_Style_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Quantity_Color.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Quantity_Color;
|
||||
|
||||
|
||||
//! Represents a set of styling settings applicable to
|
||||
//! a (sub)shape
|
||||
class XCAFPrs_Style
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT XCAFPrs_Style();
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsSetColorSurf() const;
|
||||
|
||||
Standard_EXPORT Quantity_Color GetColorSurf() const;
|
||||
|
||||
Standard_EXPORT void SetColorSurf (const Quantity_Color& col);
|
||||
|
||||
//! Manage surface color setting
|
||||
Standard_EXPORT void UnSetColorSurf();
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsSetColorCurv() const;
|
||||
|
||||
Standard_EXPORT Quantity_Color GetColorCurv() const;
|
||||
|
||||
Standard_EXPORT void SetColorCurv (const Quantity_Color& col);
|
||||
|
||||
//! Manage curve color setting
|
||||
Standard_EXPORT void UnSetColorCurv();
|
||||
|
||||
Standard_EXPORT void SetVisibility (const Standard_Boolean visibility);
|
||||
|
||||
//! Manage visibility
|
||||
//! Note: Setting visibility to False makes colors undefined
|
||||
//! This is necessary for HashCode
|
||||
Standard_EXPORT Standard_Boolean IsVisible() const;
|
||||
|
||||
//! Returs True if styles are the same
|
||||
//! Methods for using Style as key in maps
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const XCAFPrs_Style& other) const;
|
||||
Standard_Boolean operator == (const XCAFPrs_Style& other) const
|
||||
{
|
||||
return IsEqual(other);
|
||||
}
|
||||
|
||||
//! Returns a HasCode value for the Key <K> in the
|
||||
//! range 0..Upper.
|
||||
Standard_EXPORT static Standard_Integer HashCode (const XCAFPrs_Style& 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.
|
||||
Standard_EXPORT static Standard_Boolean IsEqual (const XCAFPrs_Style& S1, const XCAFPrs_Style& S2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean defColorSurf;
|
||||
Standard_Boolean defColorCurv;
|
||||
Standard_Boolean myVisibility;
|
||||
Quantity_Color myColorSurf;
|
||||
Quantity_Color myColorCurv;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XCAFPrs_Style_HeaderFile
|
Reference in New Issue
Block a user