Difference between revisions of "KeepSplitByArea"

From scripting
Jump to: navigation, search
(Created page with " Sub KeepSplitByArea(SplitSurface As Variant, ForSmaller0ForBigger1 as Integer) Dim Pt1Meas 'As Measurable Set Pt1Meas = thespaworkbench.GetMeasurable(SplitSurface) Dim AAr...")
 
(No difference)

Latest revision as of 07:08, 22 April 2017

Sub KeepSplitByArea(SplitSurface As Variant, ForSmaller0ForBigger1 as Integer)
Dim Pt1Meas 'As Measurable
Set Pt1Meas = thespaworkbench.GetMeasurable(SplitSurface)
Dim AArea As Double
AArea = Pt1Meas.Area

SplitSurface.Orientation = 1
MyPart.UpdateObject SplitSurface
Dim Pt2Meas 'As Measurable
Set Pt2Meas = thespaworkbench.GetMeasurable(SplitSurface)
Dim BArea As Double
BArea = Pt2Meas.Area

If ForSmaller0ForBigger1 = 0 Then
    If AArea < BArea Then
        SplitSurface.Orientation = -1
    End If
Else
    If AArea > BArea Then
        SplitSurface.Orientation = -1
    End If
End If
End Sub