Date:         Sun, 4 Jan 1998 14:23:25 +0000
From: George Cole <George@COLE.CLARA.NET>
Subject:      [IML] QUEST: definitions and sweeps

I'm trying to do a simple cabinet top using the method of a sweep with
only 4 sections to create a squeare with my desired edge. When I do this
though I end up with an object with 3756 edges, and this is jsut for the
top piece. Is there a way to decrease this number?
 Also what is the difference between a sweep and a spin, and a merge and
a join?
Thanks,

----------------------------------

Date:         Sun, 4 Jan 1998 12:01:29 +0400
From: Charles Blaquiere <blaq@INTERLOG.COM>

First of all, both spin and sweep are sensitive to the ordering of the
points making up your profile. If you use Add Lines to create the
profile, from one end to another, you'll be OK, but if you begin with a
primitive (e.g. an 8-sided disk from which you've deleted all but the
rightmost 3 points, in the Front view), the points may not be ordered
the way you think. Again, following my example, enter Pick Points mode,
Highlight First (Ctrl-H), and press Ctrl-N twice. The points will not
highlight from top to bottom, but starting at the 3 o'clock position and
going counterclockwise. This is how disks are created. You would need to
pick the top point, then Shift-pick the middle and bottom point, and
Sort them to achieve correct results.

With that warning out of the way, let's move on to the difference
between Spin and Sweep. Sweep is the familiar lathing tool: it stitches
together several copies of your profile, created by rotating around the
object Y axis. The top and bottom of the object will be left open. Spin
closes the top and bottom of the object. The first and last points in
the outline are not duplicated, but serve as anchoring points. Faces
will be stitched between the first point and each copy of the second
point, creating a "roof". (Remember, the 2nd, 3rd... (n-1)th outline
points will be copied as the outline is Spun around Y; the first and nth
point remain unique) Similarly, faces will be added at the bottom,
between the last point and all the copies of the next-to-last point,
creating a "floor".

In all instances, because rotation occurs around the object axis, its
placement is crucial. Leave a disk's axis in place, and Spinning or
Sweeping it will create a sphere. (An unnecessarily complex one, BTW)
Move the axis along local X until it's outside the disk, and Sweeping
will create a torus, or donut shape. (Spinning will create a mess)

Now, regarding your first question ("Why is my cabinet top so
complex?"), I assume your profile must've contained a large number of
points, for nicely-defined curves.

- If the profile contains n points, after sweeping it will obviously
contain n*4 points.

- The profile is made up of (n-1) edges; after sweeping, each of these
edges is extruded into a rectangular polygon, made up of 2 triangular
faces. If you look at the cabinet top from one end, you'll see this:

        BEFORE SWEEPING: n edges

        *
        |
        |
        *
        |
        |
        *
        |
        |
        *

        AFTER SWEEPING: (3*n)+1 edges

        *--*
        | /I
        |/ I
        *--*
        | /I
        |/ I
        *--*
        | /I
        |/ I
        *--*

(The edges marked with "I"s actually belong to the next side of your
cabinet top, so I didn't count them.) Each of the 3 original edges was
tripled:

        *               *--*
        |       -->     | /
        |               |/
        *               *

And a lonely horizontal edge was added at the bottom. Thus, (3*n)+1.

Because your final object has 4 sides and 3756 edges, one side would
have 949 edges. If (3*n)+1 is 949, then 3*n is 948, and n is 316. May I
assume your profile had 316 edges?

----------------------------------

Date:         Sun, 4 Jan 1998 21:41:24 +0000
From: George Cole <George@COLE.CLARA.NET>

Thanks Charles, a very useful message.

I actually had an object with 3576 edges (I wrote the message a short
time after leaving Imagine). The original profile was made in the spline
editor and extruded a short depth when I added points. This meant that
it actually had two profiles joined by edges (but I did not fill front
or back faces). The object had 600 edges but also had lines going back
from the edge to the axis as I didn't realize that spin would create a
top and bottom for me. It looked a little like this:
 *---------------*
 |                \
 |                 *---\
 |                      \
 *----------------------*

 /\
/  \
 |
 |
and the axis was here

Thanks to your message I understand what I'm doing better. I've got the
profile down to 48 edges by deleting the extra profile and the points
going to the axis. The total object now has 564 edges which is much
better. Before was practically a black blob in the editors as it had so
many lines. I thought that it couldn't be right to have so many lines
covering the very top as it was just a perfect square. Now it is just 2
triangles.
