discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Another missing feature? (All I want for Xmas...)

NH
nop head
Sun, Oct 25, 2020 5:40 AM

Why can't you see my script? It was in my email reply to the group.

You can also see it in the forum here:
http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html

You can use $vpd with scale() to set the size of the text as I did in my
example.

You have to enter the window size in pixels at the start of my screen,
copied from the GUI status line. I attempt to relate them to the camera
with $vpf but my calculation is not quite right.

On Sun, 25 Oct 2020 at 02:35, Caddiy mikeonenine@web.de wrote:

/but isn't quite right in determining the precise offset needed depending
on
the screen width and height in pixels. It does get it the right size and
orientation and roughly in the bottom right. You can see in the picture I
posted it says Hell instead of Hello./

I cannot assess your script, I haven't got that far. But are you sure the
values of $vp* are in any way related to the number of pixels on your
computer monitor? It doesn't strike me as a particularly promising
approach.

Is there a way to apply $vpd to a single object as can be done with $vpr&t,
as opposed to the whole scene?

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Why can't you see my script? It was in my email reply to the group. You can also see it in the forum here: http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html You can use $vpd with scale() to set the size of the text as I did in my example. You have to enter the window size in pixels at the start of my screen, copied from the GUI status line. I attempt to relate them to the camera with $vpf but my calculation is not quite right. On Sun, 25 Oct 2020 at 02:35, Caddiy <mikeonenine@web.de> wrote: > > > /but isn't quite right in determining the precise offset needed depending > on > the screen width and height in pixels. It does get it the right size and > orientation and roughly in the bottom right. You can see in the picture I > posted it says Hell instead of Hello./ > > > I cannot assess your script, I haven't got that far. But are you sure the > values of $vp* are in any way related to the number of pixels on your > computer monitor? It doesn't strike me as a particularly promising > approach. > > Is there a way to apply $vpd to a single object as can be done with $vpr&t, > as opposed to the whole scene? > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
NH
nop head
Sun, Oct 25, 2020 6:05 AM

This is a more correct version but it always looks like the text is center
justified but it isn't. Not sure what I got wrong.

window = [776, 362]; // Copied from the bottom of the GUI

sphere(20);

translate($vpt)
rotate($vpr)
scale($vpd / window.y)
translate([window.x, -window.y] / 2 * tan($vpf))
linear_extrude(0.001)
text("hello", valign = "baseline", halign = "right");

On Sun, 25 Oct 2020 at 05:40, nop head nop.head@gmail.com wrote:

Why can't you see my script? It was in my email reply to the group.

You can also see it in the forum here:
http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html

You can use $vpd with scale() to set the size of the text as I did in my
example.

You have to enter the window size in pixels at the start of my screen,
copied from the GUI status line. I attempt to relate them to the camera
with $vpf but my calculation is not quite right.

On Sun, 25 Oct 2020 at 02:35, Caddiy mikeonenine@web.de wrote:

/but isn't quite right in determining the precise offset needed depending
on
the screen width and height in pixels. It does get it the right size and
orientation and roughly in the bottom right. You can see in the picture I
posted it says Hell instead of Hello./

I cannot assess your script, I haven't got that far. But are you sure the
values of $vp* are in any way related to the number of pixels on your
computer monitor? It doesn't strike me as a particularly promising
approach.

Is there a way to apply $vpd to a single object as can be done with
$vpr&t,
as opposed to the whole scene?

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

This is a more correct version but it always looks like the text is center justified but it isn't. Not sure what I got wrong. window = [776, 362]; // Copied from the bottom of the GUI sphere(20); translate($vpt) rotate($vpr) scale($vpd / window.y) translate([window.x, -window.y] / 2 * tan($vpf)) linear_extrude(0.001) text("hello", valign = "baseline", halign = "right"); On Sun, 25 Oct 2020 at 05:40, nop head <nop.head@gmail.com> wrote: > Why can't you see my script? It was in my email reply to the group. > > You can also see it in the forum here: > http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html > > You can use $vpd with scale() to set the size of the text as I did in my > example. > > You have to enter the window size in pixels at the start of my screen, > copied from the GUI status line. I attempt to relate them to the camera > with $vpf but my calculation is not quite right. > > On Sun, 25 Oct 2020 at 02:35, Caddiy <mikeonenine@web.de> wrote: > >> >> >> /but isn't quite right in determining the precise offset needed depending >> on >> the screen width and height in pixels. It does get it the right size and >> orientation and roughly in the bottom right. You can see in the picture I >> posted it says Hell instead of Hello./ >> >> >> I cannot assess your script, I haven't got that far. But are you sure the >> values of $vp* are in any way related to the number of pixels on your >> computer monitor? It doesn't strike me as a particularly promising >> approach. >> >> Is there a way to apply $vpd to a single object as can be done with >> $vpr&t, >> as opposed to the whole scene? >> >> >> >> -- >> Sent from: http://forum.openscad.org/ >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >
D
dpa
Sun, Oct 25, 2020 9:41 AM

