home *** CD-ROM | disk | FTP | other *** search
- ' This simple macro reads the length of the 2 selected curves, and
- ' draws a 2D box laying on the ZY plane which is the bounding box for
- ' the length of both the objects selected.
- '
- ' The first curve selected lays on the ZY axis and is the "side" curve,
- ' while the second curve selected lays on the XZ axis, and is the "top".
- '
- ' This program assumes you have first selected the profile curve, then
- ' held down shift, and selected the top curve. It assumes these 2 curves
- ' are the only objects selected, and that you selected them in that order.
- '
- ' Check to see if entities are selected
- if Sys(34) = 0 then
- Message "Please select 2 Curves and run this macro again."
- End
- endif
- ' Get Entity ID for the 1st selected curve
- getselect 1, entID
- ' Get the length of the plane
- Area1 = Length(entID)
- ' Get Entity ID for the 2nd selected curve
- getselect 2, entID2
- ' Get the length of the plane
- Area2 = Length(entID2)
- ' Draw Bounding Box based on length
- >Box
- {
- <Pointxyz 0, 0, 0
- <Pointrel 0, [Area1], [Area2]
- }
- End