1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-21 22:55:26 +02:00

replaced the new math functions with rotate and transform

This commit is contained in:
Alex Verschoot
2025-03-13 22:37:53 +01:00
parent 0123885711
commit 3a62198183
2 changed files with 3 additions and 27 deletions

View File

@@ -59,9 +59,9 @@ module dimension(startpoint, endpoint, text = "", thickness = 0.1) {
// Draw the text/distance
dir = (length > 0) ? (direction / length) * thickness * 4 : [1, 0, 0];
up_dir = rotate_vector_3d([0,1,0], [0,0,1] ,azimuth);
up_dir = transform([0,1,0], rotate(azimuth));
translate(midpoint + up_dir*0.66)
translate(midpoint + up_dir*thickness)
rotate([0, elevation, azimuth])
linear_extrude(thickness)
text(text == "" ? str(length) : text, size = thickness * 5, valign = "bottom", halign = "center");