Am So., 25. Okt. 2020 um 06:41 Uhr schrieb nop head nop.head@gmail.com:

Why can't you see my script? It was in my email reply to the group.

I don't know if it's the case here, but I'll take Nop's question as an
opportunity to point out that I actually noticed that I don't receive all
the posts as email! It seems to be random.
So if you really want to be sure that you can read all the posts you have
to go to http://forum.openscad.org/!

Strange but is like this

Am So., 25. Okt. 2020 um 06:41 Uhr schrieb nop head <nop.head@gmail.com>: > Why can't you see my script? It was in my email reply to the group. > I don't know if it's the case here, but I'll take Nop's question as an opportunity to point out that I actually noticed that I don't receive all the posts as email! It seems to be random. So if you really want to be sure that you can read all the posts you have to go to http://forum.openscad.org/! Strange but is like this
NH
nop head
Sun, Oct 25, 2020 10:20 AM

OK this is a version that works.

window = [737, 888]; // Copied from the bottom of the GUI

sphere(20);

translate($vpt)
rotate($vpr)
translate([$vpd * window.x / window.y, -$vpd] * tan($vpf / 2))
scale($vpd / window.y)
linear_extrude(0.001)
text("hello", valign = "baseline", halign = "right");

On Sun, 25 Oct 2020 at 06:05, nop head nop.head@gmail.com wrote:

This is a more correct version but it always looks like the text is center
justified but it isn't. Not sure what I got wrong.

window = [776, 362]; // Copied from the bottom of the GUI

sphere(20);

translate($vpt)
rotate($vpr)
scale($vpd / window.y)
translate([window.x, -window.y] / 2 * tan($vpf))
linear_extrude(0.001)
text("hello", valign = "baseline", halign = "right");

On Sun, 25 Oct 2020 at 05:40, nop head nop.head@gmail.com wrote:

Why can't you see my script? It was in my email reply to the group.

You can also see it in the forum here:
http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html

You can use $vpd with scale() to set the size of the text as I did in my
example.

You have to enter the window size in pixels at the start of my screen,
copied from the GUI status line. I attempt to relate them to the camera
with $vpf but my calculation is not quite right.

On Sun, 25 Oct 2020 at 02:35, Caddiy mikeonenine@web.de wrote:

/but isn't quite right in determining the precise offset needed
depending on
the screen width and height in pixels. It does get it the right size and
orientation and roughly in the bottom right. You can see in the picture I
posted it says Hell instead of Hello./

I cannot assess your script, I haven't got that far. But are you sure the
values of $vp* are in any way related to the number of pixels on your
computer monitor? It doesn't strike me as a particularly promising
approach.

Is there a way to apply $vpd to a single object as can be done with
$vpr&t,
as opposed to the whole scene?

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

OK this is a version that works. window = [737, 888]; // Copied from the bottom of the GUI sphere(20); translate($vpt) rotate($vpr) translate([$vpd * window.x / window.y, -$vpd] * tan($vpf / 2)) scale($vpd / window.y) linear_extrude(0.001) text("hello", valign = "baseline", halign = "right"); On Sun, 25 Oct 2020 at 06:05, nop head <nop.head@gmail.com> wrote: > This is a more correct version but it always looks like the text is center > justified but it isn't. Not sure what I got wrong. > > window = [776, 362]; // Copied from the bottom of the GUI > > sphere(20); > > translate($vpt) > rotate($vpr) > scale($vpd / window.y) > translate([window.x, -window.y] / 2 * tan($vpf)) > linear_extrude(0.001) > text("hello", valign = "baseline", halign = "right"); > > > > On Sun, 25 Oct 2020 at 05:40, nop head <nop.head@gmail.com> wrote: > >> Why can't you see my script? It was in my email reply to the group. >> >> You can also see it in the forum here: >> http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html >> >> You can use $vpd with scale() to set the size of the text as I did in my >> example. >> >> You have to enter the window size in pixels at the start of my screen, >> copied from the GUI status line. I attempt to relate them to the camera >> with $vpf but my calculation is not quite right. >> >> On Sun, 25 Oct 2020 at 02:35, Caddiy <mikeonenine@web.de> wrote: >> >>> >>> >>> /but isn't quite right in determining the precise offset needed >>> depending on >>> the screen width and height in pixels. It does get it the right size and >>> orientation and roughly in the bottom right. You can see in the picture I >>> posted it says Hell instead of Hello./ >>> >>> >>> I cannot assess your script, I haven't got that far. But are you sure the >>> values of $vp* are in any way related to the number of pixels on your >>> computer monitor? It doesn't strike me as a particularly promising >>> approach. >>> >>> Is there a way to apply $vpd to a single object as can be done with >>> $vpr&t, >>> as opposed to the whole scene? >>> >>> >>> >>> -- >>> Sent from: http://forum.openscad.org/ >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>
NH
nop head
Sun, Oct 25, 2020 10:29 AM

