Actually, I should have said that you check the intersection with the oriented line, and then, yes, the number of intersections should be odd for inside and even for outside.

The code could look like this:

```
#Check if a point is within a solid with faces <lfaces>
# Returns :inside, :outside or :on_face
# Hint: transform first the point <pt> in the coordinates system of the solid
def G6.point_within_solid(pt, lfaces)
return :outside if lfaces.empty?
#Initialization
on_face_statuses = [Sketchup::Face::PointOnEdge, Sketchup::Face::PointInside, Sketchup::Face::PointOnVertex]
#Oriented Half line
vec = Geom::Vector3d.new(1, 1, 1)
#Loop on all faces of the solid
angle_step = Math::PI / 180
trot = Geom::Transformation.rotation(ORIGIN, Z_AXIS, Math::PI / 180)
for iangle in 0..360
#Vector used in the iteration
vec = trot * vec
line = [pt, vec]
nb_inter = 0
next_angle = false
lfaces.each do |face|
#Point is on face
return :on_face if on_face_statuses.include?(face.classify_point(pt))
#Intersection point should be on the oriented half line
ptinter = Geom.intersect_line_plane(line, face.plane)
next if !ptinter || pt.vector_to(ptinter) % vec < 0
#Checking if the intersection point is on the face.
#Provoke a change of direction if intersection is on a vertex or on an edge
case face.classify_point(ptinter)
when Sketchup::Face::PointOnEdge, Sketchup::Face::PointOnVertex
next_angle = true
break
when Sketchup::Face::PointInside
nb_inter += 1
end
end
break unless next_angle
end
#Return the status
(nb_inter.modulo(2) == 0) ? :outside : :inside
end
```