ScriptSpot

Forum topic · Scripts Wanted

cut hole around vertex

By alek3tt · 2010-12-02

Description

Hello,

I would like to know is there a script that will do this:
for example if you have a plane 4*4 polys. If I want to make round hole in the center of it I have to create verices and edges (shape of hole) and than delete polys to get hole. Is there a script that would cut round hole on poly around selected vertex on desired radius?. I know holes can be cut with boolean but I don't prefer booleans cause of bad geometry that they make.

Thank you,
Alex

Comments (5)

alek3tt · 2010-12-06

Thank You,

That's it. :)

Anubis · 2010-12-03

well, try this then...
(execute the code line by line to see what each command does)
note(!) - cut this !REG3XP1!> from the code (at line 3), this is some forum ghost addition and not a part of the code.

p = Plane isSelected:on
convertTo p Editable_Poly
   max modify mode
subobjectlevel = 1
polyop.setVertSelection p #{7, 9, 13, 17, 19}
update p
p.ConnectVertices()
polyop.setVertSelection p #{13}
update p
p.chamferVertices 4.0 open:true -- *note below
update p
subobjectlevel = 0
-- note: looks like 'open:true' in chamferVertices() is broken!
-- so... delete the face:
polyop.deleteFaces p #{21}
-- and... thats it :)

Attachments

alek3tt · 2010-12-03

thank you,

I'm already using that method, but I would like to automate next steps, which are: select edges between these 4 vertices, add vertex in the middle of each edge and then scale 4 newly created vertices to make the hole round. Is there something I could do to automate this process?

Anubis · 2010-12-02

just suggestion

Attachments