slice with 1 point vertex

slice with 1 point vertex

anycganycgJ8A6A
Advocate Advocate
511 Views
2 Replies
Message 1 of 3

slice with 1 point vertex

anycganycgJ8A6A
Advocate
Advocate

hi  , i need help some from freinds

i use swift loop common

but that is not snap

pls  so i need this code~~~

 

if i   select  1 vetext ,   and  check   x    or  y  or  z

then     that is slice along  x axis

.... etc

 

is  1-point- axis- slice  possible ~~

 

0 Likes
512 Views
2 Replies
Replies (2)
Message 2 of 3

denisT.MaxDoctor
Advisor
Advisor
try(destroydialog PolySliceRol) catch()
rollout PolySliceRol "PolySlice by denisT" width:200
(
	label slice_dir_lb "Direction:" across:2 
	radiobuttons slice_dir_rb labels:#("X","Y","Z") columns:3 
	
	button slice_bt "Slice" width:182 align:#right offset:[4,4] tooltip:"Select Any vertex and splice the Poly"
	
	on slice_bt pressed do undo "Slice" on
	(
		if iskindof (node = selection[1]) Editable_Poly do
		(
			if node.selectedverts.count > 0 do
			(
				p = node.selectedverts[1].pos
				d = case slice_dir_rb.state of
				(
					1: x_axis
					2: y_axis
					3: z_axis
				)
				polyop.slice node #all (ray p d)
				update node
			)
		)
	)
)
createdialog PolySliceRol
0 Likes
Message 3 of 3

anycganycgJ8A6A
Advocate
Advocate

really really thank you , i use code below

but    first object is good work . but other  object is error

 

pls can you teach ~~

 

 

savesnap=snapMode.active
snapMode.active=true



while NOT keyboard.escPressed do
(

in coordsys local pta = pickpoint snap:#3d

if classOf pta == point3 do

(

sx = pta[1]
sy = pta[2]
sz = pta[3]

npx = [sx+300,sy,sz]


ptd = ( npx - pta )
nptd = normalize ptd
na = nptd[1]
nb = nptd[2]
nc = nptd[3]


in coordsys local $.EditablePoly.slice [na,nb,nc] pta flaggedFacesOnly:off



)

)

 



snapMode.active=false
macros.run "Selection" "SmartSelect"

0 Likes