@ -72,25 +72,25 @@ leftSpacerShape = boxModuleFn(width = leftSpacerWidth)
 | 
			
		||||
 | 
			
		||||
// Module for power switch including front plate and red rocker button
 | 
			
		||||
switchPosition = leftSpacerPosition + leftSpacerWidth / 2 + moduleWidth / 2
 | 
			
		||||
swtichWidth = moduleWidth
 | 
			
		||||
switchWidth = moduleWidth
 | 
			
		||||
 | 
			
		||||
// Switch Body
 | 
			
		||||
switchBody = boxModuleFn(width = moduleWidth)
 | 
			
		||||
 | 
			
		||||
// Switch Plate
 | 
			
		||||
swtichPlateWidth = 20
 | 
			
		||||
switchPlateWidth = 20
 | 
			
		||||
switchPlateHeight = 30
 | 
			
		||||
switchPlateThickness = 3
 | 
			
		||||
switchPlateShape = startSketchOn(switchBody, face = END)
 | 
			
		||||
  |> startProfile(
 | 
			
		||||
       %,
 | 
			
		||||
       at = [
 | 
			
		||||
         -swtichPlateWidth / 2,
 | 
			
		||||
         -switchPlateWidth / 2,
 | 
			
		||||
         -switchPlateHeight / 2
 | 
			
		||||
       ],
 | 
			
		||||
     )
 | 
			
		||||
  |> yLine(length = switchPlateHeight)
 | 
			
		||||
  |> xLine(length = swtichPlateWidth)
 | 
			
		||||
  |> xLine(length = switchPlateWidth)
 | 
			
		||||
  |> yLine(length = -switchPlateHeight)
 | 
			
		||||
  |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
  |> close()
 | 
			
		||||
@ -104,8 +104,8 @@ switchPlateBody = extrude(switchPlateShape, length = switchPlateThickness)
 | 
			
		||||
 | 
			
		||||
// Switch Button
 | 
			
		||||
switchButtonHeight = 26
 | 
			
		||||
swtichButtonWidth = 15
 | 
			
		||||
switchButtonShape = startSketchOn(offsetPlane(-YZ, offset = -swtichButtonWidth / 2))
 | 
			
		||||
switchButtonWidth = 15
 | 
			
		||||
