Indexes   

PlanarFace (Object)

2-D boundary with a planar geometry.
Role: This Boundary object may be, for example, the face of a cube.
You will create a PlanarFace object using the Shapes.GetBoundary , HybridShapes.GetBoundary , Sketches.GetBoundary or Selection.SelectElement2 method. Then, you pass it to the operator (such as ShapeFactory.AddNewDraft ).
The lifetime of a PlanarFace object is limited, see Boundary.
Example:
This example asks the end user to select a face and two planar faces, and creates a draft on these faces:
 Dim InputObjectType(0)
 Set Document = CATIA.ActiveDocument
 Set Selection = Document.Selection
 'We propose to the user that he select the face to draft
 InputObjectType(0)="Face"
 Status=Selection.SelectElement2(InputObjectType,"Select the face to draft",true)
 if (Status = "cancel") then Exit Sub
 Set FaceToDraft = Selection.Item(1).Value
 Selection.Clear
 'We propose to the user that he select the neutral face
 InputObjectType(0)="PlanarFace"
 Status=Selection.SelectElement2(InputObjectType,"Select the neutral face",true)
 if (Status = "cancel") then Exit Sub
 Set NeutralFace = Selection.Item(1).Value
 Selection.Clear
 'We propose to the user that he select the parting element
 InputObjectType(0)="PlanarFace"
 Status=Selection.SelectElement2(InputObjectType,"Select the parting element",true)
 if (Status = "cancel") then Exit Sub
 Set PartingElement = Selection.Item(1).Value
 Set Draft = ShapeFactory.AddNewDraft(FaceToDraft,NeutralFace,0,PartingElement,0.0,0.0,1.0,0,5.0,0)
 Set DraftDomains = Draft.DraftDomains
 Set DraftDomain = DraftDomains.Item(1)
 DraftDomain.SetPullingDirection 0.0, 0.0,1.0
 Document.Part.Update  
 

Method Index

GetFirstAxis
Returns the planar face first axis
GetOrigin
Returns the origin of the planar face.
GetSecondAxis
Returns the planar face second axis.

Methods


o Sub GetFirstAxis( oFirstAxis)
Returns the planar face first axis
Parameters:
oFirstAxis[0]
The X Coordinate of the planar face first axis
oFirstAxis[1]
The Y Coordinate of the planar face first axis
oFirstAxis[2]
The Z Coordinate of the planar face first axis
o Sub GetOrigin( oOrigin)
Returns the origin of the planar face.
Parameters:
oOrigin[0]
The X Coordinate of the planar face origin
oOrigin[1]
The Y Coordinate of the planar face origin
oOrigin[2]
The Z Coordinate of the planar face origin
o Sub GetSecondAxis( oSecondAxis)
Returns the planar face second axis.
Parameters:
oSecondAxis[0]
The X Coordinate of the planar face second axis
oSecondAxis[1]
The Y Coordinate of the planar face second axis
oSecondAxis[2]
The Z Coordinate of the planar face second axis

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