View Full Version : Subpatchable Disk Creation
etobiason
05-19-2005, 08:15 AM
I've been trying to figure out a way to automate the creation of the following shape: a circle with eight points divided into four four-point polygons. I find it useful for making all sorts of things.
I have Select Outline mapped to L and Weld Average mapped to W. So I often use the disc tool, select it, bevel it in a tad, hit L and then hit W. Then hit the space bar a couple times and then delete the 1 point poly that was created in the center.
It occurs to me that this could be automated in an L-Script, but I have no idea how and what I'm really interested in is a tool that creates this shape off the bat...
Then I realized that I can make a square that has 2 divisions in each direction. If it is a perfect square, selecting the corners and Sizing them down (selection center) by a value of 70.7107% makes it into a circle, with the divisions I want in place. I got this value by experimentation, probably someone who knows math has an exact measurement?
Point being, there could be a tool that basically makes squares that have two divisions with the corners pulled in, in other words, the beginning of a subpatchable disc....
Anybody have the ability/desire to write a tool like that?
MooseDog
05-19-2005, 08:44 AM
if only to expose my ignorance about lscripting:
doesn't the lscript commander work sort of like creating an action in photoshop, or a macro in excel. i.e. fire up the recorder, walk through the steps, shut off recorder, save action/lscript.
i'm sure life is more complicated than that tho :p
etobiason
05-19-2005, 08:49 AM
That's what I hear as well. But I can't find it. In Layout there is a macro recorder available under the Master Plugins panel. But in modeler I can't find anything similar, not even in the manual...
BeeVee
05-19-2005, 09:35 AM
You can always make the end of a cylinder subpatchable by using the Make Pole function (in Multiply > Subdivide > More). If you don't like the natty wrinkles, you can use the Fix Pole function (in Detail > Polygons > More) to minimise them...
No need to write a script...
B
etobiason
05-19-2005, 09:43 AM
I'll try that.
But if there is were a plug in that made the ends subdivided when created, that would save time...
EDIT: Yeah, that works well. But it makes tris, not quads... I'm looking for a tool that makes 8 point circles separated into quads... I think the mechanism for such a tool could be based on a box divided into two sections each way, with the corners pulled in about 71% to make a circle... I'm not recommending this as a process, just wondering if this is a usable method to program a new Create tool, Create Sectioned Disc or something...
GregMalick
05-19-2005, 01:24 PM
definitely can do in LScript...
But I'm not sure I understand... is that just an Octagon that you knifed horizontally and vertically and then pressed the TAB key?
etobiason
05-19-2005, 01:32 PM
I tried to avoid the knife. Here's what I did: made a square with two divisions on each axis, and then scaled the corners in. I thought it would be neat to have a tool that made this final shape, and could extrude it for tubes as well... I thought maybe, broken down into this "like a square but with corners brought in" pattern would help a programmer write the tool.
Dodgy
05-19-2005, 08:07 PM
Here you go. It's interactive, but doesn't subpatch it for you, just makes the poly version. For some reason I coouldn't get it to convert it to a subpatch without ti crashing and it's getting late, so here's what I got so far..
EDIT Version 1.1 fixes a bug and allows subpatch toggling.
BeeVee
05-20-2005, 03:08 AM
It doesn't work anyway. Try and make a cylinder with only eight sides. Then use Make Pole, then select the two tris of a quadrant and hit shift z to merge them (doesn't matter if you have both ends selected at once making your job faster). Even if you move the "empty" points now you will only approximate a circle, and you'll still need to knife to make a sharper edge, which will also reduce the quality of the circle.
B
Lynx3d
05-20-2005, 05:25 AM
If it is a perfect square, selecting the corners and Sizing them down (selection center) by a value of 70.7107% makes it into a circle, with the divisions I want in place. I got this value by experimentation, probably someone who knows math has an exact measurement?
That would be sin(45°) = cos(45°) = 0.5*sqrt(2.0) = 0,7071067811...
But if that actually makes the sub-patch outline a perfect circle too is another question...
etobiason
05-20-2005, 08:33 AM
Thanks Dodgy, I'll download that now and check it out! I'm excited to try this without the usual method that BeeVee describes, which I usually did (except for using the pole tool, which I didn't know about, I was beveling in and welding average... make pole reduces one step).
70.71067811% is more accurate than the 70.7107% that I found by experimenting, but it's nice to know the number I got was accurate (to the fourth decimal place!). It took about 45 seconds of trial and error, and if I knew the formula that would have probably taken me longer anyway... e=m*0 (whereas e is me, m is math skills).
Dodgy
05-20-2005, 03:30 PM
I've updated it, it fixes a bug, which was the reason for the subpatch crash, and now you can toggle that on and off too.
Would you want it to make the end caps separate? This would guarantee the subpatch cylinder has circular ends...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.