discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Roof parameters

SL
Steve Lelievre
Mon, Mar 25, 2024 4:31 PM

I've been been digging around on the Web and on the mailing list
archive, trying to find out about the parameters for the roof() module -
no luck. Where's the best place to see a summary?

Thanks,

Steve

I've been been digging around on the Web and on the mailing list archive, trying to find out about the parameters for the roof() module - no luck. Where's the best place to see a summary? Thanks, Steve
RD
Revar Desmera
Tue, Mar 26, 2024 4:07 AM

Looking at the source code, the arguments to roof() are method=, which can take values of "voronoi" or "straight", and convexity=, which is familiar from linear_extrude(), etc.

Other than that, it looks like it can take the usual $fn/$fa/$fs suspects.

  • Revar

On Mar 25, 2024, at 9:31 AM, Steve Lelievre via Discuss discuss@lists.openscad.org wrote:

I've been been digging around on the Web and on the mailing list archive, trying to find out about the parameters for the roof() module - no luck. Where's the best place to see a summary?

Thanks,

Steve


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Looking at the source code, the arguments to `roof()` are method=, which can take values of "voronoi" or "straight", and convexity=, which is familiar from `linear_extrude()`, etc. Other than that, it looks like it can take the usual `$fn`/`$fa`/`$fs` suspects. - Revar > On Mar 25, 2024, at 9:31 AM, Steve Lelievre via Discuss <discuss@lists.openscad.org> wrote: > > > I've been been digging around on the Web and on the mailing list archive, trying to find out about the parameters for the roof() module - no luck. Where's the best place to see a summary? > > Thanks, > > Steve > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SL
Steve Lelievre
Tue, Mar 26, 2024 3:52 PM

Revar, thanks for hunting out that information.

I was expecting there to be a parameter for the roof's pitch angle but
now I have realized it isn't needed, as I can scale the result by tan of
the pitch angle instead (it seems to pitch at 45 degrees by default). 
And, it turns out that for the method parameter, the default is all I'll
ever need - convenient, as from explanations I found through google, I
couldn't figure out how voronoi would work.

I asked about roof because I used to do engraving like the image below
by differencing away a linear extrude and then using minkowski with a
conical element. It would take quite a while for some of the larger and
more complex shapes. Now, with roof and the new render, it's going to be
crazy quick, and the code is simpler too.

Cheers,

Steve

difference() {
   translate([-2, -4, -3]) cube([80, 18, 3]);
   scale([-1, 1, -tan(30)]) roof() scale([-1, 1]) text("Hello,
World!", font="Times New Roman");
}

On 2024-03-25 9:07 p.m., Revar Desmera wrote:

Looking at the source code, the arguments to roof() are method=, which can take values of "voronoi" or "straight", and convexity=, which is familiar from linear_extrude(), etc.

Other than that, it looks like it can take the usual $fn/$fa/$fs suspects.

  • Revar

On Mar 25, 2024, at 9:31 AM, Steve Lelievre via Discussdiscuss@lists.openscad.org  wrote:

I've been been digging around on the Web and on the mailing list archive, trying to find out about the parameters for the roof() module - no luck. Where's the best place to see a summary?

Thanks,

Steve


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Revar, thanks for hunting out that information. I was expecting there to be a parameter for the roof's pitch angle but now I have realized it isn't needed, as I can scale the result by tan of the pitch angle instead (it seems to pitch at 45 degrees by default).  And, it turns out that for the method parameter, the default is all I'll ever need - convenient, as from explanations I found through google, I couldn't figure out how voronoi would work. I asked about roof because I used to do engraving like the image below by differencing away a linear extrude and then using minkowski with a conical element. It would take quite a while for some of the larger and more complex shapes. Now, with roof and the new render, it's going to be crazy quick, and the code is simpler too. Cheers, Steve > difference() { >    translate([-2, -4, -3]) cube([80, 18, 3]); >    scale([-1, 1, -tan(30)]) roof() scale([-1, 1]) text("Hello, > World!", font="Times New Roman"); > } On 2024-03-25 9:07 p.m., Revar Desmera wrote: > Looking at the source code, the arguments to `roof()` are method=, which can take values of "voronoi" or "straight", and convexity=, which is familiar from `linear_extrude()`, etc. > > Other than that, it looks like it can take the usual `$fn`/`$fa`/`$fs` suspects. > > - Revar > > > >> On Mar 25, 2024, at 9:31 AM, Steve Lelievre via Discuss<discuss@lists.openscad.org> wrote: >> >> >> I've been been digging around on the Web and on the mailing list archive, trying to find out about the parameters for the roof() module - no luck. Where's the best place to see a summary? >> >> Thanks, >> >> Steve >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org -- https://www.gnomoni.ca https://www.youtube.com/@gnomonica