![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Tool for edit structure of document. More...
#include <XCAFDoc_Editor.hxx>
Static Public Member Functions | |
| static bool | Expand (const TDF_Label &theDoc, const TDF_Label &theShape, const bool theRecursively=true) |
| Converts shape (compound/compsolid/shell/wire) to assembly. | |
| static bool | Expand (const TDF_Label &theDoc, const bool theRecursively=true) |
| Converts all compounds shapes in the document to assembly. | |
| static bool | Extract (const NCollection_Sequence< TDF_Label > &theSrcLabels, const TDF_Label &theDstLabel, const bool theIsNoVisMat=false) |
| Clones all labels to a new position, keeping the structure with all the attributes. | |
| static bool | Extract (const TDF_Label &theSrcLabel, const TDF_Label &theDstLabel, const bool theIsNoVisMat=false) |
| Clones the label to a new position, keeping the structure with all the attributes. | |
| static TDF_Label | CloneShapeLabel (const TDF_Label &theSrcLabel, const occ::handle< XCAFDoc_ShapeTool > &theSrcShapeTool, const occ::handle< XCAFDoc_ShapeTool > &theDstShapeTool, NCollection_DataMap< TDF_Label, TDF_Label > &theMap) |
| Copies shapes label with keeping of shape structure (recursively) | |
| static void | CloneMetaData (const TDF_Label &theSrcLabel, const TDF_Label &theDstLabel, NCollection_DataMap< occ::handle< XCAFDoc_VisMaterial >, occ::handle< XCAFDoc_VisMaterial > > *theVisMatMap, const bool theToCopyColor=true, const bool theToCopyLayer=true, const bool theToCopyMaterial=true, const bool theToCopyVisMaterial=true, const bool theToCopyAttributes=true) |
| Copies metadata contains from the source label to the destination label. Protected against creating a new label for non-existent tools. | |
| static void | GetParentShapeLabels (const TDF_Label &theLabel, NCollection_Map< TDF_Label > &theRelatedLabels) |
| Gets shape labels that has down relation with the input label. | |
| static void | GetChildShapeLabels (const TDF_Label &theLabel, NCollection_Map< TDF_Label > &theRelatedLabels) |
| Gets shape labels that has up relation with the input label. | |
| static bool | FilterShapeTree (const occ::handle< XCAFDoc_ShapeTool > &theShapeTool, const NCollection_Map< TDF_Label > &theLabelsToKeep) |
| Filters original shape tree with keeping structure. The result will include the full label hierarchy lower then input labels. Any higher hierarchy labels will be filtered to keep only necessary labels. All not related shape labels with input will be cleared (all attributes will be removed). | |
| static bool | RescaleGeometry (const TDF_Label &theLabel, const double theScaleFactor, const bool theForceIfNotRoot=false) |
| Applies geometrical scaling to the following assembly components: | |
Tool for edit structure of document.
|
static |
Copies metadata contains from the source label to the destination label. Protected against creating a new label for non-existent tools.
| [in] | theSrcLabel | original label to copy from |
| [in] | theDstLabel | destination shape label to set attributes |
| [in] | theVisMatMap | relating map of the original VisMaterial and created. Can be NULL for the same document |
| [in] | theToCopyColor | copying visible value and shape color (handled all color type) |
| [in] | theToCopyLayer | copying layer |
| [in] | theToCopyMaterial | copying material |
| [in] | theToCopyVisMaterial | copying visual material |
| [in] | theToCopyAttributes | copying of other node attributes, for example, a shape's property |
|
static |
Copies shapes label with keeping of shape structure (recursively)
| [in] | theSrcLabel | original label to copy from |
| [in] | theSrcShapeTool | shape tool to get |
| [in] | theDstShapeTool | shape tool to set |
| [out] | theMap | relating map of the original shapes label and labels created from them |
|
static |
Converts all compounds shapes in the document to assembly.
| [in] | theDoc | input document |
| [in] | theRecursively | recursively expand a compound subshape |
|
static |
Converts shape (compound/compsolid/shell/wire) to assembly.
| [in] | theDoc | input document |
| [in] | theShape | input shape label |
| [in] | theRecursively | recursively expand a compound subshape |
|
static |
Clones all labels to a new position, keeping the structure with all the attributes.
| [in] | theSrcLabels | original labels to copy from |
| [in] | theDstLabel | label to set result as a component of or a main document's label to simply set new shape |
| [in] | theIsNoVisMat | get a VisMaterial attributes as is or convert to color |
|
static |
Clones the label to a new position, keeping the structure with all the attributes.
| [in] | theSrcLabel | original label to copy from |
| [in] | theDstLabel | label to set result as a component of or a main document's label to simply set new shape |
| [in] | theIsNoVisMat | get a VisMaterial attributes as is or convert to color |
|
static |
Filters original shape tree with keeping structure. The result will include the full label hierarchy lower then input labels. Any higher hierarchy labels will be filtered to keep only necessary labels. All not related shape labels with input will be cleared (all attributes will be removed).
The result impact directly into original document and existed shape labels. Attributes related to removed shape can became invalide. For example, GDT with relation on removed shape label(s) and without attachment point(s) became invalid for visualization.
| [in] | theShapeTool | shape tool to extract from |
| [in] | theLabelsToKeep | labels to keep |
|
static |
Gets shape labels that has up relation with the input label.
| [in] | theLabel | input label |
| [out] | theRelatedLabels | output labels |
|
static |
Gets shape labels that has down relation with the input label.
| [in] | theLabel | input label |
| [out] | theRelatedLabels | output labels |
|
static |
Applies geometrical scaling to the following assembly components:
| [in] | theLabel | starting label |
| [in] | theScaleFactor | scale factor, should be positive |
| [in] | theForceIfNotRoot | allows scaling of a non root assembly if true, otherwise - returns false |