Pharys
Aerospace
- Jul 29, 2015
- 15
Hi everyone,
I'm trying to create a point in the center of a surface with the use of the AddNewPointOnSurface function. For the moment it doesn't work and I can't find why..
My surface is selected with the SelectElement2 function and this work great (I tried to change its color with VisProperties.SetRealColor).
Here is a piece of my code :
Any idea ?
I'm trying to create a point in the center of a surface with the use of the AddNewPointOnSurface function. For the moment it doesn't work and I can't find why..
My surface is selected with the SelectElement2 function and this work great (I tried to change its color with VisProperties.SetRealColor).
Here is a piece of my code :
Code:
oSelection.Clear
SelectionStatus = oSelection.SelectElement2(InputObjectType, "Select a face", False)
Set oSelectedFace = oSelection.Item(1).Value
oSelection.Clear
Set FaceReferencePlaneForObject = oPart.CreateReferenceFromObject(oSelectedFace)
Set oDir = oHybridShapeFactory.AddNewDirection(oSelectedFace)
Set oFaceCenterPt = oHybridShapeFactory.AddNewPointOnSurface(FaceReferencePlaneForObject, oDir, 0)
oMyHybridBody.AppendHybridShape oFaceCenterPt
Any idea ?