Geom.intersect_line_plane = point3d?
-
In the api http://code.google.com/intl/sl-SI/apis/sketchup/docs/ourdoc/geom.html#intersect_line_plane
,this function should return point3d.
But it seems that return vector3d.
Is it a mistake in the documentation?
How to easier(less computation) convert vector3d to point3d?
p.s. does anybody know how to see api users comments?
I can not set my browser (chrome) to show the comments. -
You are wrong [at least in v8]...
` line=edge.line[Point3d(17.0223, 16.6822, 55.5118), Vector3d(0, 0, 1)]
plane=face.plane
[0.0, 0.0, 1.0, -39.3700787401575]
point=Geom::intersect_line_plane(line, plane)
Point3d(17.0223, 16.6822, 39.3701)OR '
nil' However, in practice there is actually little difference between a 3d point and a 3d vector because they both contain XYZ values, and they can both be substituted by an 'array' [except when used in mesh operations which need Point3d objects, but which you are not using anyway?] - so
vector.to_a >>> [1, 2, 3]and
point.to_a >>> [1, 2, 3]` - which, in most cases, can then be a used as a vector OR as a point!There are not always 'comments' on every API page... BUT there are several at the bottom of the page for Geom:: perhaps you need to 'sign-in' ?
-
Ups,I'm WRONG.
The line of code that converted my point3d to vector3d was
point1=point2-point1
Sorry.
I still need to convert vector3d to point3d because the functionpoint1.distance(point2)
,don't accept vector3d.
Maybe I should change the tittle to point3d-point3d=vector3d.@unknownuser said:
There are not always 'comments' on every API page... BUT there are several at the bottom of the page for Geom:: perhaps you need to 'sign-in' ?
I'm signed in by gmail account.I can see an option "Sign out". -
Ok,it works the
vector.to_a
conversion.
Thanks -
@voljanko said:
I can not set my browser (chrome) to show the comments.
You are seeing the localized language version of the API page.
Somehow you must try to set Chrome to English, so you can see the main English pages that have the comments. This is a known issue with the API Doc pages, and complaints have been logged with Google.
Advertisement