Hello colagues, I noted there is no way to Export .stl file except by hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster, this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions would save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous 2017!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On 01/01/2017 09:07 AM, Marijan Pollak wrote:
Hello colagues, I noted there is no way to Export .stl file
except by hand, while Import is working. IMHO, it should be
easy to make new Module ExportStl() by finding same function
in Editor. Since I am New to Open Scada, can some seasoned
SCADA programmer do it?
The following thread has some discussion about this topic
http://forum.openscad.org/export-function-td15428.html
If I have time I would turn this to normal, as well as
make it faster, this seems awfully slow for just few simple
Objects added or subtracted one from another.
This would be very welcome, at this point it would mean
either making CGAL (http://www.cgal.org/) faster for CSG
operations or find/implement a different library to do
CSG.
ciao,
Torsten.
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down and
rightside left.
I don't know what you mean. The Syntax and layout are similar to C and is
parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak oberonmp@gmail.com wrote:
Hello colagues, I noted there is no way to Export .stl file except by hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster, this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions would
save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous 2017!
--
View this message in context: http://forum.openscad.org/
Export-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Hello Thorsten, unfortunately those people write about Security risk which
I do not understand.
1st. Import and export are possible only from same folder where SCADA
programs are.
2nd. If I cannot read in unknown files, how can program know what to
delete/rewrite?
3rd. Is simple confirmation from user not possible in case of new file
writting?
4th. User may have to delete some files by hand if not required.
I suceeded to open file in Alphanumeric field, therefore it should be
possible to compose file name
by program, export it and then import it again and when cut export to
different file.
As You can see I need to cut my turbine in at least 6 ways, however with
just 4 parts I
can repeat this group 3 times and compose large turbine of 50 cm diameter.
I would however like to cut center as circle, as large as can be printed
on 18 x 18cm x 25cm
workspace of 3D printer. However all pieces have to be securely hooked one
to another.
Likewise, it would be usefull if I can construct the Knife and then reuse
it as many times as required.
Present system of cutting requires 2 separate cuts on two clones of same
object, why it cannot be
done in 1 cut and then separate pieces into two objects, since one side of
cut is always removed, therefore computer is able to detect which is Male
and which is Female side.
Alternative would be to attach each side of Cut to part it belong to and
remove just "Kerf" distance
which then cannot be negative, of course.
It would be great help to be able to determine cut lines and then situate
hooks at the middle as two
pairs of T profiled connectors or one pair of joined cylinders then such
twinned cylinders can be used to extract difference that was cut out. with
exact fit it would be as if it was made from one piece, right?
Same way central circle can be cut out and Difference taken out of clone.
However at least 3 holes must be made on separation circle, where it would
be fixed by screws.
Any advice would be most welcome. This 2D drawing was made by program, can
it be repeated in
SCADA and then extruded? I would neeed many sizes of turbines with same
wall thickness of Air
Chambers. but it would alsi be usefull that botom would not be flat. I can
therefore first form bottom
by following paralel linesand pulling half circle between, and then extrude
same lines up.
But after this I have to cut it all up.........
I promise You huge donation when my turbines start to sell, or one WPS of
2.5 KW that You can use or sell to someone for few 1000€'s.
Is it a deal?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 2:10 PM, tp3 [via OpenSCAD] <
ml-node+s1091067n19830h36@n5.nabble.com> wrote:
On 01/01/2017 09:07 AM, Marijan Pollak wrote:
Hello colagues, I noted there is no way to Export .stl file
except by hand, while Import is working. IMHO, it should be
easy to make new Module ExportStl() by finding same function
in Editor. Since I am New to Open Scada, can some seasoned
SCADA programmer do it?
The following thread has some discussion about this topic
http://forum.openscad.org/export-function-td15428.html
If I have time I would turn this to normal, as well as
make it faster, this seems awfully slow for just few simple
Objects added or subtracted one from another.
This would be very welcome, at this point it would mean
either making CGAL (http://www.cgal.org/) faster for CSG
operations or find/implement a different library to do
CSG.
ciao,
Torsten.
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19830&i=0
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19830.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
TlocrtRasjeckan02.jpg (1019K) http://forum.openscad.org/attachment/19832/0/TlocrtRasjeckan02.jpg
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19832.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi, I did not know the difference exist. It may be true that it is parsed
top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line up
and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and need
not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate is
imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y on
horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are executed
rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be generally
available at new state?
Maxbe those multiple instractions were permutable without change of result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head nop.head@gmail.com wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and is
parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak oberonmp@gmail.com wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions would
save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous 2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
Firstly statements are not executed as such. They build a tree structure of
geometric primitives and boolean operations. The boolean operations can be
done in any order as long as the operands (which are lower branches in the
tree) have been computed first. So yes things on the right are lower nodes
on the tree and must be computed first. And yes, compound statements like
union() that can span many lines will compute all the things lower in the
tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak oberonmp@gmail.com wrote:
Hi, I did not know the difference exist. It may be true that it is parsed
top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line up
and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate is
imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y on
horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are executed
rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head nop.head@gmail.com wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and is
parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak oberonmp@gmail.com wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down
and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions would
save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous 2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 01/01/2017 04:58 PM, Marijan Pollak wrote:
Hello Thorsten, unfortunately those people write about Security
risk which I do not understand.
I don't see the security part as the main topic for the
export feature. Direct export does not fit into the whole
model of how OpenSCAD works, it generates a data structure
that describes a 2D or 3D model, it's not a program having
a runtime.
The basic idea to handle multi part models is to add this
information to the data structure and have the export
function pick that up to export all parts in one step.
Details are still to be defined.
Until this is done, there's a reasonable workaround
described in the FAQ
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Export
ciao,
Torsten.
Pollak,
Except in cases of heavy and complex models, you should not be concerned
about avoiding to rebuild a "clone" in OpenSCAD. The system keeps computed
models and values in cache so its reuse doesn't require reevaluations.
About your turbine design code: in principle, you have two alternatives;
one is to compute the profiles through an OpenSCAD code generating points
and passing them to a polygon() or polyhedron(); or change the code of your
external profile generator in order to produce its output as a text file of
the form:
points = [ [...], [...], ...];
This text file is then made part of your OpenSCAD code with:
use <profile_points.txt>
at its beginning.
Ronaldo
Thanks for clarification. So how can I signal from module what it has done?
I tried to access imaga that is defined in main program in Module but until
I put it as parameter, it was not recognized.
Are Functions different?
Unfortunately what someone made as three way Puzlecut do not work.
I guess I have to export File after first cut and Import it before next.
Undfortunately Export is not there for some obscure reason.
I would have to find source of Editor and clone that function to export
.stl file
and make new Module Export ("filename.stl"), or can You do it for all of us
that
need such thing?
So far I find Compiler unpredictable and not explaining errors, which
mostly
happen someplace in the Library. I also do not know where to put ";" at end
of
command or module call and where it is forbidden. I decided to put it
everywhere
but sometimes it cause errors?
Perhaps some more time and I would catch rules, I start by doing sipmple
things,
like creating plate and cutting it, and when I would have that Module
ready, I can
build up on that plate something more complicated, cut this and so on.
Unfortunately I am half blind and did not do much programming, mostly I was
using
GFA32 Basic, which is not OO Language, but then Open SCAD is not either.
I would need to have access to STL file parameters as well as come
rudimentary
CFD program and then I would be able to make it do all calculations in
paralel and
export results as file that can then be corelated to Stl File parameters
and Cfd
parameters to find out which parameters produce better result.
Than thing can be "Evolved" to best possible solution or parameters. It is
possible
to Cross bred several existing solutions and get something entirely new.
Regards, Marijan Pollak
On Sun, Jan 1, 2017 at 7:16 PM, nop head nop.head@gmail.com wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak oberonmp@gmail.com wrote:
Hi, I did not know the difference exist. It may be true that it is parsed
top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y on
horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are executed
rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head nop.head@gmail.com wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak oberonmp@gmail.com wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down
and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions would
save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous 2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
I have never seen anything like this, therefore I do not understand.
Is it that You are adding this to Editor as Plugin of sort so .stl Button
would do it when pressed, instead of writting out just one file?
That we call "going hand to pocket around backside"......
So it stay this way untill I change it? Maybe I can do it, just I did not
find way to cut things precisely to some 12 parts, and if they would
stay together in one file then it is not problem to do it even just using
the button, problem is, once I cut thing in two, I can export part that
need no further cutting and remove it, and cut remainder again.
I do not know if SCAD treat result of cutting as one or two objects,
and how can I select one piece I want to export. If I would be able to
do it programatically, then there is no need to do it complicated way.
Where is that Editor source code? I think making Module should not
take more than half an hour, I just have to ape what that button click
do, after its module or function receive file name to Export.
Or someone sit on it? That assuming It is same as any other Module
in Open Scad.....
On Sun, Jan 1, 2017 at 9:15 PM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 01/01/2017 04:58 PM, Marijan Pollak wrote:
Hello Thorsten, unfortunately those people write about Security
risk which I do not understand.
I don't see the security part as the main topic for the
export feature. Direct export does not fit into the whole
model of how OpenSCAD works, it generates a data structure
that describes a 2D or 3D model, it's not a program having
a runtime.
The basic idea to handle multi part models is to add this
information to the data structure and have the export
function pick that up to export all parts in one step.
Details are still to be defined.
Until this is done, there's a reasonable workaround
described in the FAQ
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Export
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
On 2 January 2017 at 10:33, Marijan Pollak oberonmp@gmail.com wrote:
Thanks for clarification. So how can I signal from module what it has done?
I tried to access imaga that is defined in main program in Module but
until
I put it as parameter, it was not recognized.
Global variables are definitely accessible in modules and functions.
cube_size = 10;
function the_cube_size() = cube_size;
module my_cube() {
echo(the_cube_size());
cube(cube_size);
}
color("red")
my_cube();
color("green")
translate([20, 0, 0])
rotate([45, 0, 0])
my_cube();
ECHO: 10
ECHO: 10
Are Functions different?
No.
Unfortunately what someone made as three way Puzlecut do not work.
I guess I have to export File after first cut and Import it before next.
Undfortunately Export is not there for some obscure reason.
It is never necessary to export and object and re-import it into the same
script. That is the main reason export does not exist. The example above
shows the geometry created by my_cube() can be reused and it is cached, so
only computed once,
I would have to find source of Editor and clone that function to export
.stl file
and make new Module Export ("filename.stl"), or can You do it for all of
us that
need such thing?
I believe somebody already did that but it was rejected.
So far I find Compiler unpredictable and not explaining errors, which
mostly
happen someplace in the Library.
Yes error reporting is not one of its strong points.
I also do not know where to put ";" at end of
command or module call and where it is forbidden. I decided to put it
everywhere
but sometimes it cause errors?
It marks the end of a statement, so it is critical where it should be. If
you look at
color("green")
translate([20, 0, 0])
rotate([45, 0, 0])
my_cube();
That is all one statement, so it needs one semicolon at the end. If you put
one say after color() you would get two statements. The first would colour
nothing and the translate would start a new statement so you would get an
uncoloured cube that was just rotated and translated.
Perhaps some more time and I would catch rules, I start by doing sipmple
things,
like creating plate and cutting it, and when I would have that Module
ready, I can
build up on that plate something more complicated, cut this and so on.
If you re not alreday familiar with curly brace languages like C then you
need to read and understand the OpenSCAD manual:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#Chapter_1_--_General
Unfortunately I am half blind and did not do much programming, mostly I
was using
GFA32 Basic, which is not OO Language, but then Open SCAD is not either.
I would need to have access to STL file parameters as well as come
rudimentary
CFD program and then I would be able to make it do all calculations in
paralel and
export results as file that can then be corelated to Stl File parameters
and Cfd
parameters to find out which parameters produce better result.
Than thing can be "Evolved" to best possible solution or parameters. It is
possible
to Cross bred several existing solutions and get something entirely new.
Regards, Marijan Pollak
On Sun, Jan 1, 2017 at 7:16 PM, nop head nop.head@gmail.com wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak oberonmp@gmail.com wrote:
Hi, I did not know the difference exist. It may be true that it is
parsed top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y
on horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are
executed rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head nop.head@gmail.com wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak oberonmp@gmail.com wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down
and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions
would save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous
2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Thank You Very Kindly!
I suppose I can generate whole turbine by generating 1/ 3 of points and
making Extrude,
then rotating object 120 degtees and repeating or just cutting that out
with Puzzlecut and
joining 3 pieces after they are printed on 3D printer..... Can I draw on
surface of cylinder
and then Extrude2D to get one joined object, or this has to be made
separate object first?
So, I must experiment.... Is there a way to build 3D object that way?
Same, there would be many points anyhow, so many lines in .txt file.
How do I signal to program that next line is continuation of points?
I also suppose that last point should be first?
or I can draw using primitives like line or circle? I would like to use
Rotate Extrude and also make
Welds. I suppose once I extrude this form to 3D I have to save object
created, after which I can
Join or subtract some primitives like from any other Objects imported?
I hope that Cheat Sheet would be informative enough, I shall check.
On Sun, Jan 1, 2017 at 10:50 PM, Ronaldo Persiano rcmpersiano@gmail.com
wrote:
Pollak,
Except in cases of heavy and complex models, you should not be concerned
about avoiding to rebuild a "clone" in OpenSCAD. The system keeps computed
models and values in cache so its reuse doesn't require reevaluations.
About your turbine design code: in principle, you have two alternatives;
one is to compute the profiles through an OpenSCAD code generating points
and passing them to a polygon() or polyhedron(); or change the code of your
external profile generator in order to produce its output as a text file of
the form:
points = [ [...], [...], ...];
This text file is then made part of your OpenSCAD code with:
use <profile_points.txt>
at its beginning.
Ronaldo
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
Ok, Module can see Global Variable but it cannot change itts value.
However if there is local variable with same name, i.e kerf in the
Puzzlecut then I must write kerf=kerf in module parameter list,
and I find some modules have kerf=0 as parameter which is
confusing me, as it seems not used in that module MaleCut,
but someplace else, outside of Puzzlecut.Lib
On Mon, Jan 2, 2017 at 12:48 PM, nop head nop.head@gmail.com wrote:
On 2 January 2017 at 10:33, Marijan Pollak oberonmp@gmail.com wrote:
Thanks for clarification. So how can I signal from module what it has
done?
I tried to access imaga that is defined in main program in Module but
until
I put it as parameter, it was not recognized.
Global variables are definitely accessible in modules and functions.
cube_size = 10;
function the_cube_size() = cube_size;
module my_cube() {
echo(the_cube_size());
cube(cube_size);
}
color("red")
my_cube();
color("green")
translate([20, 0, 0])
rotate([45, 0, 0])
my_cube();
ECHO: 10
ECHO: 10
Are Functions different?
No.
Unfortunately what someone made as three way Puzlecut do not work.
I guess I have to export File after first cut and Import it before next.
Undfortunately Export is not there for some obscure reason.
It is never necessary to export and object and re-import it into the same
script. That is the main reason export does not exist. The example above
shows the geometry created by my_cube() can be reused and it is cached, so
only computed once,
I would have to find source of Editor and clone that function to export
.stl file
and make new Module Export ("filename.stl"), or can You do it for all of
us that
need such thing?
I believe somebody already did that but it was rejected.
So far I find Compiler unpredictable and not explaining errors, which
mostly
happen someplace in the Library.
Yes error reporting is not one of its strong points.
I also do not know where to put ";" at end of
command or module call and where it is forbidden. I decided to put it
everywhere
but sometimes it cause errors?
It marks the end of a statement, so it is critical where it should be. If
you look at
color("green")
translate([20, 0, 0])
rotate([45, 0, 0])
my_cube();
That is all one statement, so it needs one semicolon at the end. If you
put one say after color() you would get two statements. The first would
colour nothing and the translate would start a new statement so you would
get an uncoloured cube that was just rotated and translated.
Perhaps some more time and I would catch rules, I start by doing sipmple
things,
like creating plate and cutting it, and when I would have that Module
ready, I can
build up on that plate something more complicated, cut this and so on.
If you re not alreday familiar with curly brace languages like C then you
need to read and understand the OpenSCAD manual:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_
OpenSCAD_Language#Chapter_1_--_General
Unfortunately I am half blind and did not do much programming, mostly I
was using
GFA32 Basic, which is not OO Language, but then Open SCAD is not either.
I would need to have access to STL file parameters as well as come
rudimentary
CFD program and then I would be able to make it do all calculations in
paralel and
export results as file that can then be corelated to Stl File parameters
and Cfd
parameters to find out which parameters produce better result.
Than thing can be "Evolved" to best possible solution or parameters. It
is possible
to Cross bred several existing solutions and get something entirely new.
Regards, Marijan Pollak
On Sun, Jan 1, 2017 at 7:16 PM, nop head nop.head@gmail.com wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak oberonmp@gmail.com wrote:
Hi, I did not know the difference exist. It may be true that it is
parsed top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y
on horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are
executed rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head nop.head@gmail.com wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside
down and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak oberonmp@gmail.com wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside
down and
rightside left
as compared to other Programming Languages? Was this originally made
by
Chinese?
If I have time I would turn this to normal, as well as make it
faster, this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions
would save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous
2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
Thank You Very Kindly!
I suppose I can generate whole turbine by generating 1/ 3 of points and
making Extrude,
then rotating object 120 degtees and repeating or just cutting that out
with Puzzlecut and
joining 3 pieces after they are printed on 3D printer..... Can I draw on
surface of cylinder
and then Extrude2D to get one joined object, or this has to be made
separate object first
So, I must experiment.... Is there a way to build 3D object that way?
Same, there would be many points anyhow, so many lines in .txt file.
How do I signal to program that next line is continuation of points?
I also suppose that last point should be first?
or I can draw using primitives like line or circle? I would like to use
Rotate Extrude and also make
Welds. I suppose once I extrude this form to 3D I have to save object
created, after which I can
Join or subtract some primitives like from any other Objects imported?
On Sun, Jan 1, 2017 at 10:50 PM, Ronaldo Persiano rcmpersiano@gmail.com
wrote:
Pollak,
Except in cases of heavy and complex models, you should not be concerned
about avoiding to rebuild a "clone" in OpenSCAD. The system keeps computed
models and values in cache so its reuse doesn't require reevaluations.
About your turbine design code: in principle, you have two alternatives;
one is to compute the profiles through an OpenSCAD code generating points
and passing them to a polygon() or polyhedron(); or change the code of your
external profile generator in order to produce its output as a text file of
the form:
points = [ [...], [...], ...];
This text file is then made part of your OpenSCAD code with:
use <profile_points.txt>
at its beginning.
Ronaldo
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19844.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Marijan Pollak wrote
Ok, Module can see Global Variable but it cannot change itts value.
However if there is local variable with same name, i.e kerf in the
Puzzlecut then I must write kerf=kerf in module parameter list,
and I find some modules have kerf=0 as parameter which is
confusing me, as it seems not used in that module MaleCut,
but someplace else, outside of Puzzlecut.Lib
PuzzleCut uses a valid scope rule that I would not recommend. Look at this
code:
global = 10;
printGlobal();
printGlobal(global=0);
module printGlobal() {
print(global);
}
module print(a){
echo(a);
}
The console output will be:
ECHO: 10
ECHO: 0
The module printGlobal() has no parameters and just print() the variable
global; but when the module is called with global=0 as it was a parameter, a
new "local" variable global is instantiated in the new scope. So,
print(global) will echo this new value.
In PuzzleCut, kerf is global but is sometimes overridden in some function or
module calls.
It is a valid construct in OpenSCAD but it is safer and clearer to define as
parameter instead.
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19845.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
a) You will find a lot of information about how to program with OpenSCAD in
the net. A good starting point is
https://www.thingiverse.com/jumpstart/openscad
b) Doing a web search like "programming openscad" will further present you a
large list of programming guides and courses that go deeper into different
aspects of OpenSCAD.
c) In Thingiverse finally you will find tens of thousands of code examples
for designs done with OpenSCAD. So, if you are interested how to express
some turbine design, search there for "tubine" and have a look at designs
which are similar and offer .scad files for download.
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19846.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Marijan Pollak wrote
I suppose I can generate whole turbine by generating 1/ 3 of points and
making Extrude,
then rotating object 120 degtees and repeating or just cutting that out
with Puzzlecut and
joining 3 pieces after they are printed on 3D printer..... Can I draw on
surface of cylinder
and then Extrude2D to get one joined object, or this has to be made
separate object first?
So, I must experiment.... Is there a way to build 3D object that way?
I am not sure what you meant by that.
Same, there would be many points anyhow, so many lines in .txt file.
How do I signal to program that next line is continuation of points?
I also suppose that last point should be first?
Any used or included text file must be written following the OpenSCAD
language.
Hence all end-of-line characters are ignored.
or I can draw using primitives like line or circle?
There is no line or circle primitives in OpenSCAD, only volumetric
primitives.
I would like to use
Rotate Extrude and also make
Welds. I suppose once I extrude this form to 3D I have to save object
created, after which I can
Join or subtract some primitives like from any other Objects imported?
As said before, you may define a solid with a module and use it many times
as needed. You don't have to "save it". Refer to the nophead's code example.
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19848.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
There is no line or circle primitives in OpenSCAD
There is no line but there certainly is circle() and square() as well as
polygon() for making 2D shapes. They can be combined with the same boolean
ops as 3D and they can be converted to 3D with linear_extrude() and
rotate_extrude().
On 2 January 2017 at 14:46, Ronaldo rcmpersiano@gmail.com wrote:
Marijan Pollak wrote
I suppose I can generate whole turbine by generating 1/ 3 of points and
making Extrude,
then rotating object 120 degtees and repeating or just cutting that out
with Puzzlecut and
joining 3 pieces after they are printed on 3D printer..... Can I draw on
surface of cylinder
and then Extrude2D to get one joined object, or this has to be made
separate object first?
So, I must experiment.... Is there a way to build 3D object that way?
I am not sure what you meant by that.
Same, there would be many points anyhow, so many lines in .txt file.
How do I signal to program that next line is continuation of points?
I also suppose that last point should be first?
Any used or included text file must be written following the OpenSCAD
language.
Hence all end-of-line characters are ignored.
or I can draw using primitives like line or circle?
There is no line or circle primitives in OpenSCAD, only volumetric
primitives.
I would like to use
Rotate Extrude and also make
Welds. I suppose once I extrude this form to 3D I have to save object
created, after which I can
Join or subtract some primitives like from any other Objects imported?
As said before, you may define a solid with a module and use it many times
as needed. You don't have to "save it". Refer to the nophead's code
example.
--
View this message in context: http://forum.openscad.org/
Export-Stl-File-module-tp19829p19848.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
You are right, sorry. I meant circumference.
2017-01-02 13:01 GMT-02:00 nop head nop.head@gmail.com:
There is no line or circle primitives in OpenSCAD
There is no line but there certainly is circle() and square() as well as
polygon() for making 2D shapes. They can be combined with the same boolean
ops as 3D and they can be converted to 3D with linear_extrude() and
rotate_extrude().
On 2 January 2017 at 14:46, Ronaldo rcmpersiano@gmail.com wrote:
Marijan Pollak wrote
I suppose I can generate whole turbine by generating 1/ 3 of points and
making Extrude,
then rotating object 120 degtees and repeating or just cutting that out
with Puzzlecut and
joining 3 pieces after they are printed on 3D printer..... Can I draw on
surface of cylinder
and then Extrude2D to get one joined object, or this has to be made
separate object first?
So, I must experiment.... Is there a way to build 3D object that way?
I am not sure what you meant by that.
Same, there would be many points anyhow, so many lines in .txt file.
How do I signal to program that next line is continuation of points?
I also suppose that last point should be first?
Any used or included text file must be written following the OpenSCAD
language.
Hence all end-of-line characters are ignored.
or I can draw using primitives like line or circle?
There is no line or circle primitives in OpenSCAD, only volumetric
primitives.
I would like to use
Rotate Extrude and also make
Welds. I suppose once I extrude this form to 3D I have to save object
created, after which I can
Join or subtract some primitives like from any other Objects imported?
As said before, you may define a solid with a module and use it many times
as needed. You don't have to "save it". Refer to the nophead's code
example.
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829p19848.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Dear Coleague, So, my logic was correct in case of program execution,
so IMHO it would be more practicall that programmer write same way as
program execute. This way fewer mistakes would be made.
Also Imaga is Variable, not constant. it means "it is there" or "Object
exist"
and signal that there is file to be Imported and all previous work on
generating
Object can be skipped. Time saved is enormous, specially with very complex
objects.
Since program execute oposite then it is written, I concluded I would have
to
write code converter to be able to follow standard logic of programming.
It would be easier if someone change this so people drawing the Objects
would not have to adjust to way program generates Objects.
Programming is invented so they can help Programmers to write correct code
NOT that programmers should help Computer to do it upside down.
I do not know how such bug was not noted and made right.
that is Microsoft style of Programming and logic. "It is not a Bug, it is a
FEATURE"?
On Sun, Jan 1, 2017 at 7:18 PM, nophead [via OpenSCAD] <
ml-node+s1091067n19834h60@n5.nabble.com> wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=0> wrote:
Hi, I did not know the difference exist. It may be true that it is parsed
top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y on
horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are executed
rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=1> wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=2> wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down
and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions would
save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous 2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=3
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=4
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=5
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=6
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19834.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19851.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Would you please give us a small piece of code you believe it is executed
upside down?
2017-01-02 18:27 GMT-02:00 Marijan Pollak oberonmp@gmail.com:
Dear Coleague, So, my logic was correct in case of program execution,
so IMHO it would be more practicall that programmer write same way as
program execute. This way fewer mistakes would be made.
Also Imaga is Variable, not constant. it means "it is there" or "Object
exist"
and signal that there is file to be Imported and all previous work on
generating
Object can be skipped. Time saved is enormous, specially with very complex
objects.
Since program execute oposite then it is written, I concluded I would have
to
write code converter to be able to follow standard logic of programming.
It would be easier if someone change this so people drawing the Objects
would not have to adjust to way program generates Objects.
Programming is invented so they can help Programmers to write correct code
NOT that programmers should help Computer to do it upside down.
I do not know how such bug was not noted and made right.
that is Microsoft style of Programming and logic. "It is not a Bug, it is
a FEATURE"?
On Sun, Jan 1, 2017 at 7:18 PM, nophead [via OpenSCAD] <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19851&i=0> wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=0> wrote:
Hi, I did not know the difference exist. It may be true that it is
parsed top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y
on horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are
executed rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=1> wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=2> wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down
and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions
would save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous
2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=3
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=4
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=5
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=6
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19834.html
To unsubscribe from Export Stl. File module, click here.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
View this message in context: Re: Export Stl. File module
http://forum.openscad.org/Export-Stl-File-module-tp19829p19851.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
There is a large community of OpenSCAD users that have been using it for
many years and nobody but you thinks it is upside down.
There are no variables in OpenSCAD, just named constants, because it is a
language to describe an object and a description does not change over time.
On 2 January 2017 at 20:27, Marijan Pollak oberonmp@gmail.com wrote:
Dear Coleague, So, my logic was correct in case of program execution,
so IMHO it would be more practicall that programmer write same way as
program execute. This way fewer mistakes would be made.
Also Imaga is Variable, not constant. it means "it is there" or "Object
exist"
and signal that there is file to be Imported and all previous work on
generating
Object can be skipped. Time saved is enormous, specially with very complex
objects.
Since program execute oposite then it is written, I concluded I would have
to
write code converter to be able to follow standard logic of programming.
It would be easier if someone change this so people drawing the Objects
would not have to adjust to way program generates Objects.
Programming is invented so they can help Programmers to write correct code
NOT that programmers should help Computer to do it upside down.
I do not know how such bug was not noted and made right.
that is Microsoft style of Programming and logic. "It is not a Bug, it is
a FEATURE"?
On Sun, Jan 1, 2017 at 7:18 PM, nophead [via OpenSCAD] <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19851&i=0> wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=0> wrote:
Hi, I did not know the difference exist. It may be true that it is
parsed top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y
on horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are
executed rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=1> wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside down
and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=2> wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside down
and
rightside left
as compared to other Programming Languages? Was this originally made by
Chinese?
If I have time I would turn this to normal, as well as make it faster,
this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions
would save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous
2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=3
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=4
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=5
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=6
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19834.html
To unsubscribe from Export Stl. File module, click here.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
View this message in context: Re: Export Stl. File module
http://forum.openscad.org/Export-Stl-File-module-tp19829p19851.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Why then no one has written proper Puzzlecut module/Library?
If I would do it I would se two overlaping cylinders with cut line trough
their intersection.
As I am new to Open SCAD I am forced to use what exist, regardless of
correctness
or (for me) ilogical way program has to be written.
It is logical that program execute in same order it is written, whch is
usually "Top Down"
or "Waterfall" program development, not "Bottom up".
But then, I am Proffesional Programmer, from time when Bugs in Programs
were not
fashionable. Nowadays people seems to think that it is impossible to make
Program
or Application without Bugs :-((
On Mon, Jan 2, 2017 at 3:34 PM, Ronaldo [via OpenSCAD] <
ml-node+s1091067n19845h1@n5.nabble.com> wrote:
Marijan Pollak wrote
Ok, Module can see Global Variable but it cannot change itts value.
However if there is local variable with same name, i.e kerf in the
Puzzlecut then I must write kerf=kerf in module parameter list,
and I find some modules have kerf=0 as parameter which is
confusing me, as it seems not used in that module MaleCut,
but someplace else, outside of Puzzlecut.Lib
PuzzleCut uses a valid scope rule that I would not recommend. Look at this
code:
global = 10;
printGlobal();
printGlobal(global=0);
module printGlobal() {
print(global);
}
module print(a){
echo(a);
}
The console output will be:
ECHO: 10
ECHO: 0
The module printGlobal() has no parameters and just print() the variable
global; but when the module is called with global=0 as it was a parameter,
a new "local" variable global is instantiated in the new scope. So,
print(global) will echo this new value.
In PuzzleCut, kerf is global but is sometimes overridden in some function
or module calls.
It is a valid construct in OpenSCAD but it is safer and clearer to define
as parameter instead.
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19845.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19854.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
There are many professional programmers here with exceptional skills.
Perhaps OpenSCAD is not suitable for you.
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.
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19855.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
"Top Down", "Waterfall" and "Bottom up" are types of program development
methodologies, nothing to do with program execution order.
OpenSCAD programs don't execute. They are descriptions that get compiled
into geometry.
I don't know anything about Puzzlecut but it should be easy to define a
jigsaw type shape and then intersect with an STL file to get a tile of it.
That can be done with the position defined by the command line to get each
piece, one at a time.
On 2 January 2017 at 20:53, Marijan Pollak oberonmp@gmail.com wrote:
Why then no one has written proper Puzzlecut module/Library?
If I would do it I would se two overlaping cylinders with cut line trough
their intersection.
As I am new to Open SCAD I am forced to use what exist, regardless of
correctness
or (for me) ilogical way program has to be written.
It is logical that program execute in same order it is written, whch is
usually "Top Down"
or "Waterfall" program development, not "Bottom up".
But then, I am Proffesional Programmer, from time when Bugs in Programs
were not
fashionable. Nowadays people seems to think that it is impossible to make
Program
or Application without Bugs :-((
On Mon, Jan 2, 2017 at 3:34 PM, Ronaldo [via OpenSCAD] <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19854&i=0> wrote:
Marijan Pollak wrote
Ok, Module can see Global Variable but it cannot change itts value.
However if there is local variable with same name, i.e kerf in the
Puzzlecut then I must write kerf=kerf in module parameter list,
and I find some modules have kerf=0 as parameter which is
confusing me, as it seems not used in that module MaleCut,
but someplace else, outside of Puzzlecut.Lib
PuzzleCut uses a valid scope rule that I would not recommend. Look at
this code:
global = 10;
printGlobal();
printGlobal(global=0);
module printGlobal() {
print(global);
}
module print(a){
echo(a);
}
The console output will be:
ECHO: 10
ECHO: 0
The module printGlobal() has no parameters and just print() the variable
global; but when the module is called with global=0 as it was a parameter,
a new "local" variable global is instantiated in the new scope. So,
print(global) will echo this new value.
In PuzzleCut, kerf is global but is sometimes overridden in some function
or module calls.
It is a valid construct in OpenSCAD but it is safer and clearer to define
as parameter instead.
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19845.html
To unsubscribe from Export Stl. File module, click here.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
View this message in context: Re: Export Stl. File module
http://forum.openscad.org/Export-Stl-File-module-tp19829p19854.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 01/02/2017 09:53 PM, Marijan Pollak wrote:
But then, I am Proffesional Programmer, from time when
Bugs in Programs were not fashionable. Nowadays people
seems to think that it is impossible to make Program
or Application without Bugs :-((
There may be quite some bugs in OpenSCAD and the
design may not be perfect (I think it was conceived
as a tool to get things done, not invented and designed
as perfect programming language).
Still what you describe is not a bug, not even close.
You fail to see that there are other ways to describe
things that are not necessarily a bug just because
they are different.
Consider "normal" pocket calculators and compare to
those that use RPN notation. Both are doing the job
correctly, but using different notations.
Trying to bend OpenSCAD to a thinking that does not
fit it's design will only end in tears. Some time
ago, Alan called that "iterative programmers disease"
which is probably pointing to the root of that
discussion which does come up every now and then.
All that being said, there's a lot of things on the
wishlist to make OpenSCAD more powerful and more
flexible. This will happen eventually, I hope.
Considering the limited dev power, it might need
quite a while though.
ciao,
Torsten.
Thank for Advice, but multitude of Manuals can be problem by itself, unless
they are equally good
so it is same whichever I read. But IMHO such things (equally good)
usually do not exist.
Yes, I usually search for similar examples, to not duplicate efforts
needlessly.
However my turbine is IMHO first that is not merely pushed by Wind, so it
surely has no predecesor.
I consider myself lucky to have find Open SCAD, but so far I have found
just simple examples.
But as a newbie, I has to start simple, too. However I use 3D MAX nearly
from its beginning, so many
things about handling of primitives and joining them or subtracting one
from another I know how to do.
Intersection should not be a problem as I understand concept.
I just do not understand why every Bug is not clean out, but people must
devise "Workarounds".
Likewise I am horrified by multitude of parenthesis used. It seems to me
that original writers forgot
that computers and their programs were meant to help people in their work,
and it is not job of the
Programmer to help Compiler to work properly, but job of compiler to help
Programmer........
In the end, I think it is not Compiler at all but Interpreter. Difference
is in speed.
When writting compiler I would make Editor to compile all changes in
programs instantly.
People work so slowly that in time one instruction is added,, whole program
could be compiled, unless
it has million lines of code, but in case of incremental compiling, even
this can take few seconds
at first and few microseconds later.
Anyway, thank You for Your kind answers and oportunity to correspond to
inteligent people.
On Mon, Jan 2, 2017 at 3:34 PM, Parkinbot [via OpenSCAD] <
ml-node+s1091067n19846h32@n5.nabble.com> wrote:
a) You will find a lot of information about how to program with OpenSCAD
in the net. A good starting point is https://www.thingiverse.com/
jumpstart/openscad
b) Doing a web search like "programming openscad" will further present you
a large list of programming guides and courses that go deeper into
different aspects of OpenSCAD.
c) In Thingiverse finally you will find tens of thousands of code examples
for designs done with OpenSCAD. So, if you are interested how to express
some turbine design, search there for "tubine" and have a look at designs
which are similar and offer .scad files for download.
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19846.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19858.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I'm reluctant to suggest this but if you have a flat shape you want to
extrude then consider drawing the shape in inkscape and using the export
to openscad extension. here: http://www.thingiverse.com/thing:1065500
However this will only give you an extruded 2D cutout. Its possible you
want some kind of curved 3 dimensional shape.
Dear Sir, 1st. I ment to construct whole 3D object using Points.
Next my question was that once I "Extrude" 2D draving.I do not
know if I can then add to it 3D primitives, or I have to save it as .stl
file
and then import into program that would treat it as any other 3D
object, as I saw somewhere comment that someone should not do
Extrude and use 3D objects, or cannot Extrude 3D object, which is
logical.
I also asked if Points are pairs of coordinates or each is one in line.
ThankYou for clarifying that 2D cannot be constructed in SCAD as
ther are no 2D primitives..............
On Mon, Jan 2, 2017 at 3:46 PM, Ronaldo [via OpenSCAD] <
ml-node+s1091067n19848h94@n5.nabble.com> wrote:
Marijan Pollak wrote
I suppose I can generate whole turbine by generating 1/ 3 of points and
making Extrude,
then rotating object 120 degtees and repeating or just cutting that out
with Puzzlecut and
joining 3 pieces after they are printed on 3D printer..... Can I draw on
surface of cylinder
and then Extrude2D to get one joined object, or this has to be made
separate object first?
So, I must experiment.... Is there a way to build 3D object that way?
I am not sure what you meant by that.
Same, there would be many points anyhow, so many lines in .txt file.
How do I signal to program that next line is continuation of points?
I also suppose that last point should be first?
Any used or included text file must be written following the OpenSCAD
language.
Hence all end-of-line characters are ignored.
or I can draw using primitives like line or circle?
There is no line or circle primitives in OpenSCAD, only volumetric
primitives.
I would like to use
Rotate Extrude and also make
Welds. I suppose once I extrude this form to 3D I have to save object
created, after which I can
Join or subtract some primitives like from any other Objects imported?
As said before, you may define a solid with a module and use it many times
as needed. You don't have to "save it". Refer to the nophead's code
example.
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19848.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19860.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Marijan Pollak wrote
Dear Sir, 1st. I ment to construct whole 3D object using Points.
Next my question was that once I "Extrude" 2D draving.I do not
know if I can then add to it 3D primitives, or I have to save it as .stl
file
and then import into program that would treat it as any other 3D
object, as I saw somewhere comment that someone should not do
Extrude and use 3D objects, or cannot Extrude 3D object, which is
logical.
I also asked if Points are pairs of coordinates or each is one in line.
ThankYou for clarifying that 2D cannot be constructed in SCAD as
ther are no 2D primitives..............
There is 2D primitives in OpenSCAD. I am sorry to have given a wrong answer
before. Circle, square, polygon and text are the only 2D primitives. There
is no 1D primitives though. 2D primitives may be operated (boolean,
minkowski or hull) to get more general 2D shapes.
If you linear_extrude or rotate_extrude a 2D shape you get a 3D model that
can be operated with other 3D models. You don't need to save an stl file and
import it to do it. You cannot mix a 2D shape and a 3D model in any boolean
or minkowski or hull operators. There is no extrusion operator for 3D
models. You cannot render a mix of 2D and 3D models.
To build 2D polygons you use 2D points (two coordinates). Polyhedron()
requires 3D points.
OpenSCAD CheatSheet and the Manual are invaluable sources.
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19863.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi, MichaelAtOz, I do not doubt what You write that there are people here
with exceptional skills.
I would say however that any program should be as suitable for everyone as
it can be, as it has
to help user, not make his life complicated.
We say in my country "Ignorance is not knowing anything better exist".
I would also hold it true that such community is founded to clear up Bugs
and further develop
Open SCAD. I may write "Language to language translator" just to be able to
program things
normally and strictly as required for punctuation of OPEN SCAD, which
would eliminate lot of
unintential errors and save me lot of precious TIME.
This would help only me, so why would not someone change it for everybody?
On the other hand, it is perhaps too late as thousands of examples are
writen that would need
rewritting and there are many users adjusted to such upside down logic that
would find it hard
to adjust to change. Since I have find OPEN SCAD by finding usefull
examples, I have to stick
with that is there.
I thank You for all help You are providing, but if I as one new to SCAD get
example that do not
work, how can I make it work? I program 37+ years but I am not young any
more, am half blind
so it is hard to find all those parentheses on keyboard because they are
seldom needed any
where else, and they are in group of keys with several characters on them,
so making mistake
is easy. I would return favours by posting all examples that were not
working for me, once I make
them work. As person with lifelong experience in programming, I would try
to advise You abot
good practices in Programming, if You and others would care to listen.
So every example has to be fully commented, as even author may not
recognize it after some
time pases. Next it has to be fully tested to do all what it has to do. If
possible some examples
of use should be included.
I suppose main Goal of this group is to enable everyone to design 3D
objects, not to spend time
chasing their own and somebody else's Bugs..................
Mon, Jan 2, 2017 at 10:09 PM, MichaelAtOz [via OpenSCAD] <
ml-node+s1091067n19855h11@n5.nabble.com> wrote:
There are many professional programmers here with exceptional skills.
Perhaps OpenSCAD is not suitable for you.
*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!
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19855.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19866.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi, Mark, I have program in GFA 32 BASIC tht is drawing this 2D contour, so
in one hand I can adjust it
to do same in OPEN SCAD, using 2D primitives, as I want to "Rotate extrude"
it, which I guess cannot
be done if I build it from 3D primitives.
On the other hand, this is just ONE of handfull of new turbinesthat are all
different by look, so to be able
to produce various sizes automatically using Radius, whenever it is
necesarry.
As such turbines are meant to replace old and barely effective standard
tubines which would require
differnt interfaces. I have done this with 3D MAX with 3D primitives, but
I need to work precisely.
Have many ideas but they all have to be done fast, before they evaporate
from my head.
So thanks again for helping, just do not assume that I know nothing about
programming, only OPEN
SCAD is new to me.
On Mon, Jan 2, 2017 at 10:24 PM, Mark Schafer mschafer@wireframe.biz
wrote:
I'm reluctant to suggest this but if you have a flat shape you want to
extrude then consider drawing the shape in inkscape and using the export to
openscad extension. here: http://www.thingiverse.com/thing:1065500
However this will only give you an extruded 2D cutout. Its possible you
want some kind of curved 3 dimensional shape.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
On 01/02/2017 11:59 PM, Marijan Pollak wrote:
So every example has to be fully commented, as even
author may not recognize it after some time pases.
Next it has to be fully tested to do all what it has
to do. If possible some examples of use should be
included.
Yes, I totally agree. We don't have a very exhaustive
"official" tutorial yet (there are some good ones linked
from the main web site).
Not long ago, we did start a collection of code snippets
as examples for specific topics.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks
It's still a bit random, but if you have a list of
short topics, feel free to post the list. Maybe we
can come up with example code for some or even all
and add them to the tips&tricks page.
ciao,
Torsten.
Thanks, I assumed so. I must check this PoliHedron forming as I would be
able ti create necesary 3D shapes directly by program.
I wonder if this would be more complex or more simple objects than ones
made by series of joining and subtracting 3D primitives.
In any case I can do it if I have correctly working examples that I can
modify to suit my plans.
On Mon, Jan 2, 2017 at 11:27 PM, Ronaldo [via OpenSCAD] <
ml-node+s1091067n19863h59@n5.nabble.com> wrote:
Marijan Pollak wrote
Dear Sir, 1st. I ment to construct whole 3D object using Points.
Next my question was that once I "Extrude" 2D draving.I do not
know if I can then add to it 3D primitives, or I have to save it as .stl
file
and then import into program that would treat it as any other 3D
object, as I saw somewhere comment that someone should not do
Extrude and use 3D objects, or cannot Extrude 3D object, which is
logical.
I also asked if Points are pairs of coordinates or each is one in line.
ThankYou for clarifying that 2D cannot be constructed in SCAD as
ther are no 2D primitives..............
There is 2D primitives in OpenSCAD. I am sorry to have given a wrong
answer before. Circle, square, polygon and text are the only 2D primitives.
There is no 1D primitives though. 2D primitives may be operated (boolean,
minkowski or hull) to get more general 2D shapes.
If you linear_extrude or rotate_extrude a 2D shape you get a 3D model that
can be operated with other 3D models. You don't need to save an stl file
and import it to do it. You cannot mix a 2D shape and a 3D model in any
boolean or minkowski or hull operators. There is no extrusion operator for
3D models. You cannot render a mix of 2D and 3D models.
To build 2D polygons you use 2D points (two coordinates). Polyhedron()
requires 3D points.
OpenSCAD CheatSheet and the Manual are invaluable sources.
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19863.html
To unsubscribe from Export Stl. File module, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=19829&code=b2Jlcm9ubXBAZ21haWwuY29tfDE5ODI5fC00Mzg5MzYyNzk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19869.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I shall do what I can, to best of my abilities.
Can You tell me where I can find Source code of that OPEN SCAD
editor?
It would not be necesary if after cutting one side I can rotate and cut
the rest.
I just do not know how to separate cut pieces and export just one that is
ready
for 3D printing. I found out how to delete one of cut parts by accident,
but in
some cases of huge sized pieces I would prefer if I can cut everything,
export
it all and then separate just 1/3 of pieces as other 2/3 is same.
However it would be usefull sometimes to be able to pick some cut pieces and
rejoin them. I.E. I have cone in center of turbine, which in case I cut
turbine
across the center, would be cut in many pieces, Then in case I cut out
center
using cylinder, it would be usefull to be able to put it together back as
it was.
Of course it is possible to make Module which would redraw center or even
use it as "Knife" to cut out centerpiece, or I have to cutt this first and
save.
By the way, do You know best size of "kerf" so pieces could be joined
strongly
after 3D printing, but not be impossible to do so?
On Tue, Jan 3, 2017 at 12:52 AM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 01/02/2017 11:59 PM, Marijan Pollak wrote:
So every example has to be fully commented, as even
author may not recognize it after some time pases.
Next it has to be fully tested to do all what it has
to do. If possible some examples of use should be
included.
Yes, I totally agree. We don't have a very exhaustive
"official" tutorial yet (there are some good ones linked
from the main web site).
Not long ago, we did start a collection of code snippets
as examples for specific topics.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks
It's still a bit random, but if you have a list of
short topics, feel free to post the list. Maybe we
can come up with example code for some or even all
and add them to the tips&tricks page.
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
By the way, do You know best size of "kerf" so pieces could be joined
strongly after 3D printing, but not be impossible to do so?
On a correctly calibrated printer it is 0. That is what I use whenever I
join pieces together. The problem is most people tune their objects to
match the printer instead of getting their printer to print the correct
size.
The source code of the editor is here:
https://github.com/openscad/openscad/blob/master/src/scintillaeditor.cpp
On 3 January 2017 at 00:22, Marijan Pollak oberonmp@gmail.com wrote:
I shall do what I can, to best of my abilities.
Can You tell me where I can find Source code of that OPEN SCAD
editor?
It would not be necesary if after cutting one side I can rotate and cut
the rest.
I just do not know how to separate cut pieces and export just one that is
ready
for 3D printing. I found out how to delete one of cut parts by accident,
but in
some cases of huge sized pieces I would prefer if I can cut everything,
export
it all and then separate just 1/3 of pieces as other 2/3 is same.
However it would be usefull sometimes to be able to pick some cut pieces
and
rejoin them. I.E. I have cone in center of turbine, which in case I cut
turbine
across the center, would be cut in many pieces, Then in case I cut out
center
using cylinder, it would be usefull to be able to put it together back as
it was.
Of course it is possible to make Module which would redraw center or even
use it as "Knife" to cut out centerpiece, or I have to cutt this first
and save.
By the way, do You know best size of "kerf" so pieces could be joined
strongly
after 3D printing, but not be impossible to do so?
On Tue, Jan 3, 2017 at 12:52 AM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 01/02/2017 11:59 PM, Marijan Pollak wrote:
So every example has to be fully commented, as even
author may not recognize it after some time pases.
Next it has to be fully tested to do all what it has
to do. If possible some examples of use should be
included.
Yes, I totally agree. We don't have a very exhaustive
"official" tutorial yet (there are some good ones linked
from the main web site).
Not long ago, we did start a collection of code snippets
as examples for specific topics.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks
It's still a bit random, but if you have a list of
short topics, feel free to post the list. Maybe we
can come up with example code for some or even all
and add them to the tips&tricks page.
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
That is because in 26 Programming Languages I learned and used not single
one do not deviate
from execution in a way it is written, top down and branching.
I was also writting Compilers and Interpreters. Must be this came later
with Languages like ADA,
Python, Ruby and other, less known or specialized languages.
On Mon, Jan 2, 2017 at 9:37 PM, nop head nop.head@gmail.com wrote:
There is a large community of OpenSCAD users that have been using it for
many years and nobody but you thinks it is upside down.
There are no variables in OpenSCAD, just named constants, because it is a
language to describe an object and a description does not change over time.
On 2 January 2017 at 20:27, Marijan Pollak oberonmp@gmail.com wrote:
Dear Coleague, So, my logic was correct in case of program execution,
so IMHO it would be more practicall that programmer write same way as
program execute. This way fewer mistakes would be made.
Also Imaga is Variable, not constant. it means "it is there" or "Object
exist"
and signal that there is file to be Imported and all previous work on
generating
Object can be skipped. Time saved is enormous, specially with very
complex
objects.
Since program execute oposite then it is written, I concluded I would
have to
write code converter to be able to follow standard logic of programming.
It would be easier if someone change this so people drawing the Objects
would not have to adjust to way program generates Objects.
Programming is invented so they can help Programmers to write correct code
NOT that programmers should help Computer to do it upside down.
I do not know how such bug was not noted and made right.
that is Microsoft style of Programming and logic. "It is not a Bug, it is
a FEATURE"?
On Sun, Jan 1, 2017 at 7:18 PM, nophead [via OpenSCAD] <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19851&i=0> wrote:
Firstly statements are not executed as such. They build a tree structure
of geometric primitives and boolean operations. The boolean operations can
be done in any order as long as the operands (which are lower branches in
the tree) have been computed first. So yes things on the right are lower
nodes on the tree and must be computed first. And yes, compound statements
like union() that can span many lines will compute all the things lower in
the tree before the union is computed.
Secondly, OpenSCAD has lexical scope, very much the same as C, so a
variable (which are actually named constants) defined in one module cannot
be accessed in a another. But you can define constants at file level scope,
so if you move imaga=1 outside the Cuts module it will be accessible in
osnova. Or you can declare it as a parameter of osnova and pass it each
time you call it.
On 1 January 2017 at 17:25, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=0> wrote:
Hi, I did not know the difference exist. It may be true that it is
parsed top to bottom, but somehow I
found that what is on the bottom of Module is executed first, then line
up and each line is executed right to left.
There is Example:
module Cuts(){
imaga=1 // Last of all , program is notified that file exist and
need not to be drawn again
//Here cut object has to be exported
;
angleMaleCut(cut = yCut1); // Then male cut is made
angleMaleCut(cut = yCut2);
angleMaleCut(cut = yCut3);
translate ([0,0,0]); // It is aligned to center line
osnova(); // again clone or duplicate
is imported or drawn
angleFemaleCut(cut = yCut1); // then female cuts are made
angleFemaleCut(cut = yCut2);
angleFemaleCut(cut = yCut3);
translate ([-15,0,0]); // It is then moved 15mm on
Xcoordinate
Rotate (0,120,0,); // Second, iti s rotated in y
on horizontal plane
osnova(); // First, .stl file is
Imported or drawn
}
//
module osnova()
{//"scadturbine.stl
echo("Object to cut=",objekt, "ima =", imaga);
if(imaga == 0){drawObject();}
else {import(objekt);}
}
in case there is more then one instruction on one line, they are
executed rightmost first
then left neigbour one by one .
That is consistent with bottom to top execution.
I shall check again by puting some ECHO commands
However, since Imaga =1; is first command If program would work normal
way,
then ECHO would not report Zero in module osnova.
Ups!
.It seems that variables from program were not passed to Module unless
explicitely mentioned in Module
Parameter lists,which means I cannot change value in Module to be
generally available at new state?
Maxbe those multiple instractions were permutable without change of
result?
So how to do it? must put imaga = imaga, in Module parameter list?
Or something else?
Sincerely, Marijan Pollak
On Sun, Jan 1, 2017 at 3:37 PM, nop head <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=1> wrote:
Note this is OpenSCAD. Open SCADA is a different, unrelated, project.
I also wonder why is everything in this programming script upside
down and rightside left.
I don't know what you mean. The Syntax and layout are similar to C and
is parsed top to bottom, left to right.
Was this originally made by Chinese?
No, Austrians.
On 1 January 2017 at 08:07, Marijan Pollak <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19834&i=2> wrote:
Hello colagues, I noted there is no way to Export .stl file except by
hand,
while Import is working. IMHO, it should be easy to make new Module
ExportStl() by finding same function in Editor. Since I am New to Open
Scada, can some seasoned SCADA programmer do it?
I also wonder why is everything in this programming script upside
down and
rightside left
as compared to other Programming Languages? Was this originally made
by
Chinese?
If I have time I would turn this to normal, as well as make it
faster, this
seems awfully slow
for just few simple Objects added or subtracted one from another.
I really need such parametric 3D drawing program as in 3D Max I cannot
position things precisely by hand. I am inventor whose inventions
would save
the World, so by helping me You would help Yourself also.
What I am trying to do at moment is to find way to cut large objects
symetrically like by Puzzlecut, to be able to 3D print pieces of large
objects on small 3D printer, I.E. 25 x 25 cm
pieces of 100 cm diameter objects. I tried to attach the picture here
but
script hanged up, so this time I would try to do it separately....
Thanks in advance and I wish You all Healthy, Happy anf Prosperous
2017!
--
View this message in context: http://forum.openscad.org/Expo
rt-Stl-File-module-tp19829.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=3
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=4
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=5
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19834&i=6
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19834.html
To unsubscribe from Export Stl. File module, click here.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
View this message in context: Re: Export Stl. File module
http://forum.openscad.org/Export-Stl-File-module-tp19829p19851.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th
and 20th Centuries, Engineer Nikola Tesla!
On 01/03/2017 01:22 AM, Marijan Pollak wrote:
Can You tell me where I can find Source code of that OPEN SCAD
editor?
There is only some wrapper code in OpenSCAD itself as we
use the QScintilla library which provides the editor component.
(https://riverbankcomputing.com/software/qscintilla/intro)
The wrapper code is in
https://github.com/openscad/openscad/blob/master/src/scintillaeditor.cpp
For cutting and separation, I don't have a general solution.
I think that does depend quite a bit on the specific model. I
tend to generate parts that are separate in the real model as
different modules, so it's relatively easy to combine those in
an assembly later, maybe with different selection.
As mentioned before, the multi-part export is not yet implemented
but can be done using the method shown here:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#How_can_I_export_multiple_parts_from_one_script.3F
By the way, do You know best size of "kerf" so pieces could
be joined strongly after 3D printing, but not be impossible
to do so?
I guess there are quite a lot factors that influence strength.
So I don't have any simple suggestion what would make a good
join, but thinking about the various topics and some experiments
should give some reasonable results.
ciao,
Torsten.
On Tue, Jan 3, 2017 at 12:52 AM, Torsten Paul <Torsten.Paul@gmx.de mailto:Torsten.Paul@gmx.de> wrote:
On 01/02/2017 11:59 PM, Marijan Pollak wrote:
So every example has to be fully commented, as even
author may not recognize it after some time pases.
Next it has to be fully tested to do all what it has
to do. If possible some examples of use should be
included.
Yes, I totally agree. We don't have a very exhaustive
"official" tutorial yet (there are some good ones linked
from the main web site).
Not long ago, we did start a collection of code snippets
as examples for specific topics.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks>
It's still a bit random, but if you have a list of
short topics, feel free to post the list. Maybe we
can come up with example code for some or even all
and add them to the tips&tricks page.
ciao,
Torsten.
_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
<http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th and 20th Centuries, Engineer Nikola Tesla!
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
That is because in 26 Programming Languages I learned and used not single
one do not deviate from execution in a way it is written, top down and
branching.
Well the only programming language I know that executes things strictly in
the order I write them is Forth because it uses postfix notation. Most
languages use infix notation, so the second operand that comes after the
operator is evaluated before the operator combines them. a + b is evaluated
a b +. OpenSCAD has prefix notation, so union() { a(); b() ;} evaluates a,
then b and finally does the union. I don't find that odd at all, seems
completely natural to me. It is the same as writing union(a,b) or any
function call in C type languages. They are all prefix notation.
No matter how it is written any binary operation has to evaluate its
operands before it can do the operation. So regardless of how the source
code is written it is always a b + that is evaluated.
On 3 January 2017 at 00:47, Torsten Paul Torsten.Paul@gmx.de wrote:
On 01/03/2017 01:22 AM, Marijan Pollak wrote:
Can You tell me where I can find Source code of that OPEN SCAD
editor?
There is only some wrapper code in OpenSCAD itself as we
use the QScintilla library which provides the editor component.
(https://riverbankcomputing.com/software/qscintilla/intro)
The wrapper code is in
https://github.com/openscad/openscad/blob/master/src/scintillaeditor.cpp
For cutting and separation, I don't have a general solution.
I think that does depend quite a bit on the specific model. I
tend to generate parts that are separate in the real model as
different modules, so it's relatively easy to combine those in
an assembly later, maybe with different selection.
As mentioned before, the multi-part export is not yet implemented
but can be done using the method shown here:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#How_
can_I_export_multiple_parts_from_one_script.3F
By the way, do You know best size of "kerf" so pieces could
be joined strongly after 3D printing, but not be impossible
to do so?
I guess there are quite a lot factors that influence strength.
So I don't have any simple suggestion what would make a good
join, but thinking about the various topics and some experiments
should give some reasonable results.
ciao,
Torsten.
On Tue, Jan 3, 2017 at 12:52 AM, Torsten Paul <Torsten.Paul@gmx.de
mailto:Torsten.Paul@gmx.de> wrote:
On 01/02/2017 11:59 PM, Marijan Pollak wrote:
So every example has to be fully commented, as even
author may not recognize it after some time pases.
Next it has to be fully tested to do all what it has
to do. If possible some examples of use should be
included.
Yes, I totally agree. We don't have a very exhaustive
"official" tutorial yet (there are some good ones linked
from the main web site).
Not long ago, we did start a collection of code snippets
as examples for specific topics.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks <
It's still a bit random, but if you have a list of
short topics, feel free to post the list. Maybe we
can come up with example code for some or even all
and add them to the tips&tricks page.
ciao,
Torsten.
_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
http://lists.openscad.org/mailman/listinfo/discuss_
lists.openscad.org
<http://lists.openscad.org/mailman/listinfo/discuss_
lists.openscad.org>
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!
Lisp is also prefix notation.
On 3 January 2017 at 01:00, nop head nop.head@gmail.com wrote:
That is because in 26 Programming Languages I learned and used not single
one do not deviate from execution in a way it is written, top down and
branching.
Well the only programming language I know that executes things strictly in
the order I write them is Forth because it uses postfix notation. Most
languages use infix notation, so the second operand that comes after the
operator is evaluated before the operator combines them. a + b is evaluated
a b +. OpenSCAD has prefix notation, so union() { a(); b() ;} evaluates a,
then b and finally does the union. I don't find that odd at all, seems
completely natural to me. It is the same as writing union(a,b) or any
function call in C type languages. They are all prefix notation.
No matter how it is written any binary operation has to evaluate its
operands before it can do the operation. So regardless of how the source
code is written it is always a b + that is evaluated.
On 3 January 2017 at 00:47, Torsten Paul Torsten.Paul@gmx.de wrote:
On 01/03/2017 01:22 AM, Marijan Pollak wrote:
Can You tell me where I can find Source code of that OPEN SCAD
editor?
There is only some wrapper code in OpenSCAD itself as we
use the QScintilla library which provides the editor component.
(https://riverbankcomputing.com/software/qscintilla/intro)
The wrapper code is in
https://github.com/openscad/openscad/blob/master/src/scintillaeditor.cpp
For cutting and separation, I don't have a general solution.
I think that does depend quite a bit on the specific model. I
tend to generate parts that are separate in the real model as
different modules, so it's relatively easy to combine those in
an assembly later, maybe with different selection.
As mentioned before, the multi-part export is not yet implemented
but can be done using the method shown here:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#How_c
an_I_export_multiple_parts_from_one_script.3F
By the way, do You know best size of "kerf" so pieces could
be joined strongly after 3D printing, but not be impossible
to do so?
I guess there are quite a lot factors that influence strength.
So I don't have any simple suggestion what would make a good
join, but thinking about the various topics and some experiments
should give some reasonable results.
ciao,
Torsten.
On Tue, Jan 3, 2017 at 12:52 AM, Torsten Paul <Torsten.Paul@gmx.de
mailto:Torsten.Paul@gmx.de> wrote:
On 01/02/2017 11:59 PM, Marijan Pollak wrote:
So every example has to be fully commented, as even
author may not recognize it after some time pases.
Next it has to be fully tested to do all what it has
to do. If possible some examples of use should be
included.
Yes, I totally agree. We don't have a very exhaustive
"official" tutorial yet (there are some good ones linked
from the main web site).
Not long ago, we did start a collection of code snippets
as examples for specific topics.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks
It's still a bit random, but if you have a list of
short topics, feel free to post the list. Maybe we
can come up with example code for some or even all
and add them to the tips&tricks page.
ciao,
Torsten.
_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
http://lists.openscad.org/mailman/listinfo/discuss_lists.
openscad.org
<http://lists.openscad.org/mailman/listinfo/discuss_lists.
openscad.org>
--
Regards from Croatia, the Homeland of one of greatest inventors from
19th and 20th Centuries, Engineer Nikola Tesla!