Solid Edge Part Type Library
AddByPointOnFace Method
Number of coordinates.
X, Y and Z coordinates of the point on face as an array.
Number of Direction coordinates.
Array of Direction coordinates.
Number of surfaces.
Surfaces as an array.
Number of edges to extend.
Edges to extend as an array.
Stitch bodies as Boolean.
Heal bodies as Boolean.
Stitch tolerance.
Description
API to get intersection of surfaces using "AddByPointOnFace" method.
Syntax
Visual Basic
Public Function AddByPointOnFace( _
   ByVal NumberOfCordinates As Long, _
   ByRef PointOnFaceArray() As Double, _
   ByVal NumberOfDirectionCordinates As Long, _
   ByRef DirectionArray() As Double, _
   ByVal NumberOfSurfaces As Long, _
   ByRef Surfaces() As Object, _
   ByVal NumberOfEdgesToExtend As Long, _
   ByRef EdgesToExtend() As Object, _
   ByVal StitchBodies As Boolean, _
   ByVal HealBodies As Boolean, _
   ByVal StitchTolerence As Double, _
   ByVal EdgeExtensionType As ExtendSurfaceExtentTypeConstants _
) As IntersectSurface
Parameters
NumberOfCordinates
Number of coordinates.
PointOnFaceArray
X, Y and Z coordinates of the point on face as an array.
NumberOfDirectionCordinates
Number of Direction coordinates.
DirectionArray
Array of Direction coordinates.
NumberOfSurfaces
Number of surfaces.
Surfaces
Surfaces as an array.
NumberOfEdgesToExtend
Number of edges to extend.
EdgesToExtend
Edges to extend as an array.
StitchBodies
Stitch bodies as Boolean.
HealBodies
Heal bodies as Boolean.
StitchTolerence
Stitch tolerance.
EdgeExtensionType
ValueDescription
igESConstantRadiusArc
igESLinear
igESLinearCurvatureContinuous
igESLinearTangentContinuous
igESNatural
igESReflective
Example
Imports System.Runtime.InteropServices

Public Class IntersectSurfaces

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDoc As SolidEdgePart.PartDocument = Nothing
        Dim objEdges As SolidEdgeGeometry.Edges = Nothing
        Dim objConstructionModel As SolidEdgePart.ConstructionModel = Nothing
        Dim objConstructionModel1 As SolidEdgePart.ConstructionModel = Nothing
        Dim objEdgArr(0 To 1) As Object
        Dim objSurfaces(1) As Object
        Dim objSurfaces1(1) As Object
        Dim kptypeArr(0 To 2) As Object
        Dim PositionArray(8) As Double
        Dim pointtypeArr(0 To 2) As SolidEdgeConstants.PointTypeConstants
        Dim pointonface(0 To 2) As Double
        Dim intersectfeat As SolidEdgePart.IntersectSurface = Nothing
        Dim trim As SolidEdgePart.TrimSurface = Nothing
        Dim odjBodies(0 To 1) As Object
        'Dim objapplication As Object
        Dim objObject As Object
        Dim bHeal, bst As Boolean
        Dim dtol As Double
        Dim points(0 To 3) As Double
        Dim dir(0 To 3) As Double
        Dim objType As Type = Nothing

        Dim strRetStatusMsg As String
        strRetStatusMsg = ""

        Try
            ' Create/get the application with specific settings
            objapplication = Marshal.GetActiveObject("SolidEdge.Application")

            If objapplication Is Nothing Then
                ' Get the type from the Solid Edge ProgID
                objType = Type.GetTypeFromProgID("SolidEdge.Application")
                ' Start Solid Edge
                objapplication = Activator.CreateInstance(objType)
                ' Make Solid Edge visible
                objapplication.Visible = True
            End If
            'Get reference to active document
            objPartDoc = objApplication.ActiveDocument()

            If objPartDoc Is Nothing Then
                MsgBox("Could not open document ")
            End If

            'obtain the first model and get all its edges

            objSurfaces(0) = objPartDoc.Constructions.ExtrudedSurfaces.Item(1).Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)

            objSurfaces(1) = objPartDoc.Constructions.ExtrudedSurfaces.Item(2).Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)

            objConstructionModel = objPartDoc.Constructions.ExtrudedSurfaces(1).Parent
            objConstructionModel1 = objPartDoc.Constructions.ExtrudedSurfaces(0).Parent

            odjBodies(0) = objConstructionModel.Body
            odjBodies(1) = objConstructionModel1.Body
            points(0) = -0.03
            points(1) = 0.06
            points(2) = -0.03

            dir(0) = 0
            dir(1) = 0
            dir(2) = 1

            intersectfeat = objConstructionModel.IntersectSurfaces.AddByPointOnFace(3, points, 3, dir, 2, objSurfaces, 0, objEdgArr, False, False, 0.0, SolidEdgePart.ExtendSurfaceExtentTypeConstants.igESLinearTangentContinuous)

            objEdges = objSurfaces(1).Item(1).Edges
            objEdgArr(0) = objEdges(0)
            objEdgArr(1) = objEdges(1)

            intersectfeat.PutEdgesToExtend(2, objEdgArr)

            intersectfeat.PutStitchOption(True)

            objapplication = intersectfeat.Application
            If objapplication Is Nothing Then
                MsgBox("Failed to get Application on ExtendSurface collection.")
            End If

            objObject = intersectfeat.AttributeSets
            If objObject Is Nothing Then
                MsgBox("Failed to get Application on ExtendSurface collection.")
            End If

            objObject = intersectfeat.Edges(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)
            If objObject Is Nothing Then
                MsgBox("Failed to get Application on ExtendSurface collection.")
            End If

            objObject = intersectfeat.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)
            If objObject Is Nothing Then
                MsgBox("Failed to get Application on ExtendSurface collection.")
            End If

            objObject = intersectfeat.Parent
            If objObject Is Nothing Then
                MsgBox("Failed to get Application on ExtendSurface collection.")
            End If


            bHeal = intersectfeat.GetHealOption()
            bst = intersectfeat.GetStitchOption()

            dtol = intersectfeat.GetStitchTolerance()



        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try




    End Sub
End Class
See Also

IntersectSurfaces Collection  | IntersectSurfaces Members