mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-07 16:06:31 +02:00
Remove old commented code from dimension.scad
This commit is contained in:
@@ -27,7 +27,6 @@ include <../utils/maths.scad>
|
|||||||
|
|
||||||
|
|
||||||
//if text is empty, will display the number value
|
//if text is empty, will display the number value
|
||||||
//text_plane is either "XY" or "XZ"
|
|
||||||
module dimension(startpoint, endpoint, text = "", thickness = 0.1) {
|
module dimension(startpoint, endpoint, text = "", thickness = 0.1) {
|
||||||
// Compute vector between points
|
// Compute vector between points
|
||||||
direction = endpoint - startpoint;
|
direction = endpoint - startpoint;
|
||||||
@@ -37,12 +36,8 @@ module dimension(startpoint, endpoint, text = "", thickness = 0.1) {
|
|||||||
// Ensure nonzero values for calculations
|
// Ensure nonzero values for calculations
|
||||||
dir_xy = norm([direction.x, direction.y]);
|
dir_xy = norm([direction.x, direction.y]);
|
||||||
|
|
||||||
// Compute rotation angles safely
|
// Compute rotation angles
|
||||||
//azimuth = (dir_xy == 0) ? 0 : atan2(direction.y, direction.x);
|
|
||||||
azimuth = atan2(direction.y, direction.x);
|
azimuth = atan2(direction.y, direction.x);
|
||||||
/*elevation = (direction.x == 0 && direction.y == 0)
|
|
||||||
? ((direction.z > 0) ? -90 : 90)
|
|
||||||
: -atan2(direction.z, dir_xy);*/
|
|
||||||
elevation = -atan2(direction.z, dir_xy);
|
elevation = -atan2(direction.z, dir_xy);
|
||||||
|
|
||||||
// Draw measurement line as a thin cylinder
|
// Draw measurement line as a thin cylinder
|
||||||
|
Reference in New Issue
Block a user