Cylinder shapes have unclearly defined boundaries even with PreciseConvexDecomposition on

a point residing exactly on cylinder’s wall cannot simultaneously be touching both the cylinder and its externals; the result is inconsistent
on the example place provided, a cylinder is generated, then it is subtracted and its complementary volume is returned; 16 probes are positioned exactly on the cylinder’s boundary - but not all of them are touching both the volume and the cylinder (color-coded)
notice in order to replicate the result, sizes of probes must be small enough and the cylinder must be large enough
devforum-cylindershape20260109.rbxl (55.8 KB)

There was an issue with how you were placing the probes on the cylinder that made it appear like they weren’t touching the volume and cylinder. The GetPartsInPart returns baseparts that share the same geometry space, and the probes you were using were being placed outside the cylinders geometry space. The cylinder primitive is not a perfect circle and its size is based on the vertices. So some probes were being placed between two vertices (middle of a face) and that did not overlap the geometry. You have to use GetClosestPointOnSurface instead of positioning the probes using the cylinder radius away from the center cylinder

Fixed file is linked below. The red spheres show the correct position on the cylinder, and the blue show where they used to be positioned with the old version to see the distance error


Fixed file:
CylinderGeometry.rbxl (56.0 KB)

Lmk if you have any questions :slight_smile:

UPD:
notice if you raycast the surface, then you get the same approximation which matches the position returned by GetClosestPointOnSurface
but notice it is also inconsistent as to belonging to both the shape and its complementary; do you think the complementary PartOperation uses a different cylinder approximation internally, or are they both counterphasing each other?

devforum__CylinderGeometry.rbxl (56.8 KB)

It’s belonging to both the shape and its complementary because when you move the probe to a position, it moves it from the center of the instance. So if you want it to only be on the surface, you have to move it half of the instance’s size in the direction of the surface normal returned by the raycast (raycast.Normal)

this is the desired result and it should be consistent no matter what is the position of the probe
if it geometrically intersects both the cylinder AND its complementary - it should be touching them both at the same time
either actual polygonal mesh may be used for calculations, or the perfect surface (mathematical) approximation - BUT it should be consistent and guaranteed to be predictable with a separate API
rounding error should be a known ε constant to account for