1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -0,0 +1,72 @@
// Created on: 2017-02-13
// Created by: Sergey NIKONOV
// Copyright (c) 2000-2017 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 _XCAFDoc_NoteComment_HeaderFile
#define _XCAFDoc_NoteComment_HeaderFile
#include <XCAFDoc_Note.hxx>
class XCAFDoc_NoteComment;
DEFINE_STANDARD_HANDLE(XCAFDoc_NoteComment, XCAFDoc_Note)
//! A comment note attribute.
//! Contains a textual comment.
class XCAFDoc_NoteComment : public XCAFDoc_Note
{
public:
DEFINE_STANDARD_RTTIEXT(XCAFDoc_NoteComment, XCAFDoc_Note)
Standard_EXPORT static const Standard_GUID& GetID();
//! Finds a reference attribute on the given label and returns it, if it is found
Standard_EXPORT static Handle(XCAFDoc_NoteComment) Get(const TDF_Label& theLabel);
//! Create (if not exist) a comment note on the given label.
//! \param [in] theLabel - note label.
//! \param [in] theUserName - the name of the user, who created the note.
//! \param [in] theTimeStamp - creation timestamp of the note.
//! \param [in] theComment - comment text.
Standard_EXPORT static Handle(XCAFDoc_NoteComment) Set(const TDF_Label& theLabel,
const TCollection_ExtendedString& theUserName,
const TCollection_ExtendedString& theTimeStamp,
const TCollection_ExtendedString& theComment);
//! Creates an empty comment note.
Standard_EXPORT XCAFDoc_NoteComment();
//! Sets the comment text.
Standard_EXPORT void Set(const TCollection_ExtendedString& theComment);
//! Returns the comment text.
Standard_EXPORT const TCollection_ExtendedString& Comment() const;
public:
// Overrides TDF_Attribute virtuals
Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& theAttrFrom) Standard_OVERRIDE;
Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theAttrInto,
const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const Standard_OVERRIDE;
protected:
TCollection_ExtendedString myComment; ///< Comment text.
};
#endif // _XCAFDoc_NoteComment_HeaderFile