Skip to content

BASIC / SAMPLE-PLATE

SamplePlate

Three named sketches, a native two-hole pattern and a raised boss

Built in SolidCraft 0.49.0 26 commands

Model preview

SamplePlate SolidCraft build

Builds a centered plate with native Base, Holes and Bore sketches. One parameter-driven Ø8 hole cut is repeated by a native rectangular pattern, while a Ø24 boss is joined between the two cuts.

Key dimensions: 80 × 50 × 8 mm; R6; Ø24 × 14 boss

Drawing sheet

Native SolidCraft drawing evidence from the accepted build scope. The page loads only the static sheet preview; the vector PDF opens only when you ask for it.

Open in SolidCraft Web

The editable .sc model is loaded directly from the accepted build branch.

SCPF source

The exact SCPF Python source declared by this build variant.

scpf/model.py
@component
class SamplePlate:
    """Build the sample plate from object-level CAD intent."""

    width = 80
    depth = 50
    thickness = 8

    def build(self):
        with Sketch(name="Base", plane="XY") as sketch:
            Rectangle2D(self.width, self.depth)
        plate = sketch.extrude(self.thickness)
        plate = plate.fillet(6, edges=Edges.VERTICAL)

        # One source cut, then a real native SolidCraft rectangular pattern.
        # The first hole and the pitch both keep their width relationship.
        with Sketch(name="Holes", on=plate, parent=Anchor.TOP) as holes:
            holes.add(
                Circle2D(d=8),
                offset=(-half(self.width - 24), 0),
            )
        source_cut = holes.extrude(Depth.THROUGH_ALL)
        plate = plate - source_cut
        plate = plate.rectangular_pattern(
            source_cut,
            count=2,
            spacing=self.width - 24,
            direction=Axis.X,
        )

        boss = Cylinder(d=24, h=14).attach(
            plate,
            parent=Anchor.TOP,
            child=Anchor.BOTTOM,
        )
        plate = plate + boss

        bore = Hole(d=12, depth=Depth.THROUGH_ALL).attach(
            plate,
            parent=Anchor.TOP,
        )
        return plate + bore


def sample_plate():
    """Final SamplePlate design with one native A4 technical drawing."""
    return SamplePlate().with_drawing(name="SamplePlate")


sample_plate()
SolidCraft command sequence 26 generated operations · expand to inspect
  1. component.create
    {
       "grounded": true,
       "name": "SamplePlate"
    }
    
  2. sketch.create
    {
       "name": "d1_SamplePlate__Base",
       "plane": "XY"
    }
    
  3. sketch.rectangle.two_point
    {
       "p0": [
          -40,
          -25
       ],
       "p1": [
          40,
          25
       ]
    }
    
  4. sketch.finish
  5. solid.extrude
    {
       "body_name": "SamplePlate",
       "direction": "positive",
       "distance": 8
    }
    
  6. solid.fillet
    {
       "body": "SamplePlate",
       "edges": [
          [
             -40,
             -25,
             4
          ],
          [
             40,
             -25,
             4
          ],
          [
             40,
             25,
             4
          ],
          [
             -40,
             25,
             4
          ]
       ],
       "radius": 6
    }
    
  7. model.faces
    {
       "body": "SamplePlate"
    }
    
  8. sketch.create
    {
       "name": "d1_SamplePlate__Holes",
       "plane": {
          "body": "SamplePlate",
          "face": "$d1_SamplePlate_face_point_1",
          "index": "$d1_SamplePlate_face_index_1"
       },
       "project_edges": false
    }
    
  9. sketch.circle.center
    {
       "center": [
          -28,
          0
       ],
       "diameter": 8
    }
    
  10. sketch.finish
  11. solid.extrude
    {
       "direction": "negative",
       "name": "Holes",
       "operation": "cut",
       "targets": [
          "SamplePlate"
       ],
       "through_all": true
    }
    
  12. solid.pattern.rectangular
    {
       "alignment": "right",
       "count1": 2,
       "dir1": [
          1,
          0,
          0
       ],
       "features": [
          "Holes"
       ],
       "reversed": false,
       "spacing1": 56
    }
    
  13. solid.cylinder
    {
       "axis": "Z",
       "base": [
          0,
          0,
          8
       ],
       "diameter": 24,
       "height": 14,
       "operation": "join",
       "references": [
          {
             "distance": 40,
             "edge": [
                -40,
                0,
                8
             ]
          },
          {
             "distance": 25,
             "edge": [
                0,
                -25,
                8
             ]
          }
       ],
       "targets": [
          "SamplePlate"
       ]
    }
    
  14. sketch.create
    {
       "name": "d1_SamplePlate__Bore",
       "offset": 22,
       "plane": "XY"
    }
    
  15. sketch.circle.center
    {
       "center": [
          0,
          0
       ],
       "diameter": 12
    }
    
  16. sketch.finish
  17. solid.extrude
    {
       "direction": "negative",
       "distance": 22,
       "name": "Bore",
       "operation": "cut",
       "targets": [
          "SamplePlate"
       ]
    }
    
  18. component.activate
    {
       "component": "root"
    }
    
  19. drawing.create
    {
       "first_sheet_name": "Sheet 1",
       "name": "SamplePlate",
       "template": "iso-a4-part"
    }
    
  20. drawing.sheet.set
    {
       "documents": {
          "component": "$component_1",
          "source": "$drawing_1_source"
       },
       "orientation": "landscape",
       "sheet": "$drawing_1_sheet"
    }
    
  21. drawing.inspect
  22. drawing.view.standard
    {
       "gap_mm": 20,
       "iso": true,
       "sheet": "$drawing_1_sheet"
    }
    
  23. drawing.view.edit
    {
       "set": {
          "source": {
             "occurrences": [
                [
                   "$sampleplate"
                ]
             ]
          }
       },
       "view": "$drawing_1_front"
    }
    
  24. drawing.view.edit
    {
       "set": {
          "source": {
             "occurrences": [
                [
                   "$sampleplate"
                ]
             ]
          }
       },
       "view": "$drawing_1_iso"
    }
    
  25. drawing.inspect
  26. drawing.close

Build information

Build scope
main
Build variant
sample-plate
Physical owner
sample-plate
Built source
1f2fdb32d67d9af42779500c949f2900ee59c7ae
Forge
v0.23.0 ·
SolidCraft
0.49.0
Runtime
ghcr.io/brainboxemb/cad-solidcraft:v0.3.6