ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
ChatGPT did the job, however it do not know how to select faces, may only delete it
and it is slow
-- Assuming you have the EditableMesh object selected
obj = selection[1]-- Get the number of faces
numFaces = obj.numFaces
-- Iterate through faces in reverse orderfor f = numFaces to 1 by -1 do(-- Get the normal of the face
faceNormal = getFaceNormal obj f
-- Check if the face is verticalif dot faceNormal [0, 0, 1]< 0.99 do(-- Delete the face
deleteFace obj f
))
Comments
ChatGPT did the job, however
ChatGPT did the job, however it do not know how to select faces, may only delete it
and it is slow
.
The code you have will delete bottom faces of a box primitive converted to Editable Mesh.
Tools and Scripts for Autodesk 3dsMax
.
it might be faster to use abs to make just a single value comparison
like that: