The "viewport rotation" special variable doesn't behave like I expect. I
expect the view to rotate around whichever axis is changed, therefore it
should stay still on my computer screen.
Take this code for example:
$vpr = [55, 0, 25];
text("Hello");
When I change the z-axis by 20 degrees, it does not move on my computer
screen.
But when I change the x- or y-axes by 20 degrees, they move substantially.
Is this a bug or am I not understanding something?
--
Sent from: http://forum.openscad.org/
Isn't text handled differently in OpenSCAD? It's not handled as most
graphics primitives except sometimes. Of course, I could be wrong.
On 12/8/20 12:53 PM, bmihuraca via Discuss wrote:
The "viewport rotation" special variable doesn't behave like I expect. I
expect the view to rotate around whichever axis is changed, therefore it
should stay still on my computer screen.
Take this code for example:
$vpr = [55, 0, 25];
text("Hello");
When I change the z-axis by 20 degrees, it does not move on my computer
screen.
But when I change the x- or y-axes by 20 degrees, they move substantially.
Is this a bug or am I not understanding something?
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
This issue is not related to the text, just the axes. I should've left that
text line out.
--
Sent from: http://forum.openscad.org/
Not sure what you mean. If I change the z rotation to 45 and do F5 the text
does rotate substantially.
[image: image.png]
On Tue, 8 Dec 2020 at 19:24, bmihuraca via Discuss <
discuss@lists.openscad.org> wrote:
This issue is not related to the text, just the axes. I should've left that
text line out.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 12/8/2020 11:00 AM, David wrote:
Isn't text handled differently in OpenSCAD? It's not handled as most
graphics primitives except sometimes.
Text is a 2D object. For display purposes it, like other 2D objects,
has a bit of height, but they're all still 2D.
On 12/8/20 12:53 PM, bmihuraca via Discuss wrote:
The "viewport rotation" special variable doesn't behave like I expect. I
expect the view to rotate around whichever axis is changed, therefore it
should stay still on my computer screen.
Take this code for example:
$vpr = [55, 0, 25];
text("Hello");
When I change the z-axis by 20 degrees, it does not move on my computer
screen.
But when I change the x- or y-axes by 20 degrees, they move
substantially.
Is this a bug or am I not understanding something?
I have trouble visualizing it myself, but I think what you're seeing is
one of three things:
Try playing with one axis at a time, keeping the other two set to zero.
Set this animation going, then pan with your mouse and manually change
the numbers for the rotation of the two non-animated axes:
$vpr = [0,0, $t*360];
text("Hello");
(If you're not familiar with animation: View/Animate to get the
controls to appear, then put (say) 10 in the FPS box and 90 in the Steps
box.)
Of course, you can move the $t*360 to whichever axis you like.
You might also set
$vpt=[0,0,0];
to force the origin to the center.
Caution: animated rotation of more than one axis a can make you dizzy!
Ack, everybody is focused on the text! I am only concerned about the axes.
Next month I'll post the same question without the line of text.
--
Sent from: http://forum.openscad.org/
I still don't understand what you mean. The text is always aligned with X
and Y axes. The view angles changes according to the GUI or the $vpr
setting that initially sets the GUI value but the mouse can change it until
F5 is hit again.
On Tue, 8 Dec 2020 at 19:58, bmihuraca via Discuss <
discuss@lists.openscad.org> wrote:
Ack, everybody is focused on the text! I am only concerned about the axes.
Next month I'll post the same question without the line of text.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 12/8/2020 11:58 AM, bmihuraca via Discuss wrote:
Ack, everybody is focused on the text! I am only concerned about the axes.
No, sorry, I got what you meant. I responded to the other guy's text
comment, and then to yours; perhaps I erred in combining the two and you
missed the response to your question.
Here it is again. I've retained the text() invocation from your
original. It's not necessary for the demonstration, but it can help
keep track of which axis is which as you spin the world around.
I have trouble visualizing it myself, but I think what you're seeing is
one of three things:
Try playing with one axis at a time, keeping the other two set to zero.
Set this animation going, then pan with your mouse and manually change
the numbers for the rotation of the two non-animated axes:
$vpr = [0,0, $t*360];
text("Hello");
(If you're not familiar with animation: View/Animate to get the
controls to appear, then put (say) 10 in the FPS box and 90 in the Steps
box.)
Of course, you can move the $t*360 to whichever axis you like.
You might also set
$vpt=[0,0,0];
to force the origin to the center.
Caution: animated rotation of more than one axis a can make you dizzy!
Another note:
Again, I have some trouble visualizing what's really going on and why,
but note that OpenSCAD's viewer normally constrains rotation. I'm not
quite sure what the constraint is or what it deeply means, but as long
as you're centered on the origin ($vpt=[0,0,0]; look at the bottom of
the window) you can't get the Z axis to appear off vertical. (It can
tilt towards you or away from you, but never left or right.)
Another way to look at it is that if you're looking at a model of a
globe (ignoring axial tilt), you can't get the north pole to be on the
left or right side.
Probably strongly related is that the ordinary mouse controls never
change the Y axis rotation - it's always zero. (Watch the rotation
numbers at the bottom of the screen.)
I suspect that the X and Z axis rotations map to altitude and azimuth,
or in spherical coordinates theta θ and phi φ.
When you set $vpr, you can set the Y rotation and so you can move the Z
axis off vertical. For instance, [0,90,0] has the north pole pointed left.
(And forcing the Y rotation non-zero using $vpr then yields strange
effects in the mouse-based rotation.)
I didn't explain it well enough to begin with; here's a picture (hopefully),
and I would expect the x-axis to have the same angle:
http://forum.openscad.org/file/t3042/OpenSCAD_%24vpr_issue.png
--
Sent from: http://forum.openscad.org/