discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fwd: Re: pattern for brass nameplate

L
larry
Sat, May 4, 2024 10:13 PM

On Sat, 2024-05-04 at 19:59 +0100, nop head via Discuss wrote:

linaer_extruder does have a scale parameter.

Added 'scale' to the example in the docs...

linear_extrude(5,scale=[1,0.6])
text("T");

The result was not what I was looking for, and I haven't been able to
have it center the scaled letter over the original.
Is there a way to do that?

On Sat, 4 May 2024, 19:54 larry via Discuss,
discuss@lists.openscad.org wrote:

On Sat, 2024-05-04 at 13:11 +0100, Raymond West via Discuss wrote:

Yes, they may have to fillet the sharp recesses of the K and N,
if
it's for sand casting. If it were up to me I'd investment cast,
and
burn out the plastic, no need to worry about fillets and draft
then..

Something I have wanted for years is to be able to linear_extrude
text
and be able to scale it smaller (or bigger) with height.

To clarify.scaling it smaller would result in a smaller version of
the
text at the top of, and centred with the taxt on the bottom. I
realize
that doing it with a word would cause the spacing to be off, but
for
single letters, it would work, I think.


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


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

On Sat, 2024-05-04 at 19:59 +0100, nop head via Discuss wrote: > linaer_extruder does have a scale parameter. Added 'scale' to the example in the docs... linear_extrude(5,scale=[1,0.6]) text("T"); The result was not what I was looking for, and I haven't been able to have it center the scaled letter over the original. Is there a way to do that? > On Sat, 4 May 2024, 19:54 larry via Discuss, > <discuss@lists.openscad.org> wrote: > > On Sat, 2024-05-04 at 13:11 +0100, Raymond West via Discuss wrote: > > > Yes, they may have to fillet the sharp recesses of the K and N, > > > if > > > it's for sand casting. If it were up to me I'd investment cast, > > > and > > > burn out the plastic, no need to worry about fillets and draft > > > then.. > > > > Something I have wanted for years is to be able to linear_extrude > > text > > and be able to scale it smaller (or bigger) with height. > > > > To clarify.scaling it smaller would result in a smaller version of > > the > > text at the top of, and centred with the taxt on the bottom. I > > realize > > that doing it with a word would cause the spacing to be off, but > > for > > single letters, it would work, I think. > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
AM
Adrian Mariano
Sun, May 5, 2024 12:22 AM

I implemented linear_extrude with offset in BOSL2.  My offset() tracks
where the points go when they got offset so that it always knows how to
align them from layer to layer.  If you do that it's straight forward to
connect the points.  :)  It's called offset_sweep().  I think skin is the
more general problem of connecting arbitrary layers that possibly have
different vertex count.  You could do offset sweep that way if you threw
away the information about where the points went.  When I wrote offset I
actually did it specifically because I wanted offset_sweep, though.
Writing offset was the hard part, and that's where the limitations come
from in my implementation.

https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep

Unfortunately because I wrote it in userspace, it can only operate on point
lists and not geometry, so it's useless for text----unless you roll your
own text and have it as a point list.

On Sat, May 4, 2024 at 5:18 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:

On 5/4/2024 12:29 PM, Curt McDowell via Discuss wrote:

It sounds like you're asking for offset() functionality to be integrated
into extrusion so the that offset can also be varied as a parameter. That's
even more general than integrating a general transform() functionality into
a path extrude. Most general of all would be passing an arbitrary module to
an extrude function.

Yeah, linear extrude with offset would be cool, but the problem is that
it's not nearly as easy as twist and scale.  Points can appear and
disappear during the offset, and so there's no straightforward connection
from one layer to the next.  People have done similar things - I think
often called "skin" - but they are finicky and prone to problems.

One way to get a similar effect is to union a bunch of linear extrusions
with different offsets.

Here's an example.

linear = function (offset, i, steps) offset*(i-1)/(steps-1);
trig = function (offset, i, steps) offset*(1-cos(90*(i-1)/(steps-1)));
inverselinear = function (offset, i, steps) offset - linear(offset, i, steps);

module offsettext(h, text, steps, offset, size=10, f=linear, font="") {
for (i=[1:steps]) {
this_h = h*i/steps;
this_off = f(offset, i, steps);
linear_extrude(height=this_h)
offset(this_off)
text(text, size=size, font=font);
}
}

offsettext(5, "Hello World", 10, offset=-1.2, size=30, f=linear, font="");

I swear that at one point I had a simple variation that would produce
rounded tops, but right now I can't remember what it was and don't find an
example.  But you can replace the function used to try different profiles.


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

I implemented linear_extrude with offset in BOSL2. My offset() tracks where the points go when they got offset so that it always knows how to align them from layer to layer. If you do that it's straight forward to connect the points. :) It's called offset_sweep(). I think skin is the more general problem of connecting arbitrary layers that possibly have different vertex count. You could do offset sweep that way if you threw away the information about where the points went. When I wrote offset I actually did it specifically because I wanted offset_sweep, though. Writing offset was the hard part, and that's where the limitations come from in my implementation. https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-offset_sweep Unfortunately because I wrote it in userspace, it can only operate on point lists and not geometry, so it's useless for text----unless you roll your own text and have it as a point list. On Sat, May 4, 2024 at 5:18 PM Jordan Brown via Discuss < discuss@lists.openscad.org> wrote: > On 5/4/2024 12:29 PM, Curt McDowell via Discuss wrote: > > It sounds like you're asking for offset() functionality to be integrated > into extrusion so the that offset can also be varied as a parameter. That's > even more general than integrating a general transform() functionality into > a path extrude. Most general of all would be passing an arbitrary module to > an extrude function. > > > Yeah, linear extrude with offset would be cool, but the problem is that > it's not nearly as easy as twist and scale. Points can appear and > disappear during the offset, and so there's no straightforward connection > from one layer to the next. People have done similar things - I think > often called "skin" - but they are finicky and prone to problems. > > One way to get a similar effect is to union a bunch of linear extrusions > with different offsets. > > Here's an example. > > linear = function (offset, i, steps) offset*(i-1)/(steps-1); > trig = function (offset, i, steps) offset*(1-cos(90*(i-1)/(steps-1))); > inverselinear = function (offset, i, steps) offset - linear(offset, i, steps); > > module offsettext(h, text, steps, offset, size=10, f=linear, font="") { > for (i=[1:steps]) { > this_h = h*i/steps; > this_off = f(offset, i, steps); > linear_extrude(height=this_h) > offset(this_off) > text(text, size=size, font=font); > } > } > > offsettext(5, "Hello World", 10, offset=-1.2, size=30, f=linear, font=""); > > I swear that at one point I had a simple variation that would produce > rounded tops, but right now I can't remember what it was and don't find an > example. But you can replace the function used to try different profiles. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Sun, May 5, 2024 3:05 AM

On 5/4/2024 3:13 PM, larry via Discuss wrote:

Added 'scale' to the example in the docs...

linear_extrude(5,scale=[1,0.6])
text("T");

The result was not what I was looking for, and I haven't been able to
have it center the scaled letter over the original.
Is there a way to do that?

Nope.

The operation you really need is offset, not scale, and as discussed in
other messages that isn't easy.

On 5/4/2024 3:13 PM, larry via Discuss wrote: > Added 'scale' to the example in the docs... > > linear_extrude(5,scale=[1,0.6]) > text("T"); > > The result was not what I was looking for, and I haven't been able to > have it center the scaled letter over the original. > Is there a way to do that? Nope. The operation you really need is offset, not scale, and as discussed in other messages that isn't easy.
SP
Sanjeev Prabhakar
Sun, May 5, 2024 4:56 AM

Letters should be like following, to be able to cast well:

[image: image.png]

Letters should be like following, to be able to cast well: [image: image.png]
RW
Raymond West
Sun, May 5, 2024 1:28 PM

Thanks, you may be correct. I followed the drawing's profile given by
one  of the guys who will be getting it cast - he has plenty of
experience. Any way, simple enough to round all the top edges, if needed
(offset to reduce stroke thickness of letters, and change shape of
trumpet_horn profile) . However, they first will need to find a foundry,
and see what they say when they see this first pattern.

On 05/05/2024 05:56, Sanjeev Prabhakar wrote:

Letters should be like following, to be able to cast well:

image.png

Thanks, you may be correct. I followed the drawing's profile given by one  of the guys who will be getting it cast - he has plenty of experience. Any way, simple enough to round all the top edges, if needed (offset to reduce stroke thickness of letters, and change shape of trumpet_horn profile) . However, they first will need to find a foundry, and see what they say when they see this first pattern. On 05/05/2024 05:56, Sanjeev Prabhakar wrote: > Letters should be like following, to be able to cast well: > > image.png > >
RW
Raymond West
Fri, May 10, 2024 8:54 PM

After a bit of mental exercising, I've generated a more useful profile.
It seems to be  able to generate chamfers, and interesting profiles for
other purposes, such as interlocking dovetail/comb/finger type joints.
code attached below, if of interest.

plying with the few values can generate

On 05/05/2024 14:28, Raymond West via Discuss wrote:

Thanks, you may be correct. I followed the drawing's profile given by
one  of the guys who will be getting it cast - he has plenty of
experience. Any way, simple enough to round all the top edges, if
needed (offset to reduce stroke thickness of letters, and change shape
of trumpet_horn profile) . However, they first will need to find a
foundry, and see what they say when they see this first pattern.

On 05/05/2024 05:56, Sanjeev Prabhakar wrote:

Letters should be like following, to be able to cast well:

image.png


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

After a bit of mental exercising, I've generated a more useful profile. It seems to be  able to generate chamfers, and interesting profiles for other purposes, such as interlocking dovetail/comb/finger type joints. code attached below, if of interest. plying with the few values can generate On 05/05/2024 14:28, Raymond West via Discuss wrote: > > Thanks, you may be correct. I followed the drawing's profile given by > one  of the guys who will be getting it cast - he has plenty of > experience. Any way, simple enough to round all the top edges, if > needed (offset to reduce stroke thickness of letters, and change shape > of trumpet_horn profile) . However, they first will need to find a > foundry, and see what they say when they see this first pattern. > > On 05/05/2024 05:56, Sanjeev Prabhakar wrote: >> Letters should be like following, to be able to cast well: >> >> image.png >> >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org