KeepCurveSplitByLength

From scripting
Revision as of 07:06, 22 April 2017 by Nickpisca (talk | contribs) (Created page with " Sub KeepLongestSplit(InputSpl As HybridShapeSplit, ForSmaller0ForBigger1 As Integer) MyPart.UpdateObject InputSpl Dim HMeas Set HMeas = theSPAWorkbench.GetMeasurable(Input...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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