1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-16 04:13:57 +02:00

added dimensions

This commit is contained in:
Alex Verschoot
2025-03-02 20:18:17 +01:00
parent 0b8ad93dc5
commit dc683ed701
3 changed files with 267 additions and 0 deletions

81
tests/dimension.scad Normal file
View File

@@ -0,0 +1,81 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../utils/core/core.scad>
use <../utils/dimension.scad>
module dimensions_3d_xy() {
dimension([0,0,0], [10,10,0], "", 0.2);
dimension([0,0,0], [10,-10,0], "", 0.2);
dimension([0,0,0], [-10,10,0], "", 0.2);
dimension([0,0,0], [-10,-10,0], "", 0.2);
dimension([0,0,0], [0,10,0], "", 0.2);
dimension([0,0,0], [0,-10,0], "", 0.2);
dimension([0,0,0], [10,0,0], "", 0.2);
dimension([0,0,0], [-10,0,0], "", 0.2);
}
module dimensions_3d_xyz() {
dimension([0,0,0], [10,10,10], "", 0.2);
dimension([0,0,0], [10,-10,10], "", 0.2);
dimension([0,0,0], [-10,10,10], "", 0.2);
dimension([0,0,0], [-10,-10,10], "", 0.2);
dimension([0,0,0], [10,10,-10], "", 0.2);
dimension([0,0,0], [10,-10,-10], "", 0.2);
dimension([0,0,0], [-10,10,-10], "", 0.2);
dimension([0,0,0], [-10,-10,-10], "", 0.2);
dimension([0,0,0], [-3,0,10], "", 0.2);
dimension([0,0,0], [0,0,-10], "", 0.2);
dimension([0,0,0], [0,2,10], "", 0.2);
dimension([0,0,0], [0,2,-10], "", 0.2);
}
module dimension_1d_x() {
dimension_x([12,0,0], [18,0,0]);
dimension_x([12,5,0], [18,10,0]);
dimension_x([12,5,0], [18,10,5]);
}
module dimension_1d_y() {
dimension_y([12,0,0], [12,-5,0]);
dimension_y([12,-8,0], [18,-10,0]);
dimension_y([12,-5,0], [18,-10,5]);
}
module dimension_1d_z() {
dimension_z([20,0,0], [20,0,5]);
dimension_z([20,0,0], [20,0,10]);
dimension_z([20,0,0], [20,10,10]);
}
if($preview)
dimensions_3d_xy();
dimensions_3d_xyz();
dimension_1d_x();
dimension_1d_y();
dimension_1d_z();