Slightly more concise:

window = [737, 888]; // Copied from the bottom of the GUI

sphere(20);

translate($vpt)
rotate($vpr)
translate([window.x / window.y, -1] * $vpd * tan($vpf / 2))
scale($vpd / window.y)
linear_extrude(0.001)
text("hello", valign = "baseline", halign = "right");

The window pixel dimensions are needed for two reasons. 1) to get the
correct x offset that depends on the aspect ratio and 2) to scale the text
if you don't want its size to change when the window is resized. So we need
yet another $ variable, $vpw to be the window size in pixels.

On Sun, 25 Oct 2020 at 10:20, nop head nop.head@gmail.com wrote:

OK this is a version that works.

window = [737, 888]; // Copied from the bottom of the GUI

sphere(20);

translate($vpt)
rotate($vpr)
translate([$vpd * window.x / window.y, -$vpd] * tan($vpf / 2))
scale($vpd / window.y)
linear_extrude(0.001)
text("hello", valign = "baseline", halign = "right");

On Sun, 25 Oct 2020 at 06:05, nop head nop.head@gmail.com wrote:

This is a more correct version but it always looks like the text is
center justified but it isn't. Not sure what I got wrong.

window = [776, 362]; // Copied from the bottom of the GUI

sphere(20);

translate($vpt)
rotate($vpr)
scale($vpd / window.y)
translate([window.x, -window.y] / 2 * tan($vpf))
linear_extrude(0.001)
text("hello", valign = "baseline", halign = "right");

On Sun, 25 Oct 2020 at 05:40, nop head nop.head@gmail.com wrote:

Why can't you see my script? It was in my email reply to the group.

You can also see it in the forum here:
http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html

You can use $vpd with scale() to set the size of the text as I did in my
example.

You have to enter the window size in pixels at the start of my screen,
copied from the GUI status line. I attempt to relate them to the camera
with $vpf but my calculation is not quite right.

On Sun, 25 Oct 2020 at 02:35, Caddiy mikeonenine@web.de wrote:

/but isn't quite right in determining the precise offset needed
depending on
the screen width and height in pixels. It does get it the right size and
orientation and roughly in the bottom right. You can see in the picture
I
posted it says Hell instead of Hello./

I cannot assess your script, I haven't got that far. But are you sure
the
values of $vp* are in any way related to the number of pixels on your
computer monitor? It doesn't strike me as a particularly promising
approach.

