1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00

thicken road

This commit is contained in:
Justin Lin
2021-12-09 10:45:07 +08:00
parent 1d946647eb
commit 6d212c8722

View File

@@ -69,14 +69,14 @@ module random_city(rows, columns, mask) {
halfTW = tileW / 2; halfTW = tileW / 2;
translate([0, halfTW / 1.6, 2.25]) translate([0, halfTW / 1.6, 2.25])
linear_extrude(9.9) linear_extrude(10)
rounded_square(halfRW / 2.5, corner_r = .8, center = true, $fn = 6); rounded_square(halfRW / 1.25, corner_r = .8, center = true, $fn = 6);
translate([0, halfTW / 1.6, 11.56]) translate([0, halfTW / 1.6, 11.56])
rotate([90, 0, 0]) rotate([90, 0, 0])
linear_extrude(halfRW / 2.25, center = true) linear_extrude(halfRW / 1.225, center = true)
polygon( polygon(
shape_trapezium([halfRW, roadW * 0.9], shape_trapezium([halfRW / 1.25, roadW * 0.9],
h = halfRW / 3, h = halfRW / 3,
corner_r = 0) corner_r = 0)
); );
@@ -169,10 +169,10 @@ module random_city(rows, columns, mask) {
translate([0, -halfTW / 2, 1]) translate([0, -halfTW / 2, 1])
shear(sz = [0, .5]){ shear(sz = [0, .5]){
translate([-halfRW, 0]) translate([-halfRW, 0])
linear_extrude(1) linear_extrude(2)
square([roadW, roadL]); square([roadW, roadL]);
linear_extrude(2) linear_extrude(3)
difference() { difference() {
translate([-halfRW, 0]) translate([-halfRW, 0])
square([roadW, roadL]); square([roadW, roadL]);
@@ -245,10 +245,10 @@ module random_city(rows, columns, mask) {
module road() { module road() {
translate([halfTW, halfTW, halfTW * 0.5 + 4.75]) { translate([halfTW, halfTW, halfTW * 0.5 + 4.75]) {
linear_extrude(1) linear_extrude(2)
arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64); arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64);
linear_extrude(2) linear_extrude(3)
difference() { difference() {
arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64); arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64);
arc(radius = halfTW, angle = [180, 270], width = roadW - 2, $fn = 64); arc(radius = halfTW, angle = [180, 270], width = roadW - 2, $fn = 64);
@@ -299,10 +299,10 @@ module random_city(rows, columns, mask) {
module road() { module road() {
translate([0, 0, halfTW * 0.5 + 4.75]) { translate([0, 0, halfTW * 0.5 + 4.75]) {
linear_extrude(1) linear_extrude(2)
square([roadW, roadL], center = true); square([roadW, roadL], center = true);
linear_extrude(2) linear_extrude(3)
difference() { difference() {
square([roadW, roadL], center = true); square([roadW, roadL], center = true);
square([roadW - 2, roadL], center = true); square([roadW - 2, roadL], center = true);
@@ -344,10 +344,10 @@ module random_city(rows, columns, mask) {
module road() { module road() {
translate([halfTW, halfTW, halfTW * 0.5 + 4.75]) { translate([halfTW, halfTW, halfTW * 0.5 + 4.75]) {
linear_extrude(1) linear_extrude(2)
arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64); arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64);
linear_extrude(2) linear_extrude(3)
difference() { difference() {
arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64); arc(radius = halfTW, angle = [180, 270], width = roadW, $fn = 64);
arc(radius = halfTW, angle = [180, 270], width = roadW - 2, $fn = 64); arc(radius = halfTW, angle = [180, 270], width = roadW - 2, $fn = 64);
@@ -394,13 +394,13 @@ module random_city(rows, columns, mask) {
} }
translate([0, 0, halfTW * 0.5 + 4.75]) { translate([0, 0, halfTW * 0.5 + 4.75]) {
linear_extrude(1) linear_extrude(2)
intersection() { intersection() {
square(tileW, center = true); square(tileW, center = true);
road_shape(); road_shape();
} }
linear_extrude(2) linear_extrude(3)
intersection() { intersection() {
square(tileW, center = true); square(tileW, center = true);
difference() { difference() {