Difference between revisions of "KeepCurveSplitByLength"

From scripting
Jump to: navigation, search
(Created page with " Sub KeepLongestSplit(InputSpl As HybridShapeSplit, ForSmaller0ForBigger1 As Integer) MyPart.UpdateObject InputSpl Dim HMeas Set HMeas = theSPAWorkbench.GetMeasurable(Input...")
 
(No difference)

Latest revision as of 07:06, 22 April 2017

Sub KeepLongestSplit(InputSpl As HybridShapeSplit, ForSmaller0ForBigger1 As Integer)
MyPart.UpdateObject InputSpl
Dim HMeas
Set HMeas = theSPAWorkbench.GetMeasurable(InputSpl)
Dim FirstDim As Double
FirstDim = HMeas.Length
InputSpl.InvertOrientation
MyPart.UpdateObject InputSpl
Dim SecondDim As Double
SecondDim = HMeas.Length
If ForSmaller0ForBigger1 = 1 Then
    If FirstDim > SecondDim Then
        InputSpl.InvertOrientation
        MyPart.UpdateObject InputSpl
    End If
else
    If FirstDim < SecondDim Then
        InputSpl.InvertOrientation
        MyPart.UpdateObject InputSpl
    End If
End Sub