Solid Edge FrameworkSupport Type Library
CornerTrim Method
Double that specifies the coordinates of a point near the end of the active object to retain if the active object requires trimming.
Double that specifies the coordinates of a point near the end of the active object to retain if the active object requires trimming.
The object with which the referenced object is to intersect.
Required Double that specifies the coordinates of a point near the end of the target object to retain if the target object requires trimming.
Required Double that specifies the coordinates of a point near the end of the target object to retain if the target object requires trimming.
Description
Trims or extends the referenced object and a target object to intersect.
Syntax
Visual Basic
Public Sub CornerTrim( _
   ByVal xKeep As Double, _
   ByVal yKeep As Double, _
   ByVal TargetObj As Object, _
   ByVal xTargetKeep As Double, _
   ByVal yTargetKeep As Double _
) 
Parameters
xKeep
Double that specifies the coordinates of a point near the end of the active object to retain if the active object requires trimming.
yKeep
Double that specifies the coordinates of a point near the end of the active object to retain if the active object requires trimming.
TargetObj
The object with which the referenced object is to intersect.
xTargetKeep
Required Double that specifies the coordinates of a point near the end of the target object to retain if the target object requires trimming.
yTargetKeep
Required Double that specifies the coordinates of a point near the end of the target object to retain if the target object requires trimming.
Remarks
To determine for which side of the intersection that the objects retain their geometry, a point is supplied for each object. As a result, the geometry of each object that is closest to its specified point (as determined by the intersection) is retained. The active object point is specified so that the portion of the arc above the intersection is retained after trimming. In this example, the line is extended to intersect with the arc.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objLines As SolidEdgeFrameworkSupport.Lines2d
    Dim objLine1 As SolidEdgeFrameworkSupport.Line2d
    Dim objLine2 As SolidEdgeFrameworkSupport.Line2d
    ' 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
    'Create an empty Lines2d collection object
    Set objLines = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1)) _
                   .Lines2d
    ' Create 2 Line2d objects
    Set objLine1 = objLines.AddBy2Points(x1:=0, y1:=0, x2:=0.01, y2:=0)
    Set objLine2 = objLines.AddBy2Points(x1:=0.005, y1:=-0.01, x2:=0.01, y2:=0.01)
    ' CornerTrim the Intersecting lines
    Call objLine1.CornerTrim(xKeep:=0, yKeep:=0, TargetObj:=objLine2, xTargetKeep:=0.005, yTargetKeep:=-0.01)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objLines = Nothing
    Set objLine1 = Nothing
    Set objLine2 = Nothing
End Sub
See Also

Line2d Object  | Line2d Members