Solid Edge FrameworkSupport Type Library
AddAsChamfer Method
The first graphic object to which the chamfer connects.
The second graphic object to which the chamfer connects.
Specifies the x coordinate of the point through which the chamfer line must pass. The direction point determines the direction the in which the chamfer will be placed relative to the intersection of the two objects.
Specifies the y coordinate of the point through which the chamfer line must pass. The direction point determines the direction the in which the chamfer will be placed relative to the intersection of the 2 objects.
Specifies the offset from the end of the first object to which the referenced chamfer connects.
Specifies the offset from the end of the second object to which the referenced chamfer connects.
Description
Creates a Line2d object that connects two intersecting objects.
Syntax
Visual Basic
Public Function AddAsChamfer( _
   ByVal Obj1 As Object, _
   ByVal Obj2 As Object, _
   ByVal xDirection As Double, _
   ByVal yDirection As Double, _
   ByVal SetBackA As Double, _
   ByVal SetBackB As Double _
) As Line2d
Parameters
Obj1
The first graphic object to which the chamfer connects.
Obj2
The second graphic object to which the chamfer connects.
xDirection
Specifies the x coordinate of the point through which the chamfer line must pass. The direction point determines the direction the in which the chamfer will be placed relative to the intersection of the two objects.
yDirection
Specifies the y coordinate of the point through which the chamfer line must pass. The direction point determines the direction the in which the chamfer will be placed relative to the intersection of the 2 objects.
SetBackA
Specifies the offset from the end of the first object to which the referenced chamfer connects.
SetBackB
Specifies the offset from the end of the second object to which the referenced chamfer connects.
Remarks
The placement of the line is based on an angle and a point through which the chamfer must pass. The angle is the angle between the chamfer line and the line furthest from the direction point. The chamfer is placed between two objects. The direction point determines the direction in which to place the chamfer relative to the intersection of the two objects. If two lines are drawn to form an “X," there are four possible directions in which the chamfer can be placed. This is because there are four areas from the intersection of the lines at which the Chamfer can be constructed. The angle determines the angle of the chamfer relative to the line furthest from the direction point. The objects will be trimmed at the intersection of the chamfer line. The following illustrates a Line2d object added as a chamfer.
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
    Dim objLine3 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.1, y2:=0)
    Set objLine2 = objLines.AddBy2Points(x1:=0.1, y1:=0, x2:=0.1, y2:=0.1)
    ' Create another Line object using the AddAsChamfer Method
    Set objLine3 = objLines.AddAsChamfer(Obj1:=objLine1, Obj2:=objLine2, xDirection:=0.05, _
                                         yDirection:=0.03, SetBackA:=0.04, SetBackB:=0.03)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objLines = Nothing
    Set objLine1 = Nothing
    Set objLine2 = Nothing
    Set objLine3 = Nothing
End Sub
See Also

Lines2d Collection  | Lines2d Members

Send comments on this topic.