Is there a way to apply $vpd to a single object as can be done with
$vpr&t,
as opposed to the whole scene?

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Slightly more concise: window = [737, 888]; // Copied from the bottom of the GUI sphere(20); translate($vpt) rotate($vpr) translate([window.x / window.y, -1] * $vpd * tan($vpf / 2)) scale($vpd / window.y) linear_extrude(0.001) text("hello", valign = "baseline", halign = "right"); The window pixel dimensions are needed for two reasons. 1) to get the correct x offset that depends on the aspect ratio and 2) to scale the text if you don't want its size to change when the window is resized. So we need yet another $ variable, $vpw to be the window size in pixels. On Sun, 25 Oct 2020 at 10:20, nop head <nop.head@gmail.com> wrote: > OK this is a version that works. > > window = [737, 888]; // Copied from the bottom of the GUI > > sphere(20); > > translate($vpt) > rotate($vpr) > translate([$vpd * window.x / window.y, -$vpd] * tan($vpf / 2)) > scale($vpd / window.y) > linear_extrude(0.001) > text("hello", valign = "baseline", halign = "right"); > > On Sun, 25 Oct 2020 at 06:05, nop head <nop.head@gmail.com> wrote: > >> This is a more correct version but it always looks like the text is >> center justified but it isn't. Not sure what I got wrong. >> >> window = [776, 362]; // Copied from the bottom of the GUI >> >> sphere(20); >> >> translate($vpt) >> rotate($vpr) >> scale($vpd / window.y) >> translate([window.x, -window.y] / 2 * tan($vpf)) >> linear_extrude(0.001) >> text("hello", valign = "baseline", halign = "right"); >> >> >> >> On Sun, 25 Oct 2020 at 05:40, nop head <nop.head@gmail.com> wrote: >> >>> Why can't you see my script? It was in my email reply to the group. >>> >>> You can also see it in the forum here: >>> http://forum.openscad.org/Another-missing-feature-All-I-want-for-Xmas-tp30314p30351.html >>> >>> You can use $vpd with scale() to set the size of the text as I did in my >>> example. >>> >>> You have to enter the window size in pixels at the start of my screen, >>> copied from the GUI status line. I attempt to relate them to the camera >>> with $vpf but my calculation is not quite right. >>> >>> On Sun, 25 Oct 2020 at 02:35, Caddiy <mikeonenine@web.de> wrote: >>> >>>> >>>> >>>> /but isn't quite right in determining the precise offset needed >>>> depending on >>>> the screen width and height in pixels. It does get it the right size and >>>> orientation and roughly in the bottom right. You can see in the picture >>>> I >>>> posted it says Hell instead of Hello./ >>>> >>>> >>>> I cannot assess your script, I haven't got that far. But are you sure >>>> the >>>> values of $vp* are in any way related to the number of pixels on your >>>> computer monitor? It doesn't strike me as a particularly promising >>>> approach. >>>> >>>> Is there a way to apply $vpd to a single object as can be done with >>>> $vpr&t, >>>> as opposed to the whole scene? >>>> >>>> >>>> >>>> -- >>>> Sent from: http://forum.openscad.org/ >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>>
M
MichaelAtOz
Sun, Oct 25, 2020 12:34 PM

dpa wrote

Strange but is like this

It was "I cannot assess your script, I haven't got that far."
I believe that is not Access,  but comprehend.

Some internet providers are less friendly to mailing-lists.
You can also get a Digest semi-daily too, which should have all the posts.
See http://lists.openscad.org/mailman/options/discuss_lists.openscad.org


OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

--
Sent from: http://forum.openscad.org/

dpa wrote > Strange but is like this It was "I cannot assess your script, I haven't got that far." I believe that is not Access, but comprehend. Some internet providers are less friendly to mailing-lists. You can also get a Digest semi-daily too, which should have all the posts. See http://lists.openscad.org/mailman/options/discuss_lists.openscad.org ----- OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... * on the Forum, click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
C
Caddiy
Sun, Oct 25, 2020 6:20 PM

dpa wrote

It was "I cannot assess your script, I haven't got that far."
I believe that is not Access,  but comprehend.

That is correct. Thank you. A lot of the stuff here is over my head.

But it was originally from Nophead, not dpa.

--
Sent from: http://forum.openscad.org/

dpa wrote It was "I cannot assess your script, I haven't got that far." I believe that is not Access, but comprehend. That is correct. Thank you. A lot of the stuff here is over my head. But it was originally from Nophead, not dpa. -- Sent from: http://forum.openscad.org/
C
Caddiy
Sun, Oct 25, 2020 6:27 PM

The above reply was to Michael@Oz, but for some reason it shows dpa instead.

--
Sent from: http://forum.openscad.org/

The above reply was to Michael@Oz, but for some reason it shows dpa instead. -- Sent from: http://forum.openscad.org/
NH
nop head
Sun, Oct 25, 2020 6:30 PM

Does the latest code I posted work for you?

On Sun, 25 Oct 2020 at 18:28, Caddiy mikeonenine@web.de wrote:

The above reply was to Michael@Oz, but for some reason it shows dpa
instead.

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Does the latest code I posted work for you? On Sun, 25 Oct 2020 at 18:28, Caddiy <mikeonenine@web.de> wrote: > The above reply was to Michael@Oz, but for some reason it shows dpa > instead. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
C
Caddiy
Sun, Oct 25, 2020 6:33 PM

Slightly more concise...

Looks interesting. Will try it out.

--
Sent from: http://forum.openscad.org/

Slightly more concise... Looks interesting. Will try it out. -- Sent from: http://forum.openscad.org/