[Closed] maxscript challenge 'Screw"
I figured this would be a fun and challenging one to wrap your head around. Creating a screw plugin. Speaking for myself, I dislike modeling screws of any kind. They are a pain to model for the sake of the double helix affect they require for proper threading.
I was thinking this would be a great place to start a thread and see who’d be interested in the challenge of figuring out how to create a screw. I’ve attached a max file 2012 which has a quick breakdown on the modeling process of how I go about make a screw.
The first step would be creating just the shank part of the screw.
In my mind this would be a custom geo plugin, but I’m always open to whatever.
Controls that would be nice to have would be:
- Number of helix threads
- Control the height spacing between each loop/ or overall height
- Number of loops
- Radius of the core cylinder
- Radius of the outer rim of the thread
If anyone needs, I can post the basic setup I use to create a custom cylinder geo plugin.
Id love to see one using Genome. I was on the beta for that but never got to in-depth with it.
Hi,
my basic setup of my screw script:
-create cone
-three helix’s
-have to Attach the splines by hand
-applies crosssection and surface modifier
greets
myCone = cone radius1: 10 radius2: 10 height: 30 heightsegs:1 capsegs:1 sides:18
myHelix1 = helix pos:[0,0,0] radius1: 10 radius2: 10 height: 30 turns: 10 direction:0
myHelix2 = helix pos:[0,0,2] radius1: 10 radius2: 10 height: 30 turns: 10 direction:0
myHelix3 = helix pos:[0,0,1] radius1: 12 radius2: 12 height: 30 turns: 10 direction:0
rollout unnamedRollout "Untitled" width:162 height:300
(
slider sld_Radius1 "Radius1" pos:[16,2] width:125 height:44 range:[1,15,0]
slider sld_Radius2 "Radius2" pos:[16,51] width:112 height:44 range:[1,15,0]
slider sld_Turns "Turns" pos:[21,100] width:112 height:44 range:[1,10,0]
button btn1 "Attach Splines" pos:[14,157] width:85 height:33
button btn2 "Screw 'm" pos:[12,200] width:86 height:31
on sld_Radius1 changed Val1 do
(
mycone.radius1 = Val1
myhelix1.radius1 = Val1
myhelix2.radius1 = Val1
myhelix3.radius1 = Val1 + 2
)
on sld_Radius2 changed Val2 do
(
mycone.radius2 = Val2
myhelix1.radius2 = Val2
myhelix2.radius2 = Val2
myhelix3.radius2 = Val2 + 2
)
on sld_Turns changed Val3 do
(
myhelix1.turns = Val3
myhelix2.turns = Val3
myhelix3.turns = Val3
)
on btn1 pressed do
(
convertToSplineShape myhelix1
convertToSplineShape myhelix2
convertToSplineShape myhelix3
updateShape myhelix1
updateShape myhelix2
updateShape myhelix3
select myhelix1
splineOps.startAttach myhelix1
)
on btn2 pressed do
(
addmodifier myhelix1 (Crosssection())
addmodifier myhelix1 (Surface())
)
)
createdialog unnamedRollout
my pipeline probably would be:
extended cone (see a sample on the forum)
helix modifier (see a sample on the forum)
sweep modifier (extended)
Think of a cylinder with a twist modifier. Then a control to adjust x number of vertical segements to push the verts out on there normals. That could work as well.
I made threading in stainless in a small factory as a holiday job, while in High School.
If I wasn’t so busy I’d love to recreate this in 3D.
So points #4 and #5 are pretty straightforward – but I”m having a hard time figuring out how to get that helix cleanly integrated into the mesh. Once you have the helix how do you attach/cut the splines to the geo to generate the “selectedEdges” object?
well… genome is really smart. but it’s not match the real ‘screw’ standards. so everyone has a chance to kick genome’s b…