Discussion:
[OpenSCAD] Why rotate() and $vpr use opposed rotation orders?
Ronaldo
2016-08-08 21:11:23 UTC
Permalink
AFAIK, rotate([a,b,c]) is equivalent to:

rotate([0,0,c]) rotate([0,b,0]) rotate([a,0,0])

which is opposed to the usual Euler angle order. However, the angles
expected by $vpr assignments are taken in the inverse order: first Z, last
X.

I wrote a function to calculate the Euler angles of a viewport frame in
order to feed $vpr. But I cannot use it with rotate(). I would expect the
same rule in both.





--
View this message in context: http://forum.openscad.org/Why-rotate-and-vpr-use-opposed-rotation-orders-tp18092.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Torsten Paul
2016-08-08 21:19:48 UTC
Permalink
Post by Ronaldo
I wrote a function to calculate the Euler angles of a viewport frame in
order to feed $vpr. But I cannot use it with rotate(). I would expect the
same rule in both.
Say hello to legacy issues...

https://github.com/openscad/openscad/blob/master/src/Camera.cc#L41

ciao,
Torsten.
Ronaldo Persiano
2016-08-08 22:05:52 UTC
Permalink
$vpr use Euler angle rotation order. The issue is the rotate() order.
Another legacy?
Post by Torsten Paul
Post by Ronaldo
I wrote a function to calculate the Euler angles of a viewport frame in
order to feed $vpr. But I cannot use it with rotate(). I would expect the
same rule in both.
Say hello to legacy issues...
https://github.com/openscad/openscad/blob/master/src/Camera.cc#L41
ciao,
Torsten.
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
MichaelAtOz
2016-08-08 22:09:36 UTC
Permalink
It is easy to do your own e_rotare() module.



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

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.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/Why-rotate-and-vpr-use-opposed-rotation-orders-tp18092p18095.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
jpmendes
2016-09-02 14:39:09 UTC
Permalink
This post might be inappropriate. Click to display it.
MichaelAtOz
2016-09-02 22:06:52 UTC
Permalink
Hi Marijan, Welcome to the forum. Your post is still flagged as "This post
has NOT been accepted by the mailing list yet", so nobody gets it unless
they look.
You need to subscribe to the mailing list
<http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1> ,
and respond to the registration email.

So I quoted the text below so others see it. (added a few para breaks)

Also, it is good practice to create a new topic rather than tagging on the
end of existing threads. So I moved you post. {*unfortunately for the
previous posts, I seem to have lost them, first time I tried moving...if you
are reading this and want to see the other posts contact me*}

Anyway...

There are others with puzzlecut experience who may comment.

I will just note that OpenSCADs performance decreases with the complexity of
the model, and size of STLs. If your STL results in "435 Terabytes of GCODE"
I'd be pretty sure OpenSCAD will not work with it.
Honored Ladies and gentlemen, I am first time user of Open SCADA, which I
would like to use for precise 3D drawing of 3D objects that are
moderately complicated.
For start I need to be able to cut large Objects to manageable pieces, and
for that I found PUZZLECUT plugin.
First problem I noticed that thee is no example how to export resulting
.stl files,
and second is that I have example how to cut object 2 or 4 ways, but I
need to be able to cut things 3 sided. I adapted 2 way cut and succeeded
to rotate Example object in 120 degrees, and I reasioned that I can
continue turning and cutting it 2 more times, but it does not seems to
work this way. Problem seems to be use of Vectors instead of degrees as I
expected. I am sure You solve similar problem way back, so please help!
I can turn object 3 times but one of modules have rotate call inside that
change degree value. I do not know how to set some Global variable and use
it as parameter for rotate () while increasing it on each pass of cutInTwo
module. If I understand it correctly there are no Global type of
variables, just Local.
It seems I would gave to write small SCADA code generator which would turn
calculations from some program into textual file, if SCADA source
programs are just text files. Unfortunately in spite of being "old hand in
Programming" I am also getting old and am half blind, and there are things
I need to construct using parameters very precisely,
but for start it would be great help to be able to cut large .stl files in
small pieces, as for instance one of object generates 435 Terabytes of
GCODE for actual 3D printing. That is simply horrendous problem and I
understand why thee are no really big 3D printers I need.
I however have several ideas how to make that Gcode manageable, by
generating layer after layer and printing them directly. I also noticed
that there are elementary problems that are not addresed at all, from
Filament running out to Blackouts and Brownouts while printer is working.
It is obvious that SCADA can read .stl files which would come handy when
generating GCODE. However both .stl and Gcode formats are unknown to me
and that would be a problem, since I did not have found any manuals which
would explain them to me. Since SCADA obviously can read .stl format
files, I wonder if it can generate GCODE also.
Otherwise I would have to make some mixed up program in several
programing languages to be able to di what ned to be done. SCADA is
obviously an Interpreter, and very slow as it seems, but it can be
upgraded by various modules,
and sutrely there is a source code somevhere thab could be optimized. I
would very much like to do it, but World has to be saved first.
Regards from Croatia, the Homeland of Engineer Nikola Tesla!
-----
Admin - PM me if you need anything, or if I've done something stupid...

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.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/Re-Why-rotate-and-vpr-use-opposed-rotation-orders-tp18304p18310.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MichaelAtOz
2016-09-02 22:10:17 UTC
Permalink
{
*
unfortunately for the previous posts, I seem to have lost them
, first time I tried moving...if you are reading this and want to see the
other posts contact me
*
}
Found them
<http://forum.openscad.org/Why-rotate-and-vpr-use-opposed-rotation-orders-td18092.html>
, they just got lower on the date sorted list...as they would...



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

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.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/Re-Why-rotate-and-vpr-use-opposed-rotation-orders-tp18304p18311.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ronaldo
2016-09-03 05:49:39 UTC
Permalink
Pollak, I think you might get what you want by adding the following two
module angularMaleCut(offset=0, angle=0, cut=xCut1){
difference() {
children(0);
rotate(angle)
translate([0,offset,0])
makePuzzleStamp(cutLocations = cut);
}
}
module angularFemaleCut(offset=0, angle=0, cut=xCut1){
intersection(){
children(0);
rotate(angle)
translate([0,offset,0])
makePuzzleStamp(cutLocations=cut, kerf = kerf);
}
}
They allow to puzzlecut by a plane containing the Z axis at an angle with
the X axis. They are applied just like the original xMaleCut() and
yFemaleCut() modules. The example bellow ilustrates that:
<Loading Image...>
<Loading Image...>
XCut1 = [-10, 10];
stampSize = [200, 200, 200];
cutSize = 5;
kerf = 0;
translate([0, -10, 0])
angularMaleCut(0, -20, XCut1)
angularMaleCut(0, 45, XCut1)
{translate([-20, -20, 0]) cube(40);}
translate([-10, 0, 0])
angularMaleCut(0, -20, XCut1)
angularFemaleCut(0, 45, XCut1)
{translate([-20, -20, 0]) cube(40);}
translate([10, 0, 0])
angularFemaleCut(0, -20, XCut1)
angularMaleCut(0, 45, XCut1)
{translate([-20, -20, 0]) cube(40);}
translate([0, 10 ,0])
angularFemaleCut(0, -20, XCut1)
angularFemaleCut(0, 45, XCut1)
{translate([-20, -20, 0]) cube(40);}
--
View this message in context: http://forum.openscad.org/Re-Why-rotate-and-vpr-use-opposed-rotation-orders-tp18304p18314.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Loading...