Selecting face by axis

How can i select and delete all the faces of a mesh which lies say in +x or -x axis....that is how can i access polygons on the basis of axis??

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

( local deg = 46 /* defines

(
	local deg = 46  /* defines the max angleDifferential to straight up for deletion */
 
	--------------------------------------------------------------------------
	--------------------------------------------------------------------------
 
	with undo on
	(
		for Obj in selection as array where isValidNode Obj AND superclassOf Obj == geometryClass do
		(
			convertToPoly Obj
 
			polyop.deleteFaces Obj  ((for f = 1 to Obj.numFaces collect if acos (dot (polyOp.getFaceNormal Obj f node:Obj) [-1,0,0]) < deg then f else 1) as bitArray) delIsoVerts:true
		)
	)
	completeRedraw()
)--END local

don't have access to max atm but that should do it

Raphael Steves

Graph's picture

check the Code page of my

check the Code page of my website got 2 snippets there that'll show you how to do it

Raphael Steves

Goonda's picture

It is not working on a

It is not working on a box...as the script is based on angle of normals!! Is there any way to delete the faces purely based on the location of there normals (not angle)?? So that I can delete all faces whose normals are situated in -X axis (global)?

Goonda's picture

Thanks Graph.....This is

Thanks Graph.....This is exactly what i need...but I want to delete faces left/right half....not the top/botoom ones, I have tried some of them....it is deleting the faces in Z zxis....but then crashing max if I try something else!!

Goonda's picture

Ok...got it.....Thanks a lot

Ok...got it.....Thanks a lot Graph....its working now!!!:)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.