Solid Edge Part Type Library
AddNormalToCurve Method
Specifies the Curve to which the reference plane is to be normal. This object must be either an Edge object or one of the open 2d geometry objects that can exist in a Profile (for example Line2D, Arc2D, and so forth).
Member of the ReferenceElementConstants constant set.
A Plane.
Member of the ReferenceElementConstants constant set that defines the X origin of the reference plane to be created.
Specifies whether the reference plane should be a local or global reference plane. If not specified, the default is to create a local reference plane. When using Solid Edge interactively, local reference planes are created whenever a profile-based feature is created. Local reference planes are never displayed to the user. Global reference planes are created interactively using the reference plane commands on the reference plane toolbar. Global reference planes are displayed and have their display controlled through the use of various display commands.
Description
Adds a reference plane that is normal to a specified curve.
Syntax
Visual Basic
Public Function AddNormalToCurve( _
   ByVal Curve As Object, _
   ByVal PlanePoint As ReferenceElementConstants, _
   ByVal OrientationPlaneOrPivot As Variant, _
   ByVal PivotOrigin As ReferenceElementConstants, _
   Optional ByVal Local As Variant, _
   Optional ByVal ParentCurve As Variant _
) As RefPlane
Parameters
Curve
Specifies the Curve to which the reference plane is to be normal. This object must be either an Edge object or one of the open 2d geometry objects that can exist in a Profile (for example Line2D, Arc2D, and so forth).
PlanePoint
ValueDescription
ig3PointPlane
igAngular
igAtAngleToSurfaceAtKeypoint
igCurveEnd
igCurveStart
igFlipNormal
igNormalSide
igNormalToCurve
igNormalToCurveAtArcLengthRatio
igNormalToCurveAtDistance
igNormalToCurveAtDistanceAlongCurve
igNormalToCurveAtKeyPoint
igParallel
igParallelThroughPointUnsupported Internal type.
igPivotEnd
igPivotStart
igPlaneAlignX
igPlaneAlignY
igPlaneByMirror
igPlaneFlipHorizontal
igPlaneFlipVertical
igPlaneRotateLeft
igPlaneRotateRight
igRefEleInit
igReverseNormalSide
igTangentToFace
igTangentToSurfaceAtAngle
igTangentToSurfaceAtKeypoint
Member of the ReferenceElementConstants constant set.
OrientationPlaneOrPivot
A Plane.
PivotOrigin
ValueDescription
ig3PointPlane
igAngular
igAtAngleToSurfaceAtKeypoint
igCurveEnd
igCurveStart
igFlipNormal
igNormalSide
igNormalToCurve
igNormalToCurveAtArcLengthRatio
igNormalToCurveAtDistance
igNormalToCurveAtDistanceAlongCurve
igNormalToCurveAtKeyPoint
igParallel
igParallelThroughPointUnsupported Internal type.
igPivotEnd
igPivotStart
igPlaneAlignX
igPlaneAlignY
igPlaneByMirror
igPlaneFlipHorizontal
igPlaneFlipVertical
igPlaneRotateLeft
igPlaneRotateRight
igRefEleInit
igReverseNormalSide
igTangentToFace
igTangentToSurfaceAtAngle
igTangentToSurfaceAtKeypoint
Member of the ReferenceElementConstants constant set that defines the X origin of the reference plane to be created.
Local
Specifies whether the reference plane should be a local or global reference plane. If not specified, the default is to create a local reference plane. When using Solid Edge interactively, local reference planes are created whenever a profile-based feature is created. Local reference planes are never displayed to the user. Global reference planes are created interactively using the reference plane commands on the reference plane toolbar. Global reference planes are displayed and have their display controlled through the use of various display commands.
ParentCurve
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objCurve As SolidEdgePart.Profile
    Dim objRPNTC As SolidEdgePart.RefPlane
    Dim lngStatus As Long
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' *** creating a circular profile on a principal reference plane
    Set objCurve = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Call objCurve.Circles2d.AddByCenterRadius(x:=0, y:=0, Radius:=0.1)
    lngStatus = objCurve.End(ValidationCriteria:=igProfileClosed)
    If lngStatus <> 0 Then
        MsgBox "profile is not closed"
    End If
    ' *** creating a reference plane normal to the above curve with igCurveEnd & igPivotEnd
    Set objRPNTC = objDoc.RefPlanes.AddNormalToCurve(Curve:=objCurve, _
                                                     PlanePoint:=igCurveEnd, OrientationPlaneOrPivot:=objDoc.RefPlanes(1), _
                                                     pivotorigin:=igPivotEnd)
    If (objDoc.RefPlanes.Count <> 4) Then
        MsgBox "AddNormalToCurve method fails with igCurveEnd & igPivotEnd"
    End If
    Set objRPNTC = Nothing

    ' *** creating a reference plane normal to the above curve with igCurveStart & igPivotEnd
    Set objRPNTC = objDoc.RefPlanes.AddNormalToCurve(Curve:=objCurve, _
                                                     PlanePoint:=igCurveStart, OrientationPlaneOrPivot:=objDoc.RefPlanes(1), _
                                                     pivotorigin:=igPivotEnd)
    If (objDoc.RefPlanes.Count <> 5) Then
        MsgBox "AddNormalToCurve method fails with igCurveStart & igPivotEnd"
    End If
    Set objRPNTC = Nothing

    ' *** creating a reference plane normal to the above curve with igCurveEnd & igPivotStart
    Set objRPNTC = objDoc.RefPlanes.AddNormalToCurve(Curve:=objCurve, _
                                                     PlanePoint:=igCurveEnd, OrientationPlaneOrPivot:=objDoc.RefPlanes(1), _
                                                     pivotorigin:=igPivotStart)
    If (objDoc.RefPlanes.Count <> 6) Then
        MsgBox "AddNormalToCurve method fails with igCurveEnd & igPivotStart"
    End If
    Set objRPNTC = Nothing

    ' *** creating a reference plane normal to the above curve with igCurveStart & igPivotStart
    Set objRPNTC = objDoc.RefPlanes.AddNormalToCurve(Curve:=objCurve, _
                                                     PlanePoint:=igCurveStart, OrientationPlaneOrPivot:=objDoc.RefPlanes(1), _
                                                     pivotorigin:=igPivotStart)
    If (objDoc.RefPlanes.Count <> 7) Then
        MsgBox "AddNormalToCurve method fails with igCurveStart & igPivotStart"
    End If
    Set objRPNTC = Nothing
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objCurve = Nothing
    Set objRPNTC = Nothing
End Sub
See Also

RefPlanes Collection  | RefPlanes Members

Send comments on this topic.