solid.Shape

Methods

Method Reference: solid.Shape.bbox

solid.Shape: B = bbox (S)

solid.Shape: [B, L] = bbox (S)

Axis-aligned extents of a shape.

B is the 1-by-6 vector [xmin, ymin, zmin, xmax, ymax, zmax] in millimetres, and L the 1-by-3 vector of the lengths along each axis.

The box is computed from the exact surfaces, with no allowance for the tolerance Open CASCADE carries on its edges, so a cylinder of radius 4 reaches exactly 4 from its axis. On planes, cylinders, cones and spheres it is tight; on a torus or a spline surface it may exceed the true extent by up to 1e-7 millimetres, the precision Open CASCADE computes it to there. The empty shape has no extent and returns an empty B and L.

 
 [B, L] = bbox (solid.cylinder (4, 10))
 ⇒ B = -4   -4   0   4   4   10
 ⇒ L = 8   8   10

See also: solid.Shape.centroid, geom.bbox

Source Code: solid.Shape