1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0028044: Data Exchange - implement data structures for Saved Views

Add new root label in Document for Views.
Add new attribute to store View in XDE.
Add object and tool to process Views.
Add new Draw commands for Views.
This commit is contained in:
ika
2016-10-19 18:31:56 +03:00
committed by apn
parent 61887a4ade
commit 2df785d7f1
32 changed files with 2774 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
#include <XCAFDoc_LayerTool.hxx>
#include <XCAFDoc_MaterialTool.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <XCAFDoc_ViewTool.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_DocumentTool,TDF_Attribute)
@@ -81,6 +82,7 @@ Handle(XCAFDoc_DocumentTool) XCAFDoc_DocumentTool::Set(const TDF_Label& L,
XCAFDoc_LayerTool::Set(LayersLabel(L));
XCAFDoc_DimTolTool::Set(DGTsLabel(L));
XCAFDoc_MaterialTool::Set(MaterialsLabel(L));
XCAFDoc_ViewTool::Set(ViewsLabel(L));
}
return A;
}
@@ -183,6 +185,19 @@ TDF_Label XCAFDoc_DocumentTool::MaterialsLabel(const TDF_Label& acces)
}
//=======================================================================
//function : ViewsLabel
//purpose :
//=======================================================================
TDF_Label XCAFDoc_DocumentTool::ViewsLabel(const TDF_Label& acces)
{
TDF_Label L = DocLabel(acces).FindChild(7, Standard_True);
TDataStd_Name::Set(L, "Views");
return L;
}
//=======================================================================
//function : ShapeTool
//purpose :
@@ -237,6 +252,16 @@ Handle(XCAFDoc_MaterialTool) XCAFDoc_DocumentTool::MaterialTool(const TDF_Label&
return XCAFDoc_MaterialTool::Set(MaterialsLabel(acces));
}
//=======================================================================
//function : ViewTool
//purpose :
//=======================================================================
Handle(XCAFDoc_ViewTool) XCAFDoc_DocumentTool::ViewTool(const TDF_Label& acces)
{
return XCAFDoc_ViewTool::Set(ViewsLabel(acces));
}
//=======================================================================
//function : ID