mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-02-19 01:59:39 +00:00
Vertex numbers are now rotated to face viewer when re-previewed.
This commit is contained in:
parent
3fcd53b649
commit
6714c3dcf8
1 changed files with 6 additions and 6 deletions
12
debug.scad
12
debug.scad
|
@ -124,12 +124,12 @@ module debug_vertices(vertices, size=1, disabled=false) {
|
||||||
for (i = [0:len(vertices)-1]) {
|
for (i = [0:len(vertices)-1]) {
|
||||||
v = vertices[i];
|
v = vertices[i];
|
||||||
translate(v) {
|
translate(v) {
|
||||||
zrot(atan2(v[1],v[0])+90) xrot(90) {
|
up(size/8) zrot($vpr[2]) xrot(90) {
|
||||||
linear_extrude(height=size/10, center=true, convexity=10) {
|
linear_extrude(height=size/10, center=true, convexity=10) {
|
||||||
text(text=str(i), size=size, halign="center", valign="bottom");
|
text(text=str(i), size=size, halign="center");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sphere(0.02);
|
sphere(size/10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,9 +220,9 @@ module debug_faces(vertices, faces, size=1, disabled=false) {
|
||||||
// txtsize = The size of the text used to label the faces and vertices.
|
// txtsize = The size of the text used to label the faces and vertices.
|
||||||
// disabled = If true, act exactly like `polyhedron()`. Default = false.
|
// disabled = If true, act exactly like `polyhedron()`. Default = false.
|
||||||
// Example:
|
// Example:
|
||||||
// pts = [[-5,0,-5], [5,0,-5], [0,-5,5], [0,5,5]];
|
pts = [[-5,0,-5], [5,0,-5], [0,-5,5], [0,5,5]];
|
||||||
// fcs = [[0,2,1], [1,2,3], [1,3,0], [0,2,3]]; // Last face reversed
|
fcs = [[0,2,1], [1,2,3], [1,3,0], [0,2,3]]; // Last face reversed
|
||||||
// debug_polyhedron(points=pts, faces=fcs, txtsize=1);
|
debug_polyhedron(points=pts, faces=fcs, txtsize=1);
|
||||||
module debug_polyhedron(points, faces, convexity=10, txtsize=1, disabled=false) {
|
module debug_polyhedron(points, faces, convexity=10, txtsize=1, disabled=false) {
|
||||||
debug_faces(vertices=points, faces=faces, size=txtsize, disabled=disabled) {
|
debug_faces(vertices=points, faces=faces, size=txtsize, disabled=disabled) {
|
||||||
polyhedron(points=points, faces=faces, convexity=convexity);
|
polyhedron(points=points, faces=faces, convexity=convexity);
|
||||||
|
|
Loading…
Reference in a new issue