class OraniserClipRepair : Model { var size = Vector3( 17, 13, 2 ) var width = 17 var lipSize = Vector2( 5, 1.2 ) var angle = 1.5 @Piece( print="toPrint" ) meth upright() : Shape3d { val main = Cube( size ) .backTo(0) .topTo(0) .color("Orange") val lip = Square( size.x, lipSize.x ) .roundCorner(0, 5 ) .extrude( lipSize.y ) .rotateX(90) .frontTo(main.front) .topTo(0) .color( "Red" ) val back = Square( size.x, 2 ) .rightTo( main.right ) .extrude( 25 ) // Was 10 .topTo(0) .rotateX(angle) //.translateY( main.back - 2 ) .color( "Yellow") val reinforcement = Cube( 2, size.y, lip.size.z ) .backTo(0.5) // Ensure it overlaps the angled yellow piece. .topTo(0) .rightTo(main.right) //.rotateY(angle) .color("green") return main + lip + back + reinforcement } @Piece meth toPrint() = upright().rightTo(0).rotateY(90).bottomTo(0) override fun build() : Shape3d { return upright() } }