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

0028985: XCAF data structures for generic text annotations linked to GD&T annotations and saved views

1. A tool to annotate items in the hierarchical product structure was added. The tool is located under
   fixed label 0:1:9. It operates two basic entities: notes and annotations located under 0:1:9:1 and 0:1:9:2
   hives correspondingly. A note is an attribute derived from base class XCAFDoc_Note that is attached to a separate
   label under the notes hive. An annotated item is represented by XCAFDoc_AssemblyItemRef attribute
   attached to a separate label under the annotated items hive. Notes are linked to annotated items by means of
   XCAFDoc_GraphNode attribute, where notes play parent roles and annotated items - child roles.
2. XCAFDoc_AssemblyItemRef defines a weak reference to a label with optional attribute GUID or sub-shape index.
3. A capability to store note/annotation labels in XCAFDoc_ViewTool was added.
4. XDE User guide was updated
This commit is contained in:
snn
2017-02-10 15:48:36 +03:00
committed by bugmaster
parent 80070d4915
commit 024d6f7775
82 changed files with 7061 additions and 17 deletions

View File

@@ -30,6 +30,7 @@
#include <XCAFDoc_DocumentTool.hxx>
#include <XCAFDoc_LayerTool.hxx>
#include <XCAFDoc_MaterialTool.hxx>
#include <XCAFDoc_NotesTool.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <XCAFDoc_ViewTool.hxx>
@@ -83,6 +84,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_NotesTool::Set(NotesLabel(L));
XCAFDoc_ViewTool::Set(ViewsLabel(L));
XCAFDoc_ClippingPlaneTool::Set(ClippingPlanesLabel(L));
}
@@ -211,6 +213,18 @@ TDF_Label XCAFDoc_DocumentTool::ClippingPlanesLabel(const TDF_Label& acces)
return L;
}
//=======================================================================
//function : NotesLabel
//purpose :
//=======================================================================
TDF_Label XCAFDoc_DocumentTool::NotesLabel(const TDF_Label& acces)
{
TDF_Label L = DocLabel(acces).FindChild(9, Standard_True);
TDataStd_Name::Set(L, "Notes");
return L;
}
//=======================================================================
//function : ShapeTool
//purpose :
@@ -285,6 +299,16 @@ Handle(XCAFDoc_ClippingPlaneTool) XCAFDoc_DocumentTool::ClippingPlaneTool(const
return XCAFDoc_ClippingPlaneTool::Set(ClippingPlanesLabel(acces));
}
//=======================================================================
//function : ClippingPlaneTool
//purpose :
//=======================================================================
Handle(XCAFDoc_NotesTool) XCAFDoc_DocumentTool::NotesTool(const TDF_Label& acces)
{
return XCAFDoc_NotesTool::Set(NotesLabel(acces));
}
//=======================================================================
//function : ID
//purpose :