Blank Method in "Face" Class
-
Hello All,
I am doing some error checking to see if a point lies on a face. I think the correct method is to use Face.classify_point. However, in the Sketchup API reference, this entire section is blank. I have done some testing and shown the following:
If the point is on the face: Function returns 1
If the point is on the face and is on a line: Function returns 2
If the point is on the face and is a vertex: Function returns 4
If the point is NOT on the face but is on the face plane: Function returns 8
If the point is NOT on the face and is NOT on the face plane: Function returns 16Can anyone verify/vouch that this is the correct function? Is my list accurate? Is there another method to do the same thing?
Thanks,
Chris -
I'll check. Good research.
Todd
-
Your list is pretty close to being perfect. Here's the official word (and no, these are not defined constants... yet).
PointUnknown = 0;
PointInside = 1;
PointOnEdge = 2;
PointOnVertex = 4
PointOutside = 8;
PointNotOnPlane = 16;Todd
-
This is good stuff, guys - thanks to both of you for the research. I've already simplified some awkward code in my scripts using this new knowledge. CB.
-
Todd,
Just curious to your sources. Will the SDK cover this type of thing?
Chris
-
I sent an email to a developer in Boulder.
No, the SDK does not cover stuff like this.Todd
-
Oh....the ole "inside trader" thingy! lol
-
Somebody's got to do it!
Todd
-
PS I noticed that you live in Katy...I have an office on Park 10!
-
Woo-Hoo!! Time for a SketchUp lunch get-together!! (there are others!)
Seriously, this week or next? Lupe Tortilla's - Hwy 6 & I-10.
-
Heck, I can NEVER pass up Lupe's! Next week is fine by me. Let me know when as my week is open (for now )
Advertisement