ZBrushCentral

Gear Script

Here’s my gear script and I pic I did with it:

I tried to remove points from the ZGraph as per Davey’s instructions, but still wasn’t able to do it for some reason, so I just added random points on top of the default ZGraph points.

If you want you can see the full-size image here:
http://members.dca.net/shinzaho/zbrush/Gears.JPG

Here’s the script.
http://members.dca.net/shinzaho/zbrush/Gears.txt

Super! Thanks for taking the time to figure out and share this script. Now anytime I need a gear shape I just run your script. I modified it to work with a button. This is what I came up with

Hey this looks great. I’ve just downloaded it, and will get back to you.
Good stuff! :slight_smile: :+1:

BTW, a thought, boy that is dangerous :slight_smile: How bout a random script for the Spiral and Helix tools?

Hey, WingedOne – fun script!

I especially like the subtle touches, like the slightly-varying shades of gold. (Not to mention the comments spread throughout, makes it easy to read.)

I don’t feel there’s anything lacking in your script, but since you mention some difficulty removing points, maybe I can offer a suggestion:

Here’s a line from your script:
<BLOCKQUOTE>quote:</font><HR>[IClick,TOOL:MODIFIERS:INITIALIZE:Outer Section,rand(117),rand(117),-200,-200,rand(117),rand(117)]
<HR></BLOCKQUOTE>

The function ‘rand()’ creates a random number every time it’s called. So in essence, the above line translates to this: “Make a point on the ‘Outer Section’ ZGraph at some random place, move it to -200,-200 (to convert it to a corner point), then move it to ANOTHER random place.”

Since you never know where the point ends up, you can’t remove it when it’s done.

My suggestion is, set a variable first. The line above could read something like:

<BLOCKQUOTE>quote:</font><HR>[VarSet,point1x,rand(117)]
[VarSet,point1y,rand(117)]
[IClick,TOOL:MODIFIERS:INITIALIZE:Outer Section,point1x,point1y,-200,-200,point1x,point1y]
<HR></BLOCKQUOTE>

Then, after you draw the gear, you can remove the point:

<BLOCKQUOTE>quote:</font><HR>
[IClick,TOOL:MODIFIERS:INITIALIZE:Outer Section,point1x,point1y,-200,-200]
<HR></BLOCKQUOTE>

Again thanks for the nifty script. Keep 'em coming!
dave

Lordy! Gears on drugs! Wild!
Lucky Pix threw in the R (reset) button! :smiley:
My Tool palette would of been useless with this amount of tools open if I was still using 1.13!
Upham :slight_smile:

It’s not points that I already put there I’m having trouble removing, but points that already exist in in the default ZGraph set-up. I tried reading what the point coordinates were by clicking on the points and then writing them down and removing those points, but I had no success.

BTW, by using smooth points rather than sharp corner points the gear tool would be a good starting point for making flowers as well. :slight_smile:

thank you for sharing this :+1: :+1: :+1: magic script, WingedOne, and the fantastico pics, Digits! :smiley:

my question (probably a very foolish one): would - just in case i would get myself into scripting one day (if i dared to get into it, i could try myself ;))- a modification of the first (original) gear lead to another series of random gears?

  • juandel