Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4125

Help: what makes a point3d?

$
0
0

Jørgen Holo wrote:

I am messing about in Python and need some help.

How can I easily define a point3d ?

I know I can use:

end=rs.Str2Pt("1,2,3")

but is that the only way? It becomes messy when I have to put values in there like:

end=rs.Str2Pt(str(value1)+","+str(value2)+","+str(value3))

If I just do: end=[1,2,3] then it becomes just a list, and not a valid point3d.

What I do now that works look like this:

start=rs.Str2Pt("0,0,0")
end=rs.Str2Pt("0,0,"+str(dblTol))
translation=start-end
rs.MoveObject(strCopy,translation)

This works, but it is not "tidy" smile

Thanks for any feedback

Posts: 9

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4125

Trending Articles