Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is that possible to draw a line using Openscad by joining different points?

I'm trying regularly to join the different points to draw the straight line in OpenScad. But I could'nt able to find any way to draw the line. But I can able to draw the definite shapes like cubes,spheres,cylinders,etc... So please help me by directing to get into the correct program coding to draw the straight lines by joining the different points.

like image 834
Saravana Bhavan Avatar asked Oct 24 '25 18:10

Saravana Bhavan


1 Answers

OpenSCAD currently doesn't have a line primitive; all primitives have to be closed volumes or closed polygons. You can simulate a "line" in space by using hull(), and even package that as a module:

module line(start, end, thickness = 1) {
    hull() {
        translate(start) sphere(thickness);
        translate(end) sphere(thickness);
    }
}

line([0,0,0], [5,23,42]);
like image 94
kintel Avatar answered Oct 26 '25 10:10

kintel