Indexes   

Vertex (Object)

0-D boundary.
Role: This Boundary object may be, for example, the corner of a Pad resulting from the extrusion of a square.
You will create an Vertex object using the Shapes.GetBoundary , HybridShapes.GetBoundary , Sketches.GetBoundary or Selection.SelectElement2 method. Then, you pass it to the operator (such as HybridShapeFactory.AddNewLinePtPt ).
The lifetime of a Vertex object is limited, see Boundary.
See also:
TriDimFeatVertexOrBiDimFeatVertex , NotWireBoundaryMonoDimFeatVertex , ZeroDimFeatVertexOrWireBoundaryMonoDimFeatVertex .
Example:
This example asks the end user to select successively two vertices. Then, it creates a line between these two vertices.
 Dim InputObjectType(0)
 Set Document = CATIA.ActiveDocument
 Set Selection = Document.Selection
 Set HybridBodies = Document.Part.HybridBodies
 Set HybridBody = HybridBodies.Item("Geometrical Set.1")
 'We propose to the user that he select the first vertex
 InputObjectType(0)="Vertex"
 Status=Selection.SelectElement2(InputObjectType,"Select the first vertex",true)
 if (Status = "cancel") then Exit Sub
 Set FirstVertex = Selection.Item(1).Value
 Selection.Clear
 'We propose to the user that he select the second vertex
 InputObjectType(0)="Vertex"
 Status=Selection.SelectElement2(InputObjectType,"Select the second vertex",true)
 if (Status = "cancel") then Exit Sub
 Set SecondVertex = Selection.Item(1).Value
 Set hybridShapeLinePtPt = HybridShapeFactory.AddNewLinePtPt(FirstVertex,SecondVertex)
 HybridBody.AppendHybridShape hybridShapeLinePtPt
 Document.Part.InWorkObject = hybridShapeLinePtPt
 Document.Part.Update 
 


Copyright © 2006, Dassault Systèmes. All rights reserved.