TNaming
OCCT package TNaming: TNaming, TNaming_Builder, TNaming_CopyShape, TNaming_DeltaOnModification, and 22 more bound classes.
TNaming
A topological attribute can be seen as a hook into the topological structure. To this hook, data can be attached and references defined. It is used for keeping and access to topological objects and their evolution. All topological objects are stored in the one user-protected TNaming_UsedShapes attribute at the root label of the data framework. This attribute contains map with all topological shapes, used in this document. To all other labels TNaming_NamedShape attribute can be added.
This attribute contains references (hooks) to shapes from the TNaming_UsedShapes attribute and evolution of these shapes. TNaming_NamedShape attribute contains a set of pairs of hooks: old shape and new shape (see the figure below).
It allows not only get the topological shapes by the labels, but also trace evolution of the shapes and correctly resolve dependent shapes by the changed one. If shape is just-created, then the old shape for accorded named shape is an empty shape. If a shape is deleted, then the new shape in this named shape is empty. Different algorithms may dispose sub-shapes of the result shape at the individual label depending on necessity:
- If a sub-shape must have some extra attributes (material of each face or color of each edge). In this case a specific sub-shape is placed to the separate label (usually, sub-label of the result shape label) with all attributes of this sub-shape.
- If topological naming is needed, a necessary and sufficient (for selected sub-shapes identification) set of sub-shapes is placed to the child labels of the result shape label. As usual, as far as basic solids and closed shells are concerned, all faces of the shape are disposed. Edges and vertices sub-shapes can be identified as intersection of contiguous faces.
Modified/generated shapes may be placed to one named shape and identified as this named shape and source named shape that also can be identified with used algorithms.TNaming_NamedShapemay contain a few pairs of hooks with the same evolution. In this case topology shape, which belongs to the named shape, is a compound of new shapes. The data model contains both the topology and the hooks, and functions handle both topological entities and hooks. Consider the case of a box function, which creates a solid with six faces and six hooks. Each hook is attached to a face. If you want, you can also have this function create hooks for edges and vertices as well as for faces. For the sake of simplicity though, let's limit the example.
Not all functions can define explicit hooks for all topological entities they create, but all topological entities can be turned into hooks when necessary. This is where topological naming is necessary.
Constructors(1)
Static methods(14)
- Substitute(labelsource: TDF_Label, labelcible: TDF_Label, mapOldNew: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): void
Subtituter les shapes sur les structures de source vers cible.
Parameters (3)labelsourcelabelciblemapOldNew—Mutated in place; read the updated value from this argument after the call.
- Update(label: TDF_Label, mapOldNew: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): void
Mise a jour des shapes du label et de ses fils en tenant compte des substitutions decrite par mapOldNew.
Warning: le remplacement du shape est fait dans tous les attributs qui le contiennent meme si ceux ci ne sont pas associees a des sous-labels de <Label>.Parameters (2)labelmapOldNew—Mutated in place; read the updated value from this argument after the call.
- Displace(label: TDF_Label, aLocation: TopLoc_Location, WithOld?: boolean): void
Application de la Location sur les shapes du label et de ses sous labels.
Parameters (3)labelaLocationWithOld
- ChangeShapes(label: TDF_Label, M: NCollection_DataMap_TopoDS_Shape_TopoDS_Shape_TopTools_ShapeMapHasher): void
Remplace les shapes du label et des sous-labels par des copies.
Parameters (2)labelM—Mutated in place; read the updated value from this argument after the call.
Application de la transformation sur les shapes du label et de ses sous labels. Warning: le remplacement du shape est fait dans tous les attributs qui le contiennent meme si ceux ci ne sont pas associees a des sous-labels de <Label>.
Parameters (2)labelaTransformation
- Replicate(NS: TNaming_NamedShape, T: gp_Trsf, L: TDF_Label): void
Replicates the named shape with the transformation <T> on the label <L> (and sub-labels if necessary) (TNaming_GENERATED is set).
Parameters (3)NSTL
- Replicate(SH: TopoDS_Shape, T: gp_Trsf, L: TDF_Label): void
Replicates the shape with the transformation <T> on the label <L> (and sub-labels if necessary) (TNaming_GENERATED is set).
Parameters (3)SHTL
Builds shape from map content.
Parameters (1)MS
- FindUniqueContext(S: TopoDS_Shape, Context: TopoDS_Shape): TopoDS_Shape
Find unique context of shape .
Parameters (2)SContext
- FindUniqueContextSet(S: TopoDS_Shape, Context: TopoDS_Shape): { returnValue: TopoDS_Shape; Arr: NCollection_HArray1_TopoDS_Shape; [Symbol.dispose](): void }
Find unique context of shape ,which is pure concatenation of atomic shapes (Compound). The result is concatenation of single contexts.
Parameters (2)SContext
ReturnsA result object with fields:
returnValue: the C++ return valueArr: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- SubstituteSShape(accesslabel: TDF_Label, From: TopoDS_Shape, To: TopoDS_Shape): boolean
Substitutes shape in source structure.
Parameters (3)accesslabelFromTo—Mutated in place; read the updated value from this argument after the call.
- OuterWire(theFace: TopoDS_Face, theWire: TopoDS_Wire): boolean
Returns True if outer wire is found and the found wire in <theWire>.
Parameters (2)theFacetheWire—Mutated in place; read the updated value from this argument after the call.
- OuterShell(theSolid: TopoDS_Solid, theShell: TopoDS_Shell): boolean
Returns True if outer Shell is found and the found shell in <theShell>.
Print of TNaming enumerationParameters (2)theSolidtheShell—Mutated in place; read the updated value from this argument after the call.
- IDList(anIDList: NCollection_List_Standard_GUID): void
Appends to <anIDList> the list of the attributes IDs of this package. CAUTION: <anIDList> is NOT cleared before use.
Parameters (1)anIDList—Mutated in place; read the updated value from this argument after the call.
TNaming_Builder
A tool to create and maintain topological attributes. Constructor creates an empty TNaming_NamedShape attribute at the given label. It allows adding "old shape" and "new shape" pairs with the specified evolution to this named shape. One evolution type per one builder must be used.
Constructors(1)
- constructor(aLabel: TDF_Label): TNaming_Builder
Create a Builder. Warning: Before Addition copies the current Value, and clear.
Parameters (1)aLabel
Instance methods(6)
- Generated(newShape: TopoDS_Shape): void
Records the shape newShape which was generated during a topological construction. As an example, consider the case of a face generated in construction of a box.
Parameters (1)newShape
- Generated(oldShape: TopoDS_Shape, newShape: TopoDS_Shape): void
Records the shape newShape which was generated from the shape oldShape during a topological construction. As an example, consider the case of a face generated from an edge in construction of a prism.
Parameters (2)oldShapenewShape
- Delete(oldShape: TopoDS_Shape): void
Records the shape oldShape which was deleted from the current label. As an example, consider the case of a face removed by a Boolean operation.
Parameters (1)oldShape
- Modify(oldShape: TopoDS_Shape, newShape: TopoDS_Shape): void
Records the shape newShape which is a modification of the shape oldShape. As an example, consider the case of a face split or merged in a Boolean operation.
Parameters (2)oldShapenewShape
- Select(aShape: TopoDS_Shape, inShape: TopoDS_Shape): void
Add a Shape to the current label, This Shape is unmodified. Used for example to define a set of shapes under a label.
Parameters (2)aShapeinShape
Returns the NamedShape which has been built or is under construction.
TNaming_CopyShape
Constructors(1)
Static methods(3)
- CopyTool(aShape: TopoDS_Shape, aMap: NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient, aResult: TopoDS_Shape): void
Makes copy a set of shape(s), using the aMap.
Parameters (3)aShapeaMap—Mutated in place; read the updated value from this argument after the call.aResult—Mutated in place; read the updated value from this argument after the call.
- Translate(aShape: TopoDS_Shape, aMap: NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient, aResult: TopoDS_Shape, TrTool: TNaming_TranslateTool): void
Translates a Transient shape(s) to Transient.
Parameters (4)aShapeaMap—Mutated in place; read the updated value from this argument after the call.aResult—Mutated in place; read the updated value from this argument after the call.TrTool
- Translate(L: TopLoc_Location, aMap: NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient): TopLoc_Location
Translates a Topological Location to an other Top. Location.
Parameters (2)LaMap—Mutated in place; read the updated value from this argument after the call.
TNaming_DeltaOnModification
This class provides default services for an AttributeDelta on a MODIFICATION action.
Applying this AttributeDelta means GOING BACK to the attribute previously registered state.
Constructors(1)
Initializes a
TDF_DeltaOnModification.Parameters (1)NS
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Apply(): void
Applies the delta to the attribute.
TNaming_DeltaOnRemoval
Constructors(1)
Initializes a
TDF_DeltaOnModification.Parameters (1)NS
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Apply(): void
Applies the delta to the attribute.
TNaming_Evolution
Properties(6)
TNaming_Identifier
Constructors(2)
- constructor(Lab: TDF_Label, S: TopoDS_Shape, Context: TopoDS_Shape, Geom: boolean): TNaming_IdentifierParameters (4)
LabSContextGeom
- constructor(Lab: TDF_Label, S: TopoDS_Shape, ContextNS: TNaming_NamedShape, Geom: boolean): TNaming_IdentifierParameters (4)
LabSContextNSGeom
Instance methods(16)
- IsDone(): boolean
- IsFeature(): boolean
- InitArgs(): void
- MoreArgs(): boolean
- NextArg(): void
- ArgIsFeature(): boolean
- AncestorIdentification(Localizer: TNaming_Localizer, Context: TopoDS_Shape): voidParameters (2)
LocalizerContext
- PrimitiveIdentification(Localizer: TNaming_Localizer, NS: TNaming_NamedShape): voidParameters (2)
LocalizerNS
- GeneratedIdentification(Localizer: TNaming_Localizer, NS: TNaming_NamedShape): voidParameters (2)
LocalizerNS
- Identification(Localizer: TNaming_Localizer, NS: TNaming_NamedShape): voidParameters (2)
LocalizerNS
TNaming_Iterator
A tool to visit the contents of a named shape attribute. Pairs of shapes in the attribute are iterated, one being the pre-modification or the old shape, and the other the post-modification or the new shape. This allows you to have a full access to all contents of an attribute. If, on the other hand, you are only interested in topological entities stored in the attribute, you can use the functions GetShape and CurrentShape in TNaming_Tool.
Constructors(3)
Iterates on all the history records in <anAtt>.
Parameters (1)anAtt
- constructor(aLabel: TDF_Label): TNaming_Iterator
Iterates on all the history records in the current transaction.
Parameters (1)aLabel
- constructor(aLabel: TDF_Label, aTrans: number): TNaming_Iterator
Iterates on all the history records in the transaction <aTrans>.
Parameters (2)aLabelaTrans
Instance methods(6)
- More(): boolean
Returns True if there is a current Item in the iteration.
- Next(): void
Moves the iteration to the next Item.
Returns the old shape in this iterator object. This shape can be a null one.
Returns the new shape in this iterator object.
- IsModification(): boolean
Returns true if the new shape is a modification (split, fuse, etc...) of the old shape.
TNaming_IteratorOnShapesSet
Constructors(2)
- Parameters (1)
S
Instance methods(4)
- Init(S: TNaming_ShapesSet): void
Initialize the iteration.
Parameters (1)S
- More(): boolean
Returns True if there is a current Item in the iteration.
- Next(): void
Move to the next Item.
TNaming_Localizer
Constructors(1)
Static methods(3)
- IsNew(S: TopoDS_Shape, NS: TNaming_NamedShape): booleanParameters (2)
SNS
- FindGenerator(NS: TNaming_NamedShape, S: TopoDS_Shape, theListOfGenerators: NCollection_List_TopoDS_Shape): voidParameters (3)
NSStheListOfGenerators
- FindShapeContext(NS: TNaming_NamedShape, theS: TopoDS_Shape, theSC: TopoDS_Shape): void
Finds context of the shape .
Parameters (3)NStheStheSC—Mutated in place; read the updated value from this argument after the call.
Instance methods(7)
- Init(US: TNaming_UsedShapes, CurTrans: number): voidParameters (2)
USCurTrans
- SubShapes(S: TopoDS_Shape, Type: TopAbs_ShapeEnum): NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasherParameters (2)
SType
- Ancestors(S: TopoDS_Shape, Type: TopAbs_ShapeEnum): NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasherParameters (2)
SType
- FindFeaturesInAncestors(S: TopoDS_Shape, In: TopoDS_Shape, AncInFeatures: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): voidParameters (3)
SInAncInFeatures
- GoBack(S: TopoDS_Shape, Lab: TDF_Label, Evol: TNaming_Evolution, OldS: NCollection_List_TopoDS_Shape, OldLab: NCollection_List_handle_TNaming_NamedShape): voidParameters (5)
SLabEvolOldSOldLab
- Backward(NS: TNaming_NamedShape, S: TopoDS_Shape, Primitives: NCollection_Map_handle_TNaming_NamedShape, ValidShapes: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): voidParameters (4)
NSSPrimitivesValidShapes
- FindNeighbourg(Cont: TopoDS_Shape, S: TopoDS_Shape, Neighbourg: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): voidParameters (3)
ContSNeighbourg
TNaming_Name
store the arguments of Naming.
Constructors(1)
Instance methods(18)
- Type(aType: TNaming_NameType): voidParameters (1)
aType
- ShapeType(aType: TopAbs_ShapeEnum): voidParameters (1)
aType
- Shape(theShape: TopoDS_Shape): voidParameters (1)
theShape
- Append(arg: TNaming_NamedShape): voidParameters (1)
arg
- StopNamedShape(arg: TNaming_NamedShape): voidParameters (1)
arg
- Index(I: number): voidParameters (1)
I
- Index(): number
- ContextLabel(theLab: TDF_Label): voidParameters (1)
theLab
- Orientation(theOrientation: TopAbs_Orientation): voidParameters (1)
theOrientation
- Solve(aLab: TDF_Label, Valid: NCollection_Map_TDF_Label): booleanParameters (2)
aLabValid
- Paste(into: TNaming_Name, RT: TDF_RelocationTable): voidParameters (2)
intoRT
TNaming_NamedShape
The basis to define an attribute for the storage of topology and naming data. This attribute contains two parts:
- The type of evolution, a term of the enumeration
TNaming_Evolution - A list of pairs of shapes called the "old" shape and the "new" shape. The meaning depends on the type of evolution.
Constructors(1)
Static methods(3)
class method
Returns the GUID for named shapes.- get_type_name(): string
Instance methods(19)
- IsEmpty(): boolean
- Get(): TopoDS_Shape
Returns the shapes contained in <NS>. Returns a null shape if IsEmpty.
Returns the Evolution of the attribute.
- Version(): number
Returns the Version of the attribute.
- SetVersion(version: number): void
Set the Version of the attribute.
Parameters (1)version
- Clear(): void
- ID(): Standard_GUID
Returns the ID of the attribute.
Copies the attribute contents into a new other attribute. It is used by
Backup().- Restore(anAttribute: TDF_Attribute): void
Restores the contents from <anAttribute> into this one. It is used when aborting a transaction.
Parameters (1)anAttribute
- DeltaOnModification(anOldAttribute: TDF_Attribute): TDF_DeltaOnModification
Makes a DeltaOnModification between <me> and.
Parameters (1)anOldAttribute
- DeltaOnModification(aDelta: TDF_DeltaOnModification): void
Applies a DeltaOnModification to <me>.
Parameters (1)aDelta
Makes a DeltaOnRemoval on <me> because <me> has disappeared from the DS.
Returns an new empty attribute from the good end type. It is used by the copy algorithm.
- Paste(intoAttribute: TDF_Attribute, aRelocationTable: TDF_RelocationTable): void
This method is different from the "Copy" one, because it is used when copying an attribute from a source structure into a target structure. This method pastes the current attribute to the label corresponding to the insertor. The pasted attribute may be a brand new one or a new version of the previous one.
Parameters (2)intoAttributeaRelocationTable
- References(aDataSet: TDF_DataSet): void
Adds the directly referenced attributes and labels to <aDataSet>. "Directly" means we have only to look at the first level of references.
Parameters (1)aDataSet
- BeforeRemoval(): void
Something to do before removing an Attribute from a label.
- BeforeUndo(anAttDelta: TDF_AttributeDelta, forceIt?: boolean): boolean
Something to do before applying <anAttDelta>.
Parameters (2)anAttDeltaforceIt
- AfterUndo(anAttDelta: TDF_AttributeDelta, forceIt?: boolean): boolean
Something to do after applying <anAttDelta>.
Parameters (2)anAttDeltaforceIt
TNaming_NameType
Properties(12)
TNaming_Naming
This attribute store the topological naming of any selected shape, when this shape is not already attached to a specific label. This class is also used to solve it when the arguments of the topological naming are modified.
Constructors(1)
Static methods(5)
following code from TDesignStd
- Insert(under: TDF_Label): TNaming_NamingParameters (1)
under
- Name(where: TDF_Label, Selection: TopoDS_Shape, Context: TopoDS_Shape, Geometry?: boolean, KeepOrientation?: boolean, BNproblem?: boolean): TNaming_NamedShape
Creates a Naming attribute at label <where> to identify the shape <Selection>. Geometry is true if we are only interested by the underlying geometry (e.g. setting a constraint). <Context> is used to find neighbours of when required by the naming. If KeepOrientation is True the Selection orientation is taken into account. BNproblem == True points out that Context sub-shapes in DF have orientation differences with Context shape itself.
instance methodParameters (6)whereSelectionContextGeometryKeepOrientationBNproblem
- get_type_name(): string
Instance methods(11)
- IsDefined(): boolean
- Regenerate(scope: NCollection_Map_TDF_Label): boolean
regenerate only the Name associated to me
Parameters (1)scope—Mutated in place; read the updated value from this argument after the call.
- Solve(scope: NCollection_Map_TDF_Label): boolean
Regenerate recursively the whole name with scope. If scope is empty it means that all the labels of the framework are valid.
Parameters (1)scope—Mutated in place; read the updated value from this argument after the call.
- ID(): Standard_GUID
Deferred methods from TDF_Attribute
Returns an new empty attribute from the good end type. It is used by the copy algorithm.
- Restore(anAttribute: TDF_Attribute): void
Restores the backuped contents from <anAttribute> into this one. It is used when aborting a transaction.
Parameters (1)anAttribute
- Paste(intoAttribute: TDF_Attribute, aRelocationTable: TDF_RelocationTable): void
This method is different from the "Copy" one, because it is used when copying an attribute from a source structure into a target structure. This method may paste the contents of <me> into <intoAttribute>.
The given pasted attribute can be full or empty of its contents. But don't make a NEW! Just set the contents!
It is possible to use <aRelocationTable> to get/set the relocation value of a source attribute.Parameters (2)intoAttributeaRelocationTable
- References(aDataSet: TDF_DataSet): void
Adds the first level referenced attributes and labels to <aDataSet>.
For this, use the AddLabel or AddAttribute of DataSet.
If there is none, do not implement the method.Parameters (1)aDataSet
TNaming_NamingTool
Constructors(1)
Static methods(3)
- CurrentShape(Valid: NCollection_Map_TDF_Label, Forbiden: NCollection_Map_TDF_Label, NS: TNaming_NamedShape, MS: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher): voidParameters (4)
ValidForbidenNSMS
- CurrentShapeFromShape(Valid: NCollection_Map_TDF_Label, Forbiden: NCollection_Map_TDF_Label, Acces: TDF_Label, S: TopoDS_Shape, MS: NCollection_IndexedMap_TopoDS_Shape_TopTools_ShapeMapHasher): voidParameters (5)
ValidForbidenAccesSMS
- BuildDescendants(NS: TNaming_NamedShape, Labels: NCollection_Map_TDF_Label): voidParameters (2)
NSLabels
TNaming_NewShapeIterator
Iterates on all the descendants of a shape.
Constructors(2)
- constructor(aShape: TopoDS_Shape, access: TDF_Label): TNaming_NewShapeIteratorParameters (2)
aShapeaccess
- constructor(aShape: TopoDS_Shape, Transaction: number, access: TDF_Label): TNaming_NewShapeIteratorParameters (3)
aShapeTransactionaccess
Instance methods(6)
- More(): boolean
- Next(): void
Warning! Can be a Null Shape if a descendant is deleted.
- IsModification(): boolean
True if the new shape is a modification (split, fuse,etc...) of the old shape.
TNaming_OldShapeIterator
Iterates on all the ascendants of a shape.
Constructors(2)
- constructor(aShape: TopoDS_Shape, access: TDF_Label): TNaming_OldShapeIteratorParameters (2)
aShapeaccess
- constructor(aShape: TopoDS_Shape, Transaction: number, access: TDF_Label): TNaming_OldShapeIteratorParameters (3)
aShapeTransactionaccess
Instance methods(6)
- More(): boolean
- Next(): void
- IsModification(): boolean
True if the new shape is a modification (split, fuse,etc...) of the old shape.
TNaming_RefShape
Constructors(2)
- Parameters (1)
S
Instance methods(6)
- Shape(S: TopoDS_Shape): voidParameters (1)
S
- FirstUse(aPtr: unknown): voidParameters (1)
aPtr
- FirstUse(): unknown
TNaming_SameShapeIterator
To iterate on all the label which contained a given shape.
Constructors(1)
- constructor(aShape: TopoDS_Shape, access: TDF_Label): TNaming_SameShapeIteratorParameters (2)
aShapeaccess
Instance methods(3)
TNaming_Scope
this class manage a scope of labels
Constructors(3)
WithValid = FALSE.
- constructor(WithValid: boolean): TNaming_Scope
if <WithValid> the scope is defined by the map. If not on the whole framework.
Parameters (1)WithValid
create a scope with a map. WithValid = TRUE.
Parameters (1)valid
Instance methods(11)
- WithValid(): boolean
- WithValid(mode: boolean): voidParameters (1)
mode
- ClearValid(): void
- Parameters (1)
L
- ValidChildren(L: TDF_Label, withroot?: boolean): voidParameters (2)
Lwithroot
- Parameters (1)
L
- UnvalidChildren(L: TDF_Label, withroot?: boolean): voidParameters (2)
Lwithroot
- Parameters (1)
L
Returns the current value of <NS> according to the Valid Scope.
Parameters (1)NS
TNaming_Selector
This class provides a single API for selection of shapes. This involves both identification and selection of shapes in the data framework. If the selected shape is modified, this selector will solve its identifications. This class is the user interface for topological naming resources.
- The <IsIdentified> method returns (if exists) the NamedShape which contains a given shape. The definition of an identified shape is: a Shape handled by a NamedShape (this shape is the only one stored), which has the TNaming_PRImITIVE evolution
- The <Select> method returns ALWAYS a new NamedShape at the given label, which contains the argument selected shape. When calling this method, the sub-hierarchy of <label> is first cleared, then a
TNaming_NamedShapeis ALWAYS created at this <label>, with the TNaming_SELECTED evolution. The <Naming attribute> is associated to the selected shape which store the arguments of the selection. If the given selected shape was already identified (method IsIdentified), this Naming attribute contains the reference (Identity code) to the argument shape. - The <Solve> method update the current value of the NamedShape, according to the <Naming> attribute. A boolean status is returned to say if the algorithm succeed or not. To read the current value of the selected Named Shape use the
TNaming_Tool::GetShapemethod, as for any NamedShape attribute.
Constructors(1)
- constructor(aLabel: TDF_Label): TNaming_Selector
Create a selector on this label.
to select a shape.Parameters (1)aLabel
Static methods(1)
- IsIdentified(access: TDF_Label, selection: TopoDS_Shape, Geometry: boolean): { returnValue: boolean; NS: TNaming_NamedShape; [Symbol.dispose](): void }
To know if a shape is already identified (not selected)
The label access defines the point of access to the data framework. selection is the shape for which we want to know whether it is identified or not. If true, NS is returned as the identity of selection. If Geometry is true, NS will be the named shape containing the first appearance of selection and not any other shape. In other words, selection must be the only shape stored in NS.Parameters (3)accessselectionGeometry
ReturnsA result object with fields:
returnValue: the C++ return valueNS: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Instance methods(5)
- Select(Selection: TopoDS_Shape, Context: TopoDS_Shape, Geometry: boolean, KeepOrientatation: boolean): boolean
Creates a topological naming on the label aLabel given as an argument at construction time. If successful, the shape Selection - found in the shape Context - is now identified in the named shape returned in NamedShape. If Geometry is true, NamedShape contains the first appearance of Selection. This syntax is more robust than the previous syntax for this method.
Parameters (4)SelectionContextGeometryKeepOrientatation
- Select(Selection: TopoDS_Shape, Geometry: boolean, KeepOrientatation: boolean): boolean
Creates a topological naming on the label aLabel given as an argument at construction time. If successful, the shape Selection is now identified in the named shape returned in NamedShape. If Geometry is true, NamedShape contains the first appearance of Selection.
Parameters (3)SelectionGeometryKeepOrientatation
- Solve(Valid: NCollection_Map_TDF_Label): boolean
Updates the topological naming on the label aLabel given as an argument at construction time. The underlying shape returned in the method NamedShape is updated. To read this shape, use the method
TNaming_Tool::GetShape.Parameters (1)Valid—Mutated in place; read the updated value from this argument after the call.
- Arguments(args: NCollection_Map_handle_TDF_Attribute): void
Returns the attribute list args. This list contains the named shape on which the topological naming was built.
Parameters (1)args—Mutated in place; read the updated value from this argument after the call.
Returns the NamedShape build or under construction, which contains the topological naming..
TNaming_ShapesSet
Constructors(2)
- constructor(S: TopoDS_Shape, Type?: TopAbs_ShapeEnum): TNaming_ShapesSetParameters (2)
SType
Instance methods(11)
- Clear(): void
Removes all Shapes.
- Add(S: TopoDS_Shape): boolean
Adds the Shape .
Parameters (1)S
- Add(Shapes: TNaming_ShapesSet): void
Adds the shapes contained in <Shapes>.
Parameters (1)Shapes
- Contains(S: TopoDS_Shape): boolean
Returns True if is in <me>.
Parameters (1)S
- Remove(S: TopoDS_Shape): boolean
Removes in <me>.
Parameters (1)S
- Remove(Shapes: TNaming_ShapesSet): void
Removes in <me> the shapes contained in <Shapes>.
Parameters (1)Shapes
- Filter(Shapes: TNaming_ShapesSet): void
Erases in <me> the shapes not contained in <Shapes>.
Parameters (1)Shapes
- IsEmpty(): boolean
- NbShapes(): number
TNaming_Tool
A tool to get information on the topology of a named shape attribute. This information is typically a TopoDS_Shape object. Using this tool, relations between named shapes are also accessible.
Constructors(1)
Static methods(14)
Returns the last Modification of <NS>. Returns the shape CurrentShape contained in the named shape attribute NS. CurrentShape is the current state of the entities if they have been modified in other attributes of the same data structure. Each call to this function creates a new compound.
Parameters (1)NS
- CurrentShape(NS: TNaming_NamedShape, Updated: NCollection_Map_TDF_Label): TopoDS_Shape
Returns the shape CurrentShape contained in the named shape attribute NS, and present in the updated attribute map Updated. CurrentShape is the current state of the entities if they have been modified in other attributes of the same data structure. Each call to this function creates a new compound. Warning Only the contents of Updated are searched.R.
Parameters (2)NSUpdated
Returns the NamedShape of the last Modification of <NS>. This shape is identified by a label.
Parameters (2)NSUpdated
Returns NamedShape the last Modification of <NS>.
Parameters (1)NS
- NamedShape(aShape: TopoDS_Shape, anAcces: TDF_Label): TNaming_NamedShape
Returns the named shape attribute defined by the shape aShape and the label anAccess. This attribute is returned as a new shape. You call this function, if you need to create a topological attribute for existing data. Example class MyPkg_MyClass { public: bool SameEdge(const occ::handle<OCafTest_Line>& , const occ::handle<CafTest_Line>& ); };.
bool MyPkg_MyClass::SameEdge (constocc::handle<OCafTest_Line>& L1 constocc::handle<OCafTest_Line>& L2) {occ::handle<TNaming_NamedShape>NS1 = L1->NamedShape();occ::handle<TNaming_NamedShape>NS2 = L2->NamedShape();
returnBRepTools::Compare(NS1->Get(),NS2->Get()); } In the example above, the function SameEdge is created to compare the edges having two lines for geometric supports. If these edges are found byBRepTools::Compareto be within the same tolerance, they are considered to be the same. Warning To avoid sharing of names, a SELECTED attribute will not be returned. Sharing of names makes it harder to manage the data structure. When the user of the name is removed, for example, it is difficult to know whether the name should be destroyed.Parameters (2)aShapeanAcces
Returns the entities stored in the named shape attribute NS. If there is only one old-new pair, the new shape is returned. Otherwise, a Compound is returned. This compound is made out of all the new shapes found. Each call to this function creates a new compound.
Parameters (1)NS
Returns the shape contained as OldShape in <NS>.
Parameters (1)NS
- GeneratedShape(S: TopoDS_Shape, Generation: TNaming_NamedShape): TopoDS_Shape
Returns the shape generated from S or by a modification of S and contained in the named shape Generation.
Parameters (2)SGeneration
- Collect(NS: TNaming_NamedShape, Labels: NCollection_Map_handle_TNaming_NamedShape, OnlyModif: boolean): voidParameters (3)
NSLabelsOnlyModif
- HasLabel(access: TDF_Label, aShape: TopoDS_Shape): boolean
Returns True if <aShape> appears under a label.(DP).
Parameters (2)accessaShape
- Label(access: TDF_Label, aShape: TopoDS_Shape, TransDef: number): { returnValue: TDF_Label; TransDef: number; [Symbol.dispose](): void }
Returns the label of the first apparition of <aShape>. Transdef is a value of the transaction of the first apparition of <aShape>.
Parameters (3)accessaShapeTransDef
ReturnsA result object with fields:
returnValue: the C++ return valueTransDef: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- InitialShape(aShape: TopoDS_Shape, anAcces: TDF_Label, Labels: NCollection_List_TDF_Label): TopoDS_Shape
Returns the shape created from the shape aShape contained in the attribute anAcces.
Parameters (3)aShapeanAccesLabels—Mutated in place; read the updated value from this argument after the call.
- ValidUntil(access: TDF_Label, S: TopoDS_Shape): number
Returns the last transaction where the creation of S is valid.
Parameters (2)accessS
- FindShape(Valid: NCollection_Map_TDF_Label, Forbiden: NCollection_Map_TDF_Label, Arg: TNaming_NamedShape, S: TopoDS_Shape): void
Returns the current shape (a Wire or a Shell) built (in the data framework) from the shapes of the argument named shape. It is used for IDENTITY name type computation.
Parameters (4)ValidForbidenArgS—Mutated in place; read the updated value from this argument after the call.
TNaming_TranslateTool
tool to copy underlying TShape of a Shape. The TranslateTool class is provided to support the translation of topological data structures Transient to Transient.
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(14)
- Add(S1: TopoDS_Shape, S2: TopoDS_Shape): voidParameters (2)
S1S2
- MakeVertex(S: TopoDS_Shape): voidParameters (1)
S
- MakeEdge(S: TopoDS_Shape): voidParameters (1)
S
- MakeWire(S: TopoDS_Shape): voidParameters (1)
S
- MakeFace(S: TopoDS_Shape): voidParameters (1)
S
- MakeShell(S: TopoDS_Shape): voidParameters (1)
S
- MakeSolid(S: TopoDS_Shape): voidParameters (1)
S
- MakeCompSolid(S: TopoDS_Shape): voidParameters (1)
S
- MakeCompound(S: TopoDS_Shape): voidParameters (1)
S
- UpdateVertex(S1: TopoDS_Shape, S2: TopoDS_Shape, M: NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient): voidParameters (3)
S1S2M
- UpdateEdge(S1: TopoDS_Shape, S2: TopoDS_Shape, M: NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient): voidParameters (3)
S1S2M
- UpdateFace(S1: TopoDS_Shape, S2: TopoDS_Shape, M: NCollection_IndexedDataMap_handle_Standard_Transient_handle_Standard_Transient): voidParameters (3)
S1S2M
- UpdateShape(S1: TopoDS_Shape, S2: TopoDS_Shape): voidParameters (2)
S1S2
TNaming_Translator
only for Shape Copy test - to move in DNaming
Constructors(1)
Instance methods(6)
- Add(aShape: TopoDS_Shape): voidParameters (1)
aShape
- Perform(): void
- IsDone(): boolean
- Copied(aShape: TopoDS_Shape): TopoDS_Shape
returns copied shape
Parameters (1)aShape
returns DataMap of results; (shape <-> copied shape)
- DumpMap(isWrite?: boolean): voidParameters (1)
isWrite
TNaming_UsedShapes
Global attribute located under root label to store all the shapes handled by the framework Set of Shapes Used in a Data from TDF Only one instance by Data, it always Stored as Attribute of The Root.
Static methods(3)
Returns the ID: 2a96b614-ec8b-11d0-bee7-080009dc3333.
- get_type_name(): string
Instance methods(13)
- Destroy(): void
- Map(): TNaming_DataMapOfShapePtrRefShape
- ID(): Standard_GUID
Returns the ID of the attribute.
Copies the attribute contents into a new other attribute. It is used by
Backup().- Restore(anAttribute: TDF_Attribute): void
Restores the contents from <anAttribute> into this one. It is used when aborting a transaction.
Parameters (1)anAttribute
- BeforeRemoval(): void
Clears the table.
- AfterUndo(anAttDelta: TDF_AttributeDelta, forceIt?: boolean): boolean
Something to do after applying <anAttDelta>.
Parameters (2)anAttDeltaforceIt
this method returns a null handle (no delta).
this method returns a null handle (no delta).
Returns an new empty attribute from the good end type. It is used by the copy algorithm.
- Paste(intoAttribute: TDF_Attribute, aRelocationTable: TDF_RelocationTable): void
This method is different from the "Copy" one, because it is used when copying an attribute from a source structure into a target structure. This method pastes the current attribute to the label corresponding to the insertor. The pasted attribute may be a brand new one or a new version of the previous one.
Parameters (2)intoAttributeaRelocationTable
- References(aDataSet: TDF_DataSet): void
Adds the directly referenced attributes and labels to <aDataSet>. "Directly" means we have only to look at the first level of references.
For this, use only the AddLabel() &AddAttribute()from DataSet and do not try to modify information previously stored in <aDataSet>.Parameters (1)aDataSet