BASIC / CSG-CUBE
CsgCube
A box, sphere and three crossing bores
Model preview
A constructive solid geometry demonstration: intersect a cube with a sphere, then subtract cylinders along three axes.
Key dimensions: 50 mm cube; three crossing cylindrical cuts
SolidCraft model
Open in SolidCraft Web
The editable .sc model is loaded directly from the accepted build branch.
Source
SCPF source
The exact SCPF Python source declared by this build variant.
scpf/model.py
class CsgCube:
size = 50
def build(self):
body = Sphere(self.size / 1.5) & Box(self.size, self.size, self.size)
diameter = self.size / 1.5
hole_x = Cylinder(d=diameter, h=self.size, axis=Axis.X).at(body)
hole_y = Cylinder(d=diameter, h=self.size, axis=Axis.Y).at(body)
hole_z = Cylinder(d=diameter, h=self.size, axis=Axis.Z).at(body)
return body - (hole_x + hole_y + hole_z)
Generated output SolidCraft command sequence 6 generated operations · expand to inspect
parameters.add{ "expression": "50", "name": "size", "unit": "mm" }solid.sphere{ "body_name": "CsgCube", "center": [ 0, 0, 0 ], "operation": "new", "radius": "size / 1.5" }solid.box{ "center": [ 0, 0, 0 ], "height": "size", "length": "size", "operation": "intersect", "targets": [ "CsgCube" ], "width": "size" }solid.cylinder{ "axis": "X", "base": [ "-(size / 2)", 0, 0 ], "diameter": "size / 1.5", "height": "size", "operation": "cut", "targets": [ "CsgCube" ] }solid.cylinder{ "axis": "Y", "base": [ 0, "-(size / 2)", 0 ], "diameter": "size / 1.5", "height": "size", "operation": "cut", "targets": [ "CsgCube" ] }solid.cylinder{ "axis": "Z", "base": [ 0, 0, "-(size / 2)" ], "diameter": "size / 1.5", "height": "size", "operation": "cut", "targets": [ "CsgCube" ] }
Durable build evidence
Build information
- Build scope
main- Build variant
csg-cube- Physical owner
csg-cube- Built source
1f2fdb32d67d9af42779500c949f2900ee59c7ae- Forge
v0.23.0 ·- SolidCraft
0.49.0- Runtime
ghcr.io/brainboxemb/cad-solidcraft:v0.3.6
