hello
I try to make a script :
I have an object with selected edges, and clic an object, I want to create lines extending selected edges to the clicked object. (to the intersections)
....don't work :-(
(
obj = $
rollout pick_box_test "Target surface"
(
pickbutton chooseit "Intersect me" width:140
on chooseit picked targ do
(
for i in ((polyop.getedgeSelection obj) as array) do
(
pta = (polyop.getVert obj (((polyop.getVertsUsingEdge obj i ) as array)[1])) as Point3
--Point pos:pta
ptb = (polyop.getVert obj (((polyop.getVertsUsingEdge obj i ) as array)[2])) as Point3
--Point pos:ptb
RRay = ray pta ptb
PPos = (intersectRay targ RRay).pos
Point pos:PPos
new_spline = splineShape ()
addNewSpline new_spline
addKnot new_spline 1 #corner #curve [pta.x,pta.y,pta.z]
addKnot new_spline 1 #corner #curve [PPos.x,PPos.y,PPos.z]
updateshape new_spline
new_spline.wirecolor = red
new_spline.vertexTicks = on
)
destroyDialog pick_box_test
)
)
createDialog pick_box_test
)
Anubis · 2011-03-06