mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-15 03:05:41 +02:00
added "HULL_LINES" option
This commit is contained in:
@@ -22,7 +22,7 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") {
|
|||||||
rows = len(points);
|
rows = len(points);
|
||||||
columns = len(points[0]);
|
columns = len(points[0]);
|
||||||
|
|
||||||
// Increasing $fn will be slow when you use "LINES" or "HULL_FACES".
|
// Increasing $fn will be slow when you use "LINES", "HULL_FACES" or "HULL_LINES".
|
||||||
|
|
||||||
module faces() {
|
module faces() {
|
||||||
function xy_to_index(x, y, columns) = y * columns + x;
|
function xy_to_index(x, y, columns) = y * columns + x;
|
||||||
@@ -162,6 +162,11 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") {
|
|||||||
polyline3d(concat(tri2, [tri2[0]]), thickness);
|
polyline3d(concat(tri2, [tri2[0]]), thickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module tri_to_hull_lines(tri1, tri2) {
|
||||||
|
hull_polyline3d(concat(tri1, [tri1[0]]), thickness);
|
||||||
|
hull_polyline3d(concat(tri2, [tri2[0]]), thickness);
|
||||||
|
}
|
||||||
|
|
||||||
module hull_pts(tri) {
|
module hull_pts(tri) {
|
||||||
half_thickness = thickness / 2;
|
half_thickness = thickness / 2;
|
||||||
hull() {
|
hull() {
|
||||||
@@ -179,15 +184,13 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") {
|
|||||||
module tri_to_graph(tri1, tri2) {
|
module tri_to_graph(tri1, tri2) {
|
||||||
if(style == "LINES") {
|
if(style == "LINES") {
|
||||||
tri_to_lines(tri1, tri2);
|
tri_to_lines(tri1, tri2);
|
||||||
} else { // Warning: May be very slow!!
|
} else if(style == "HULL_FACES") { // Warning: May be very slow!!
|
||||||
tri_to_hull_faces(tri1, tri2);
|
tri_to_hull_faces(tri1, tri2);
|
||||||
|
} else if(style == "HULL_LINES") { // Warning: very very slow!!
|
||||||
|
tri_to_hull_lines(tri1, tri2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(style == "FACES") {
|
if(style == "FACES") {
|
||||||
faces();
|
faces();
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user