switchButtonShape = startSketchOn(offsetPlane(-YZ, offset = -switchButtonWidth / 2))
 | 
			
		||||
  |> startProfile(
 | 
			
		||||
       %,
 | 
			
		||||
       at = [
 | 
			
		||||
@ -121,7 +121,7 @@ switchButtonShape = startSketchOn(offsetPlane(-YZ, offset = -swtichButtonWidth /
 | 
			
		||||
     ])
 | 
			
		||||
  |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
  |> close()
 | 
			
		||||
switchButtonBody = extrude(switchButtonShape, length = swtichButtonWidth)
 | 
			
		||||
switchButtonBody = extrude(switchButtonShape, length = switchButtonWidth)
 | 
			
		||||
  |> translate(
 | 
			
		||||
       %,
 | 
			
		||||
       x = switchPosition,
 | 
			
		||||
@ -132,7 +132,7 @@ switchButtonBody = extrude(switchButtonShape, length = swtichButtonWidth)
 | 
			
		||||
 | 
			
		||||
// Spacer between switch and plug modules for layout alignment
 | 
			
		||||
secondSpacerWidth = moduleWidth / 2
 | 
			
		||||
secondSpacerPosition = switchPosition + swtichWidth / 2 + secondSpacerWidth / 2
 | 
			
		||||
secondSpacerPosition = switchPosition + switchWidth / 2 + secondSpacerWidth / 2
 | 
			
		||||
secondSpacerBody = boxModuleFn(width = secondSpacerWidth)
 | 
			
		||||
  |> translate(
 | 
			
		||||
       %,
 | 
			
		||||
 | 
			
		||||
@ -53,8 +53,8 @@ baseSlab = boxFn(plane = XY, width = slabWidth, height = -baseThickness)
 | 
			
		||||
  |> appearance(%, color = "#dbd7d2")
 | 
			
		||||
 | 
			
		||||
// Create ground platform beneath the base
 | 
			
		||||
goundSize = 50
 | 
			
		||||
groundBody = boxFn(plane = offsetPlane(XY, offset = -baseThickness), width = goundSize, height = -5)
 | 
			
		||||
groundSize = 50
 | 
			
		||||
groundBody = boxFn(plane = offsetPlane(XY, offset = -baseThickness), width = groundSize, height = -5)
 | 
			
		||||
  |> appearance(%, color = "#3a3631")
 | 
			
		||||
 | 
			
		||||
// Create a single slab with handrail height to be reused with pattern
 | 
			
		||||
 | 
			
		||||
@ -3271,7 +3271,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
          "id": {
 | 
			
		||||
            "commentStart": 0,
 | 
			
		||||
            "end": 0,
 | 
			
		||||
            "name": "swtichWidth",
 | 
			
		||||
            "name": "switchWidth",
 | 
			
		||||
            "start": 0,
 | 
			
		||||
            "type": "Identifier"
 | 
			
		||||
          },
 | 
			
		||||
@ -3385,7 +3385,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
          "id": {
 | 
			
		||||
            "commentStart": 0,
 | 
			
		||||
            "end": 0,
 | 
			
		||||
            "name": "swtichPlateWidth",
 | 
			
		||||
            "name": "switchPlateWidth",
 | 
			
		||||
            "start": 0,
 | 
			
		||||
            "type": "Identifier"
 | 
			
		||||
          },
 | 
			
		||||
@ -3586,7 +3586,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
                              "name": {
 | 
			
		||||
                                "commentStart": 0,
 | 
			
		||||
                                "end": 0,
 | 
			
		||||
                                "name": "swtichPlateWidth",
 | 
			
		||||
                                "name": "switchPlateWidth",
 | 
			
		||||
                                "start": 0,
 | 
			
		||||
                                "type": "Identifier"
 | 
			
		||||
                              },
 | 
			
		||||
@ -3768,7 +3768,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
                      "name": {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "name": "swtichPlateWidth",
 | 
			
		||||
                        "name": "switchPlateWidth",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Identifier"
 | 
			
		||||
                      },
 | 
			
		||||
@ -4257,7 +4257,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
          "id": {
 | 
			
		||||
            "commentStart": 0,
 | 
			
		||||
            "end": 0,
 | 
			
		||||
            "name": "swtichButtonWidth",
 | 
			
		||||
            "name": "switchButtonWidth",
 | 
			
		||||
            "start": 0,
 | 
			
		||||
            "type": "Identifier"
 | 
			
		||||
          },
 | 
			
		||||
@ -4339,7 +4339,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
                            "name": {
 | 
			
		||||
                              "commentStart": 0,
 | 
			
		||||
                              "end": 0,
 | 
			
		||||
                              "name": "swtichButtonWidth",
 | 
			
		||||
                              "name": "switchButtonWidth",
 | 
			
		||||
                              "start": 0,
 | 
			
		||||
                              "type": "Identifier"
 | 
			
		||||
                            },
 | 
			
		||||
@ -4994,7 +4994,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
                      "name": {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "name": "swtichButtonWidth",
 | 
			
		||||
                        "name": "switchButtonWidth",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Identifier"
 | 
			
		||||
                      },
 | 
			
		||||
@ -5329,7 +5329,7 @@ description: Result of parsing pdu-faceplate.kcl
 | 
			
		||||
                  "name": {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "name": "swtichWidth",
 | 
			
		||||
                    "name": "switchWidth",
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "Identifier"
 | 
			
		||||
                  },
 | 
			
		||||
 | 
			
		||||
@ -17406,6 +17406,19 @@ description: Variables in memory after executing pdu-faceplate.kcl
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "switchButtonWidth": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 15.0,
 | 
			
		||||
    "ty": {
 | 
			
		||||
      "type": "Default",
 | 
			
		||||
      "len": {
 | 
			
		||||
        "type": "Mm"
 | 
			
		||||
      },
 | 
			
		||||
      "angle": {
 | 
			
		||||
        "type": "Degrees"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "switchPlateBody": {
 | 
			
		||||
    "type": "Solid",
 | 
			
		||||
    "value": {
 | 
			
		||||
@ -18170,6 +18183,19 @@ description: Variables in memory after executing pdu-faceplate.kcl
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "switchPlateWidth": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 20.0,
 | 
			
		||||
    "ty": {
 | 
			
		||||
      "type": "Default",
 | 
			
		||||
      "len": {
 | 
			
		||||
        "type": "Mm"
 | 
			
		||||
      },
 | 
			
		||||
      "angle": {
 | 
			
		||||
        "type": "Degrees"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "switchPosition": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": -158.4,
 | 
			
		||||
@ -18183,33 +18209,7 @@ description: Variables in memory after executing pdu-faceplate.kcl
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "swtichButtonWidth": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 15.0,
 | 
			
		||||
    "ty": {
 | 
			
		||||
      "type": "Default",
 | 
			
		||||
      "len": {
 | 
			
		||||
        "type": "Mm"
 | 
			
		||||
      },
 | 
			
		||||
      "angle": {
 | 
			
		||||
        "type": "Degrees"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "swtichPlateWidth": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 20.0,
 | 
			
		||||
    "ty": {
 | 
			
		||||
      "type": "Default",
 | 
			
		||||
      "len": {
 | 
			
		||||
        "type": "Mm"
 | 
			
		||||
      },
 | 
			
		||||
      "angle": {
 | 
			
		||||
        "type": "Degrees"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "swtichWidth": {
 | 
			
		||||
  "switchWidth": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 40.45,
 | 
			
		||||
    "ty": {
 | 
			
		||||
 | 
			
		||||
@ -61,32 +61,32 @@ flowchart LR
 | 
			
		||||
    50[Solid2d]
 | 
			
		||||
  end
 | 
			
		||||
  subgraph path13 [Path]
 | 
			
		||||
    13["Path<br>[2227, 2279, 0]"]
 | 
			
		||||
    13["Path<br>[2229, 2281, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
 | 
			
		||||
    35["Segment<br>[2285, 2318, 0]"]
 | 
			
		||||
    35["Segment<br>[2287, 2320, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
 | 
			
		||||
    36["Segment<br>[2324, 2357, 0]"]
 | 
			
		||||
    36["Segment<br>[2326, 2359, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
 | 
			
		||||
    37["Segment<br>[2363, 2397, 0]"]
 | 
			
		||||
    37["Segment<br>[2365, 2399, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
 | 
			
		||||
    38["Segment<br>[2403, 2459, 0]"]
 | 
			
		||||
    38["Segment<br>[2405, 2461, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
 | 
			
		||||
    39["Segment<br>[2465, 2473, 0]"]
 | 
			
		||||
    39["Segment<br>[2467, 2475, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
 | 
			
		||||
    49[Solid2d]
 | 
			
		||||
  end
 | 
			
		||||
  subgraph path14 [Path]
 | 
			
		||||
    14["Path<br>[2803, 2858, 0]"]
 | 
			
		||||
    14["Path<br>[2805, 2860, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
 | 
			
		||||
    40["Segment<br>[2864, 2893, 0]"]
 | 
			
		||||
    40["Segment<br>[2866, 2895, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
 | 
			
		||||
    41["Segment<br>[2899, 2929, 0]"]
 | 
			
		||||
    41["Segment<br>[2901, 2931, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
 | 
			
		||||
    42["Segment<br>[2935, 2969, 0]"]
 | 
			
		||||
    42["Segment<br>[2937, 2971, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
 | 
			
		||||
    43["Segment<br>[2975, 3031, 0]"]
 | 
			
		||||
    43["Segment<br>[2977, 3033, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
 | 
			
		||||
    44["Segment<br>[3037, 3045, 0]"]
 | 
			
		||||
    44["Segment<br>[3039, 3047, 0]"]
 | 
			
		||||
      %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
 | 
			
		||||
    45[Solid2d]
 | 
			
		||||
  end
 | 
			
		||||
@ -94,17 +94,17 @@ flowchart LR
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  2["Plane<br>[945, 965, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  3["Plane<br>[1713, 1753, 0]"]
 | 
			
		||||
  3["Plane<br>[1714, 1754, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 21 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }, CallKwArg { index: 0 }]
 | 
			
		||||
  4["Plane<br>[1937, 1990, 0]"]
 | 
			
		||||
  4["Plane<br>[1939, 1992, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 22 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 0 }]
 | 
			
		||||
  5["Plane<br>[2780, 2797, 0]"]
 | 
			
		||||
  5["Plane<br>[2782, 2799, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  6["StartSketchOnPlane<br>[945, 965, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  7["StartSketchOnPlane<br>[945, 965, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  8["StartSketchOnFace<br>[2171, 2221, 0]"]
 | 
			
		||||
  8["StartSketchOnFace<br>[2173, 2223, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  51["Sweep Extrusion<br>[1209, 1240, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit]
 | 
			
		||||
@ -114,9 +114,9 @@ flowchart LR
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit]
 | 
			
		||||
  54["Sweep Extrusion<br>[1209, 1240, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit]
 | 
			
		||||
  55["Sweep Extrusion<br>[2545, 2593, 0]"]
 | 
			
		||||
  55["Sweep Extrusion<br>[2547, 2595, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
 | 
			
		||||
  56["Sweep Extrusion<br>[3051, 3082, 0]"]
 | 
			
		||||
  56["Sweep Extrusion<br>[3053, 3084, 0]"]
 | 
			
		||||
    %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
 | 
			
		||||
  57[Wall]
 | 
			
		||||
    %% face_code_ref=Missing NodePath
 | 
			
		||||
 | 
			
		||||
@ -1997,7 +1997,7 @@ description: Result of parsing spinning-highrise-tower.kcl
 | 
			
		||||
          "id": {
 | 
			
		||||
            "commentStart": 0,
 | 
			
		||||
            "end": 0,
 | 
			
		||||
            "name": "goundSize",
 | 
			
		||||
            "name": "groundSize",
 | 
			
		||||
            "start": 0,
 | 
			
		||||
            "type": "Identifier"
 | 
			
		||||
          },
 | 
			
		||||
@ -2138,7 +2138,7 @@ description: Result of parsing spinning-highrise-tower.kcl
 | 
			
		||||
                      "name": {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "name": "goundSize",
 | 
			
		||||
                        "name": "groundSize",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Identifier"
 | 
			
		||||
                      },
 | 
			
		||||
 | 
			
		||||
@ -3936,19 +3936,6 @@ description: Variables in memory after executing spinning-highrise-tower.kcl
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "goundSize": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 50.0,
 | 
			
		||||
    "ty": {
 | 
			
		||||
      "type": "Default",
 | 
			
		||||
      "len": {
 | 
			
		||||
        "type": "M"
 | 
			
		||||
      },
 | 
			
		||||
      "angle": {
 | 
			
		||||
        "type": "Degrees"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "groundBody": {
 | 
			
		||||
    "type": "Solid",
 | 
			
		||||
    "value": {
 | 
			
		||||
@ -4148,6 +4135,19 @@ description: Variables in memory after executing spinning-highrise-tower.kcl
 | 
			
		||||
      "sectional": false
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "groundSize": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 50.0,
 | 
			
		||||
    "ty": {
 | 
			
		||||
      "type": "Default",
 | 
			
		||||
      "len": {
 | 
			
		||||
        "type": "M"
 | 
			
		||||
      },
 | 
			
		||||
      "angle": {
 | 
			
		||||
        "type": "Degrees"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "handrailHeight": {
 | 
			
		||||
    "type": "Number",
 | 
			
		||||
    "value": 1.2,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user