discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Export Stl. File module

MP
Marijan Pollak
Fri, Jan 6, 2017 5:58 PM

Ronaldo, I HAVE written that example  and other people answered me, saying
basically same thing as You.
I am sorry if I did not answer You directly, I did not expect that dozen
peoples would start abswiring, and that
resulted in hundreds of emails in few days.
I am nearly blind so I must rest my eyes. What I was saying was that I am
used that computer execute code exactly as I have writen it.
Someone wrote that statements are "Evaluated" from last backward something
alike formula operands, but it is not same as in formula
there is different priority of evaluations for different operations, i.e.
multiplication is executed before additions, if I remember that corectly.
I an reading cheat sheet, but someone wrote that thee is different order of
X,Y,Z in different instructions, while Cheat sheet say it is  same.
I think I noticed that in rotate () as I was unable to get 120 degrees turn
with cut on Y line. Last of all, I decided to construct knife with many
edges joined together and then subtract() it once from original object.
Problem is here how to extract part by part if it is still treated as one
object. Someone say that I do not need to think about regenerating original
object while cutting it as it is preserved and reused.
For me is not way computers are working. If I create plate and make
yMaleCut() then male side of cut remains and other side is removed.
then according to examples, I had to draw same object at same place and do
yFemaleCut() when male side of that clone of plate is removed.
If I do not regenerate plate, I find myself with male side missing.
As much I was able to see (which is not much, sorry) it is not possible to
assign Object to name. Maybe someone was answering but I was not able  to
read till now. I am also getting duplicates of answers some time, once from
You for instance and other from Forum, so it also steal
my time. I was just looking for such duplicates to send to :
oz.at.michael@gmail.com when I opened this email. As You can see it has
[via Open SCAD] after Your name so I tought it was one of duplicates.
If You read all my answers, You will find that example, however since You
are used that Open SCAD works this way maybe You cannot
notice what I wrote about
I tought Open SCAD is live and growing Language, where Community can make
it better.
However opinions are like noses, each is different and each person has at
least one.
My opinion is that programs should work in order of instruction written and
be as clear and understandable as possible.
I see that some instruction like join() assume two operands, and that are
two objects created before, or rather after it.
Those Objects are after Join() in sense that programmer write it first, and
then firstObject, then secondObject.
To me it would be more natural to write
firstObject, then
secondObject THEN
join()...
Actually in join()  operands place are irelevant, not so in subtract(),
where I suppose secondObject is subtracted from firstObject,
or is it opposite order?
Now, look fella, I am old and have not much time to finish my work, so I
cannot afford to read everything about everything, I must
limit my self on things I need to do what needs to be done, Ok? I do not
intend to try to do same thing several ways to see which is better.
I need only One way to do things, and that I can be reasonably sure
computer would do what I ask it to do. I started with Puzzlecut
as at moment I need to cut existing Objects three way or 12 way. However
some parameters are not explained even in its Library, so I sometimes get
results and cannot find why, and when i try to repeat same operation I get
mess. I am not used to this, so I started to clear out confusion.
You can help, or not, that is Your choice, just do not get mad at me. I
allways tell how I perceive things  not what someone like to hear.
I am from time when computer programmer can make bad program only once  and
never again. Fortunately some people have noticed same things as me, like
Export() function that should be there but it is not. If we are community
then we should agree to change what is wrong and
add missing or usefull things, no? If it is possible, of course. If not, I
would find workaround, but I would like that all others using SCAD benefit.
I am adaptable, when I have no other choice, But dear coleague, TIME is
most valuable resource, priceless, when You do not have enough.
Sincerely, Marijan Pollak

On Tue, Jan 3, 2017 at 8:47 PM, Ronaldo [via OpenSCAD] <
ml-node+s1091067n19900h6@n5.nabble.com> wrote:

Marijan Pollak wrote
Please do not mix formula evaluation with Order of execution.
...
I do not know if name can be assigned to Object after it is created and
then it is possible to use it wherever it is necesary.
Therefore it can be written
basePlate = Cylinder( h=thick, r=Radius)
...

Pollak,

It has been hard to try to help you. I don't know what you want: to get
some help with OpenSCAD language or to define another one. I would expect
that someone doing his first steps in OpenSCAD to explore at least the
OpenSCAD Manual through the CheatSheet identifying the main constructs,
operators and functions. It seems you do not intend to do that just digress
about your own ideas on how it would behave.

I have asked you before for a small piece of code you believe is executed
upside down. No answer. Many other people have tried to help you. But you
only reply to those who you disagree with. And each disagreement has
revealed your complete ignorance on the basic fundamentals of the language.
I don't see any possibility of convergence following this way.

Here is my ultimate atempt:

OpenSCAD CheatSheet/ http://www.openscad.org/cheatsheet/

OpenScad Manual http://en.wikibooks.org/wiki/OpenSCAD_User_Manual


If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19900.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-tp19829p19937.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Ronaldo, I HAVE written that example and other people answered me, saying basically same thing as You. I am sorry if I did not answer You directly, I did not expect that dozen peoples would start abswiring, and that resulted in hundreds of emails in few days. I am nearly blind so I must rest my eyes. What I was saying was that I am used that computer execute code exactly as I have writen it. Someone wrote that statements are "Evaluated" from last backward something alike formula operands, but it is not same as in formula there is different priority of evaluations for different operations, i.e. multiplication is executed before additions, if I remember that corectly. I an reading cheat sheet, but someone wrote that thee is different order of X,Y,Z in different instructions, while Cheat sheet say it is same. I think I noticed that in rotate () as I was unable to get 120 degrees turn with cut on Y line. Last of all, I decided to construct knife with many edges joined together and then subtract() it once from original object. Problem is here how to extract part by part if it is still treated as one object. Someone say that I do not need to think about regenerating original object while cutting it as it is preserved and reused. For me is not way computers are working. If I create plate and make yMaleCut() then male side of cut remains and other side is removed. then according to examples, I had to draw same object at same place and do yFemaleCut() when male side of that clone of plate is removed. If I do not regenerate plate, I find myself with male side missing. As much I was able to see (which is not much, sorry) it is not possible to assign Object to name. Maybe someone was answering but I was not able to read till now. I am also getting duplicates of answers some time, once from You for instance and other from Forum, so it also steal my time. I was just looking for such duplicates to send to : oz.at.michael@gmail.com when I opened this email. As You can see it has [via Open SCAD] after Your name so I tought it was one of duplicates. If You read all my answers, You will find that example, however since You are used that Open SCAD works this way maybe You cannot notice what I wrote about I tought Open SCAD is live and growing Language, where Community can make it better. However opinions are like noses, each is different and each person has at least one. My opinion is that programs should work in order of instruction written and be as clear and understandable as possible. I see that some instruction like join() assume two operands, and that are two objects created before, or rather after it. Those Objects are after Join() in sense that programmer write it first, and then firstObject, then secondObject. To me it would be more natural to write firstObject, then secondObject THEN join()... Actually in join() operands place are irelevant, not so in subtract(), where I suppose secondObject is subtracted from firstObject, or is it opposite order? Now, look fella, I am old and have not much time to finish my work, so I cannot afford to read everything about everything, I must limit my self on things I need to do what needs to be done, Ok? I do not intend to try to do same thing several ways to see which is better. I need only One way to do things, and that I can be reasonably sure computer would do what I ask it to do. I started with Puzzlecut as at moment I need to cut existing Objects three way or 12 way. However some parameters are not explained even in its Library, so I sometimes get results and cannot find why, and when i try to repeat same operation I get mess. I am not used to this, so I started to clear out confusion. You can help, or not, that is Your choice, just do not get mad at me. I allways tell how I perceive things not what someone like to hear. I am from time when computer programmer can make bad program only once and never again. Fortunately some people have noticed same things as me, like Export() function that should be there but it is not. If we are community then we should agree to change what is wrong and add missing or usefull things, no? If it is possible, of course. If not, I would find workaround, but I would like that all others using SCAD benefit. I am adaptable, when I have no other choice, But dear coleague, TIME is most valuable resource, priceless, when You do not have enough. Sincerely, Marijan Pollak On Tue, Jan 3, 2017 at 8:47 PM, Ronaldo [via OpenSCAD] < ml-node+s1091067n19900h6@n5.nabble.com> wrote: > Marijan Pollak wrote > Please do not mix formula evaluation with Order of execution. > ... > I do not know if name can be assigned to Object after it is created and > then it is possible to use it wherever it is necesary. > Therefore it can be written > basePlate = Cylinder( h=thick, r=Radius) > ... > > Pollak, > > It has been hard to try to help you. I don't know what you want: to get > some help with OpenSCAD language or to define another one. I would expect > that someone doing his first steps in OpenSCAD to explore at least the > OpenSCAD Manual through the CheatSheet identifying the main constructs, > operators and functions. It seems you do not intend to do that just digress > about your own ideas on how it would behave. > > I have asked you before for a small piece of code you believe is executed > upside down. No answer. Many other people have tried to help you. But you > only reply to those who you disagree with. And each disagreement has > revealed your complete ignorance on the basic fundamentals of the language. > I don't see any possibility of convergence following this way. > > Here is my ultimate atempt: > > OpenSCAD CheatSheet/ <http://www.openscad.org/cheatsheet/> > > OpenScad Manual <http://en.wikibooks.org/wiki/OpenSCAD_User_Manual> > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://forum.openscad.org/Export-Stl-File-module-tp19829p19900.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-tp19829p19937.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MP
Marijan Pollak
Fri, Jan 6, 2017 6:15 PM

Dear colegua, if there are no Variables what is "i" in FOR loop? Likewise
one cannot store result of calculations as constant, specially when value
of operands change or one variable that is changeable like degrees in
circle change its Sinus or Cosinus of that Angle...........

On Mon, Jan 2, 2017 at 9:38 PM, nophead [via OpenSCAD] <
ml-node+s1091067n19853h49@n5.nabble.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 <[hidden email]
http:///user/SendEmail.jtp?type=node&node=19853&i=0> 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

--
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

--
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
[hidden email] http:///user/SendEmail.jtp?type=node&node=19853&i=1
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19853&i=2
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-tp19829p19853.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-tp19829p19938.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Dear colegua, if there are no Variables what is "i" in FOR loop? Likewise one cannot store result of calculations as constant, specially when value of operands change or one variable that is changeable like degrees in circle change its Sinus or Cosinus of that Angle........... On Mon, Jan 2, 2017 at 9:38 PM, nophead [via OpenSCAD] < ml-node+s1091067n19853h49@n5.nabble.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 <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=19853&i=0>> 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 >> [hidden email] <http:///user/SendEmail.jtp?type=node&node=19853&i=1> >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > _______________________________________________ > OpenSCAD mailing list > [hidden email] <http:///user/SendEmail.jtp?type=node&node=19853&i=2> > 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-tp19829p19853.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-tp19829p19938.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MP
Marijan Pollak
Fri, Jan 6, 2017 6:38 PM

Dear Thorsten, thank You. If someone explained me that it is how things
work in Open Scada.
perhaps I would not be so much surprised. In my country there is saying
(losely translated):
"Old habbit is like coat with sleeves tied together". And really my
Programming Habits are 45 years old.
I  was considering to write precompiler to reshufle instructions, but After
several people explained it
nicely, I can adjust for those examples I have to make. Once that form
pattern I can copy correct procedure
or make it generalized Module and put in my Scad Library. I just wish I
would not do "Salto Mortale"
each time in my head. Thank You for help!

On Mon, Jan 2, 2017 at 10:19 PM, tp3 [via OpenSCAD] <
ml-node+s1091067n19857h73@n5.nabble.com> wrote:

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.


OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=19857&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-tp19829p19857.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-tp19829p19940.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Dear Thorsten, thank You. If someone explained me that it is how things work in Open Scada. perhaps I would not be so much surprised. In my country there is saying (losely translated): "Old habbit is like coat with sleeves tied together". And really my Programming Habits are 45 years old. I was considering to write precompiler to reshufle instructions, but After several people explained it nicely, I can adjust for those examples I have to make. Once that form pattern I can copy correct procedure or make it generalized Module and put in my Scad Library. I just wish I would not do "Salto Mortale" each time in my head. Thank You for help! On Mon, Jan 2, 2017 at 10:19 PM, tp3 [via OpenSCAD] < ml-node+s1091067n19857h73@n5.nabble.com> wrote: > 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. > > _______________________________________________ > OpenSCAD mailing list > [hidden email] <http:///user/SendEmail.jtp?type=node&node=19857&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-tp19829p19857.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-tp19829p19940.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MP
Marijan Pollak
Fri, Jan 6, 2017 6:53 PM

I Copy Pasted Your Example and got nothing rendered, shuld not there be
something more?

On Tue, Jan 3, 2017 at 3:42 AM, MichaelAtOz [via OpenSCAD] <
ml-node+s1091067n19878h24@n5.nabble.com> wrote:

Marijan Pollak wrote
I just do not know how to separate cut pieces and export just one that is
ready for 3D printing.
...
However it would be usefull sometimes to be able to pick some cut pieces
and
rejoin them.

This example shows how:

// Example of how to cut parts and use the various pieces
// released to the public domain

// show original object
translate([0,300,0])
color("orange") // orange for original
%testObject();

// ---
// demonstrate how to use parts of object for export
// ---

// select which parts to use - select one part for export
part=0; // 0=all, 1=left, 2=right

// show left of object - moved to the left
if (part==0 || part==1)
translate([-200,0,0])
simpleCut(side="left", color="lime")  // lime for
left
testObject();

// show right of object - moved to the right
if (part==0 || part==2)
translate([200,0,0])
simpleCut(side="right",color="red",debug=true) //
red for right
testObject();

// ---
// show how to use two seperate pieces
// ---

// move left side to new position
translate([5,-300,0])
rotate([0,0,180])
simpleCut(side="left",color="blue")
testObject();

// move and rotate right side
translate([-5,-300,0])
rotate([0,0,180])
rotate([90,0,0])
simpleCut(side="right", color="lightblue")
testObject();

// asymetric object
module testObject() {
union() {
cube([200,50,50],center=true);
cube([50,200,75],center=true);
translate([-100,0,0])
sphere(d=90);
translate([100,0,0])
cylinder(d=90,h=90,center=true);
} // u
} // testObject

module simpleCut(side="left",color="yellow", maxSize=500,debug=false) {
// cuts the children objects in half along the y-axis
// side = "left" | "right" - side to keep
// maxSize is cube bigger than object to be cut (too big and it
doesn't display properly)
//
color(color) // color to identify parts for education
render() // render so color is not affected
intersection() {
children();
if (side=="left")
translate([-maxSize/2,0,0])
cube(maxSize,center=true);
else
translate([maxSize/2,0,0])
cube(maxSize,center=true);
} // i
// debug code to show cut cube
if (debug)
translate([(side=="left"? -1 : +1)*maxSize/2,0,0]) //
shorter method
color("snow",0.3)
%cube(maxSize,center=true);
} // simpleCut

*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-tp19829p19878.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-tp19829p19941.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I Copy Pasted Your Example and got nothing rendered, shuld not there be something more? On Tue, Jan 3, 2017 at 3:42 AM, MichaelAtOz [via OpenSCAD] < ml-node+s1091067n19878h24@n5.nabble.com> wrote: > Marijan Pollak wrote > I just do not know how to separate cut pieces and export just one that is > ready for 3D printing. > ... > However it would be usefull sometimes to be able to pick some cut pieces > and > rejoin them. > > This example shows how: > > // Example of how to cut parts and use the various pieces > // released to the public domain > > // show original object > translate([0,300,0]) > color("orange") // orange for original > %testObject(); > > // --- > // demonstrate how to use parts of object for export > // --- > > // select which parts to use - select one part for export > part=0; // 0=all, 1=left, 2=right > > // show left of object - moved to the left > if (part==0 || part==1) > translate([-200,0,0]) > simpleCut(side="left", color="lime") // lime for > left > testObject(); > > // show right of object - moved to the right > if (part==0 || part==2) > translate([200,0,0]) > simpleCut(side="right",color="red",debug=true) // > red for right > testObject(); > > // --- > // show how to use two seperate pieces > // --- > > // move left side to new position > translate([5,-300,0]) > rotate([0,0,180]) > simpleCut(side="left",color="blue") > testObject(); > > // move and rotate right side > translate([-5,-300,0]) > rotate([0,0,180]) > rotate([90,0,0]) > simpleCut(side="right", color="lightblue") > testObject(); > > // asymetric object > module testObject() { > union() { > cube([200,50,50],center=true); > cube([50,200,75],center=true); > translate([-100,0,0]) > sphere(d=90); > translate([100,0,0]) > cylinder(d=90,h=90,center=true); > } // u > } // testObject > > > module simpleCut(side="left",color="yellow", maxSize=500,debug=false) { > // cuts the children objects in half along the y-axis > // side = "left" | "right" - side to keep > // maxSize is cube bigger than object to be cut (too big and it > doesn't display properly) > // > color(color) // color to identify parts for education > render() // render so color is not affected > intersection() { > children(); > if (side=="left") > translate([-maxSize/2,0,0]) > cube(maxSize,center=true); > else > translate([maxSize/2,0,0]) > cube(maxSize,center=true); > } // i > // debug code to show cut cube > if (debug) > translate([(side=="left"? -1 : +1)*maxSize/2,0,0]) // > shorter method > color("snow",0.3) > %cube(maxSize,center=true); > } // simpleCut > > *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-tp19829p19878.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-tp19829p19941.html Sent from the OpenSCAD mailing list archive at Nabble.com.
DG
David Gustavson
Fri, Jan 6, 2017 7:55 PM

You are far from alone. Many of us have been very confused by OpenSCAD's
strangeness when we come from a usual programming background.

But there is a logic to it, and reasons why it is this way.

Its implementation is actually extremely competently done,
dealing behind the scenes with many subtle problems that are
inherent when applying computer digital number approximations to
ideal geometric forms.

Some problems may be easier to work with by generating lists of vertices
using a conventional language. But nowadays it's usually easier to drive
a CAD system using its programmable interface, if its normal user
interface is not adequate.

For example, Autodesk Fusion is free for amateur use, and has a powerful
Python interface. Or look at FreeCAD, or Blender. I've tried quite a
few, but now do everything using Fusion. I mainly do 3D printing, but
sometimes milling, and often use it for modeling design ideas that never
get built at all!

David Gustavson

dbg@SCIzzL.com

On Fri, Jan 6, 2017, at 10:38 AM, Marijan Pollak wrote:

Dear Thorsten, thank You. If someone explained me that it is how
things work in Open Scada.

You are far from alone. Many of us have been very confused by OpenSCAD's strangeness when we come from a usual programming background. But there is a logic to it, and reasons why it is this way. Its implementation is actually extremely competently done, dealing behind the scenes with many subtle problems that are inherent when applying computer digital number approximations to ideal geometric forms. Some problems may be easier to work with by generating lists of vertices using a conventional language. But nowadays it's usually easier to drive a CAD system using its programmable interface, if its normal user interface is not adequate. For example, Autodesk Fusion is free for amateur use, and has a powerful Python interface. Or look at FreeCAD, or Blender. I've tried quite a few, but now do everything using Fusion. I mainly do 3D printing, but sometimes milling, and often use it for modeling design ideas that never get built at all! -- David Gustavson dbg@SCIzzL.com On Fri, Jan 6, 2017, at 10:38 AM, Marijan Pollak wrote: > Dear Thorsten, thank You. If someone explained me that it is how > things work in Open Scada.
A
adrian
Sat, Jan 7, 2017 12:26 AM

Not to be mean or anything, but perhaps the problem is that you are assuming
something that is inherently incorrect. This language is a functional
language,  not an imperative one. I would suggest that you look up what that
means.

When you understand that, how to use this program would get clearer.
Functional programming is very different from imperative programming, even
if they look similar.

--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19944.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Not to be mean or anything, but perhaps the problem is that you are assuming something that is inherently incorrect. This language is a functional language, not an imperative one. I would suggest that you look up what that means. When you understand that, how to use this program would get clearer. Functional programming is very different from imperative programming, even if they look similar. -- View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19944.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MM
Michael Marx
Sat, Jan 7, 2017 5:24 AM

You will need to zoom out, sorry about that.

Click this button:


From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Marijan Pollak
Sent: Saturday, 7 January 2017 5:54 AM
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Export Stl. File module

I Copy Pasted Your Example and got nothing rendered, shuld not there be something more?

On Tue, Jan 3, 2017 at 3:42 AM, MichaelAtOz [via OpenSCAD] <[hidden email]> wrote:

Marijan Pollak wrote

I just do not know how to separate cut pieces and export just one that is
ready for 3D printing.
...
However it would be usefull sometimes to be able to pick some cut pieces and
rejoin them.

This example shows how:

// Example of how to cut parts and use the various pieces
// released to the public domain

// show original object
translate([0,300,0])
color("orange") // orange for original
%testObject();

// ---
// demonstrate how to use parts of object for export
// ---

// select which parts to use - select one part for export
part=0; // 0=all, 1=left, 2=right

// show left of object - moved to the left
if (part==0 || part==1)
translate([-200,0,0])
simpleCut(side="left", color="lime")  // lime for left
testObject();

// show right of object - moved to the right
if (part==0 || part==2)
translate([200,0,0])
simpleCut(side="right",color="red",debug=true) // red for right
testObject();

// ---
// show how to use two seperate pieces
// ---

// move left side to new position
translate([5,-300,0])
rotate([0,0,180])
simpleCut(side="left",color="blue")
testObject();

// move and rotate right side
translate([-5,-300,0])
rotate([0,0,180])
rotate([90,0,0])
simpleCut(side="right", color="lightblue")
testObject();

// asymetric object
module testObject() {
union() {
cube([200,50,50],center=true);
cube([50,200,75],center=true);
translate([-100,0,0])
sphere(d=90);
translate([100,0,0])
cylinder(d=90,h=90,center=true);
} // u
} // testObject

module simpleCut(side="left",color="yellow", maxSize=500,debug=false) {
// cuts the children objects in half along the y-axis
// side = "left" | "right" - side to keep
// maxSize is cube bigger than object to be cut (too big and it doesn't display properly)
//
color(color) // color to identify parts for education
render() // render so color is not affected
intersection() {
children();
if (side=="left")
translate([-maxSize/2,0,0])
cube(maxSize,center=true);
else
translate([maxSize/2,0,0])
cube(maxSize,center=true);
} // i
// debug code to show cut cube
if (debug)
translate([(side=="left"? -1 : +1)*maxSize/2,0,0]) // shorter method
color("snow",0.3)
%cube(maxSize,center=true);
} // simpleCut

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/ http://forum.openscad.org/Export-Stl-File-module-tp19829p19878.html
Export-Stl-File-module-tp19829p19878.html

To unsubscribe from Export Stl. File module, click here.

<http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Ae
mail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabbl
e.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emai
ls%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> 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:
http://forum.openscad.org/Export-Stl-File-module-tp19829p19941.html  Export Stl. File module
Sent from the OpenSCAD mailing list http://forum.openscad.org/  archive at Nabble.com.


No virus found in this message.
Checked by AVG - www.avg.com http://www.avg.com/email-signature
Version: 2016.0.7996 / Virus Database: 4749/13713 - Release Date: 01/05/17


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7996 / Virus Database: 4749/13719 - Release Date: 01/06/17

You will need to zoom out, sorry about that. Click this button: _____ From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of Marijan Pollak Sent: Saturday, 7 January 2017 5:54 AM To: discuss@lists.openscad.org Subject: Re: [OpenSCAD] Export Stl. File module I Copy Pasted Your Example and got nothing rendered, shuld not there be something more? On Tue, Jan 3, 2017 at 3:42 AM, MichaelAtOz [via OpenSCAD] <[hidden email]> wrote: Marijan Pollak wrote I just do not know how to separate cut pieces and export just one that is ready for 3D printing. ... However it would be usefull sometimes to be able to pick some cut pieces and rejoin them. This example shows how: // Example of how to cut parts and use the various pieces // released to the public domain // show original object translate([0,300,0]) color("orange") // orange for original %testObject(); // --- // demonstrate how to use parts of object for export // --- // select which parts to use - select one part for export part=0; // 0=all, 1=left, 2=right // show left of object - moved to the left if (part==0 || part==1) translate([-200,0,0]) simpleCut(side="left", color="lime") // lime for left testObject(); // show right of object - moved to the right if (part==0 || part==2) translate([200,0,0]) simpleCut(side="right",color="red",debug=true) // red for right testObject(); // --- // show how to use two seperate pieces // --- // move left side to new position translate([5,-300,0]) rotate([0,0,180]) simpleCut(side="left",color="blue") testObject(); // move and rotate right side translate([-5,-300,0]) rotate([0,0,180]) rotate([90,0,0]) simpleCut(side="right", color="lightblue") testObject(); // asymetric object module testObject() { union() { cube([200,50,50],center=true); cube([50,200,75],center=true); translate([-100,0,0]) sphere(d=90); translate([100,0,0]) cylinder(d=90,h=90,center=true); } // u } // testObject module simpleCut(side="left",color="yellow", maxSize=500,debug=false) { // cuts the children objects in half along the y-axis // side = "left" | "right" - side to keep // maxSize is cube bigger than object to be cut (too big and it doesn't display properly) // color(color) // color to identify parts for education render() // render so color is not affected intersection() { children(); if (side=="left") translate([-maxSize/2,0,0]) cube(maxSize,center=true); else translate([maxSize/2,0,0]) cube(maxSize,center=true); } // i // debug code to show cut cube if (debug) translate([(side=="left"? -1 : +1)*maxSize/2,0,0]) // shorter method color("snow",0.3) %cube(maxSize,center=true); } // simpleCut 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/ <http://forum.openscad.org/Export-Stl-File-module-tp19829p19878.html> Export-Stl-File-module-tp19829p19878.html To unsubscribe from Export Stl. File module, click here. <http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Ae mail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabbl e.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emai ls%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> 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: <http://forum.openscad.org/Export-Stl-File-module-tp19829p19941.html> Export Stl. File module Sent from the OpenSCAD mailing list <http://forum.openscad.org/> archive at Nabble.com. _____ No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com/email-signature> Version: 2016.0.7996 / Virus Database: 4749/13713 - Release Date: 01/05/17 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2016.0.7996 / Virus Database: 4749/13719 - Release Date: 01/06/17
R
Ronaldo
Sat, Jan 7, 2017 4:04 PM

Pollak,

It will save you time and eyes to accept OpenSCAD as it is. If you don't
like it move on but do not try to change it or criticize it before fully
understand it. To understand it you should try it and read the manual. I am
sure you would have saved a lot of time if you had read selected parts of
the OpenSCAD manual  instead of writing and reading a lot of messages.

There is no join() or subtract() in OpenSCAD. The boolean operators are
union(), difference() and intersection() which are pretty standard names in
the  CSG modelling
https://en.wikipedia.org/wiki/Constructive_solid_geometry  since its
introduction decades ago. These operators are implemented in OpenSCAD as
modules
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Modules
and modules operates on the following objects not the previous ones!
They are  prefix operators
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling  like
functions
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Functions
and  logical NOT
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Mathematical_Operators#Logical_Operators
(!). Nobody would complain that the function name (an operator anyway) comes
before its operands. Modules are the same. In english, you would say "union
this cube to that cylinder", not the other way.

Your messages express a lot of misunderstanding. I suggest you to write
shorter messages with one (at most two) questions avoiding to digress on how
things should be. You will receive objective answers to objective questions
and it will save everybody time.

One important point: OpenSCAD is a  declarative language not an imperative
one https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms
like most programming languages. It is similar to functional languages. It
means there is no variables in OpenSCAD. As nophead said before,  OpenSCAD
variables
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Variables  (a
misleading name, we all agree) are in fact named constants. Variables are
used to give a name to an expression and not to store a value. The  scope of
variables
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Scope_of_variables
should be very well understood.

Finally, I don't believe you had approached the 36 programming languages you
said you have used before the way you are doing with OpenSCAD. Use your long
experience and learning ability to study it instead of struggle with it.

Marijan Pollak wrote

Ronaldo, I HAVE written that example  and other people answered me, saying
basically same thing as You.
I am sorry if I did not answer You directly, I did not expect that dozen
peoples would start abswiring, and that
resulted in hundreds of emails in few days.
I am nearly blind so I must rest my eyes. What I was saying was that I am
used that computer execute code exactly as I have writen it.
Someone wrote that statements are "Evaluated" from last backward something
alike formula operands, but it is not same as in formula
there is different priority of evaluations for different operations, i.e.
multiplication is executed before additions, if I remember that corectly.
I an reading cheat sheet, but someone wrote that thee is different order
of
X,Y,Z in different instructions, while Cheat sheet say it is  same.
I think I noticed that in rotate () as I was unable to get 120 degrees
turn
with cut on Y line. Last of all, I decided to construct knife with many
edges joined together and then subtract() it once from original object.
Problem is here how to extract part by part if it is still treated as one
object. Someone say that I do not need to think about regenerating
original
object while cutting it as it is preserved and reused.
For me is not way computers are working. If I create plate and make
yMaleCut() then male side of cut remains and other side is removed.
then according to examples, I had to draw same object at same place and do
yFemaleCut() when male side of that clone of plate is removed.
If I do not regenerate plate, I find myself with male side missing.
As much I was able to see (which is not much, sorry) it is not possible to
assign Object to name. Maybe someone was answering but I was not able  to
read till now. I am also getting duplicates of answers some time, once
from
You for instance and other from Forum, so it also steal
my time. I was just looking for such duplicates to send to :

oz.at.michael@

when I opened this email. As You can see it has
[via Open SCAD] after Your name so I tought it was one of duplicates.
If You read all my answers, You will find that example, however since You
are used that Open SCAD works this way maybe You cannot
notice what I wrote about
I tought Open SCAD is live and growing Language, where Community can make
it better.
However opinions are like noses, each is different and each person has at
least one.
My opinion is that programs should work in order of instruction written
and
be as clear and understandable as possible.
I see that some instruction like join() assume two operands, and that are
two objects created before, or rather after it.
Those Objects are after Join() in sense that programmer write it first,
and
then firstObject, then secondObject.
To me it would be more natural to write
firstObject, then
secondObject THEN
join()...
Actually in join()  operands place are irelevant, not so in subtract(),
where I suppose secondObject is subtracted from firstObject,
or is it opposite order?
Now, look fella, I am old and have not much time to finish my work, so I
cannot afford to read everything about everything, I must
limit my self on things I need to do what needs to be done, Ok? I do not
intend to try to do same thing several ways to see which is better.
I need only One way to do things, and that I can be reasonably sure
computer would do what I ask it to do. I started with Puzzlecut
as at moment I need to cut existing Objects three way or 12 way. However
some parameters are not explained even in its Library, so I sometimes get
results and cannot find why, and when i try to repeat same operation I get
mess. I am not used to this, so I started to clear out confusion.
You can help, or not, that is Your choice, just do not get mad at me. I
allways tell how I perceive things  not what someone like to hear.
I am from time when computer programmer can make bad program only once
and
never again. Fortunately some people have noticed same things as me, like
Export() function that should be there but it is not. If we are community
then we should agree to change what is wrong and
add missing or usefull things, no? If it is possible, of course. If not, I
would find workaround, but I would like that all others using SCAD
benefit.
I am adaptable, when I have no other choice, But dear coleague, TIME is
most valuable resource, priceless, when You do not have enough.
Sincerely, Marijan Pollak

--
View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19947.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Pollak, It will save you time and eyes to accept OpenSCAD as it is. If you don't like it move on but do not try to change it or criticize it before fully understand it. To understand it you should try it and read the manual. I am sure you would have saved a lot of time if you had read selected parts of the OpenSCAD manual instead of writing and reading a lot of messages. There is no join() or subtract() in OpenSCAD. The boolean operators are union(), difference() and intersection() which are pretty standard names in the CSG modelling <https://en.wikipedia.org/wiki/Constructive_solid_geometry> since its introduction decades ago. These operators are implemented in OpenSCAD as modules <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Modules> and modules operates on the **following** objects not the previous ones! They are prefix operators <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling> like functions <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Functions> and logical NOT <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Mathematical_Operators#Logical_Operators> (!). Nobody would complain that the function name (an operator anyway) comes before its operands. Modules are the same. In english, you would say "union this cube to that cylinder", not the other way. Your messages express a lot of misunderstanding. I suggest you to write shorter messages with one (at most two) questions avoiding to digress on how things should be. You will receive objective answers to objective questions and it will save everybody time. One important point: OpenSCAD is a declarative language not an imperative one <https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms> like most programming languages. It is similar to functional languages. It means there is no variables in OpenSCAD. As nophead said before, OpenSCAD variables <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Variables> (a misleading name, we all agree) are in fact named constants. Variables are used to give a name to an expression and not to store a value. The scope of variables <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Scope_of_variables> should be very well understood. Finally, I don't believe you had approached the 36 programming languages you said you have used before the way you are doing with OpenSCAD. Use your long experience and learning ability to study it instead of struggle with it. Marijan Pollak wrote > Ronaldo, I HAVE written that example and other people answered me, saying > basically same thing as You. > I am sorry if I did not answer You directly, I did not expect that dozen > peoples would start abswiring, and that > resulted in hundreds of emails in few days. > I am nearly blind so I must rest my eyes. What I was saying was that I am > used that computer execute code exactly as I have writen it. > Someone wrote that statements are "Evaluated" from last backward something > alike formula operands, but it is not same as in formula > there is different priority of evaluations for different operations, i.e. > multiplication is executed before additions, if I remember that corectly. > I an reading cheat sheet, but someone wrote that thee is different order > of > X,Y,Z in different instructions, while Cheat sheet say it is same. > I think I noticed that in rotate () as I was unable to get 120 degrees > turn > with cut on Y line. Last of all, I decided to construct knife with many > edges joined together and then subtract() it once from original object. > Problem is here how to extract part by part if it is still treated as one > object. Someone say that I do not need to think about regenerating > original > object while cutting it as it is preserved and reused. > For me is not way computers are working. If I create plate and make > yMaleCut() then male side of cut remains and other side is removed. > then according to examples, I had to draw same object at same place and do > yFemaleCut() when male side of that clone of plate is removed. > If I do not regenerate plate, I find myself with male side missing. > As much I was able to see (which is not much, sorry) it is not possible to > assign Object to name. Maybe someone was answering but I was not able to > read till now. I am also getting duplicates of answers some time, once > from > You for instance and other from Forum, so it also steal > my time. I was just looking for such duplicates to send to : > oz.at.michael@ > when I opened this email. As You can see it has > [via Open SCAD] after Your name so I tought it was one of duplicates. > If You read all my answers, You will find that example, however since You > are used that Open SCAD works this way maybe You cannot > notice what I wrote about > I tought Open SCAD is live and growing Language, where Community can make > it better. > However opinions are like noses, each is different and each person has at > least one. > My opinion is that programs should work in order of instruction written > and > be as clear and understandable as possible. > I see that some instruction like join() assume two operands, and that are > two objects created before, or rather after it. > Those Objects are after Join() in sense that programmer write it first, > and > then firstObject, then secondObject. > To me it would be more natural to write > firstObject, then > secondObject THEN > join()... > Actually in join() operands place are irelevant, not so in subtract(), > where I suppose secondObject is subtracted from firstObject, > or is it opposite order? > Now, look fella, I am old and have not much time to finish my work, so I > cannot afford to read everything about everything, I must > limit my self on things I need to do what needs to be done, Ok? I do not > intend to try to do same thing several ways to see which is better. > I need only One way to do things, and that I can be reasonably sure > computer would do what I ask it to do. I started with Puzzlecut > as at moment I need to cut existing Objects three way or 12 way. However > some parameters are not explained even in its Library, so I sometimes get > results and cannot find why, and when i try to repeat same operation I get > mess. I am not used to this, so I started to clear out confusion. > You can help, or not, that is Your choice, just do not get mad at me. I > allways tell how I perceive things not what someone like to hear. > I am from time when computer programmer can make bad program only once > and > never again. Fortunately some people have noticed same things as me, like > Export() function that should be there but it is not. If we are community > then we should agree to change what is wrong and > add missing or usefull things, no? If it is possible, of course. If not, I > would find workaround, but I would like that all others using SCAD > benefit. > I am adaptable, when I have no other choice, But dear coleague, TIME is > most valuable resource, priceless, when You do not have enough. > Sincerely, Marijan Pollak -- View this message in context: http://forum.openscad.org/Export-Stl-File-module-tp19829p19947.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Sat, Jan 7, 2017 4:33 PM

As much I was able to see (which is not much, sorry) it is not possible to

assign Object to name.

That is what a module does. You can write a module that creates geometry
and then use it by name as many times as you want, and in other modules.
E.g.

module nut(across_flats, hole_d, thickness)
difference() {
cylinder(d = across_flats / cos(30), h = thickness, $fn = 6);
cylinder(d = hole_d, h = 2 * thickness + 1, center = true, $fn =
32);
}

module M3_nut() nut(5.5, 3, 2.5);

// a row of four M3_nuts
for(i = [0 : 3])
translate([i * 10, 0, 0])
M3_nut();

On 7 January 2017 at 16:04, Ronaldo rcmpersiano@gmail.com wrote:

Pollak,

It will save you time and eyes to accept OpenSCAD as it is. If you don't
like it move on but do not try to change it or criticize it before fully
understand it. To understand it you should try it and read the manual. I am
sure you would have saved a lot of time if you had read selected parts of
the OpenSCAD manual  instead of writing and reading a lot of messages.

There is no join() or subtract() in OpenSCAD. The boolean operators are
union(), difference() and intersection() which are pretty standard names in
the  CSG modelling
https://en.wikipedia.org/wiki/Constructive_solid_geometry  since its
introduction decades ago. These operators are implemented in OpenSCAD as
modules
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/
User-Defined_Functions_and_Modules#Modules>
and modules operates on the following objects not the previous ones!
They are  prefix operators
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling  like
functions
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/
User-Defined_Functions_and_Modules#Functions>
and  logical NOT
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/
Mathematical_Operators#Logical_Operators>
(!). Nobody would complain that the function name (an operator anyway)
comes
before its operands. Modules are the same. In english, you would say "union
this cube to that cylinder", not the other way.

Your messages express a lot of misunderstanding. I suggest you to write
shorter messages with one (at most two) questions avoiding to digress on
how
things should be. You will receive objective answers to objective questions
and it will save everybody time.

One important point: OpenSCAD is a  declarative language not an imperative
one https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms
like most programming languages. It is similar to functional languages. It
means there is no variables in OpenSCAD. As nophead said before,  OpenSCAD
variables
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Variables
(a
misleading name, we all agree) are in fact named constants. Variables are
used to give a name to an expression and not to store a value. The  scope
of
variables
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/
General#Scope_of_variables>
should be very well understood.

Finally, I don't believe you had approached the 36 programming languages
you
said you have used before the way you are doing with OpenSCAD. Use your
long
experience and learning ability to study it instead of struggle with it.

Marijan Pollak wrote

Ronaldo, I HAVE written that example  and other people answered me,

saying

basically same thing as You.
I am sorry if I did not answer You directly, I did not expect that dozen
peoples would start abswiring, and that
resulted in hundreds of emails in few days.
I am nearly blind so I must rest my eyes. What I was saying was that I am
used that computer execute code exactly as I have writen it.
Someone wrote that statements are "Evaluated" from last backward

something

alike formula operands, but it is not same as in formula
there is different priority of evaluations for different operations, i.e.
multiplication is executed before additions, if I remember that corectly.
I an reading cheat sheet, but someone wrote that thee is different order
of
X,Y,Z in different instructions, while Cheat sheet say it is  same.
I think I noticed that in rotate () as I was unable to get 120 degrees
turn
with cut on Y line. Last of all, I decided to construct knife with many
edges joined together and then subtract() it once from original object.
Problem is here how to extract part by part if it is still treated as one
object. Someone say that I do not need to think about regenerating
original
object while cutting it as it is preserved and reused.
For me is not way computers are working. If I create plate and make
yMaleCut() then male side of cut remains and other side is removed.
then according to examples, I had to draw same object at same place and

do

yFemaleCut() when male side of that clone of plate is removed.
If I do not regenerate plate, I find myself with male side missing.
As much I was able to see (which is not much, sorry) it is not possible

to

assign Object to name. Maybe someone was answering but I was not able  to
read till now. I am also getting duplicates of answers some time, once
from
You for instance and other from Forum, so it also steal
my time. I was just looking for such duplicates to send to :

oz.at.michael@

when I opened this email. As You can see it has
[via Open SCAD] after Your name so I tought it was one of duplicates.
If You read all my answers, You will find that example, however since You
are used that Open SCAD works this way maybe You cannot
notice what I wrote about
I tought Open SCAD is live and growing Language, where Community can make
it better.
However opinions are like noses, each is different and each person has at
least one.
My opinion is that programs should work in order of instruction written
and
be as clear and understandable as possible.
I see that some instruction like join() assume two operands, and that are
two objects created before, or rather after it.
Those Objects are after Join() in sense that programmer write it first,
and
then firstObject, then secondObject.
To me it would be more natural to write
firstObject, then
secondObject THEN
join()...
Actually in join()  operands place are irelevant, not so in subtract(),
where I suppose secondObject is subtracted from firstObject,
or is it opposite order?
Now, look fella, I am old and have not much time to finish my work, so I
cannot afford to read everything about everything, I must
limit my self on things I need to do what needs to be done, Ok? I do not
intend to try to do same thing several ways to see which is better.
I need only One way to do things, and that I can be reasonably sure
computer would do what I ask it to do. I started with Puzzlecut
as at moment I need to cut existing Objects three way or 12 way. However
some parameters are not explained even in its Library, so I sometimes get
results and cannot find why, and when i try to repeat same operation I

get

mess. I am not used to this, so I started to clear out confusion.
You can help, or not, that is Your choice, just do not get mad at me. I
allways tell how I perceive things  not what someone like to hear.
I am from time when computer programmer can make bad program only once
and
never again. Fortunately some people have noticed same things as me, like
Export() function that should be there but it is not. If we are community
then we should agree to change what is wrong and
add missing or usefull things, no? If it is possible, of course. If not,

I

would find workaround, but I would like that all others using SCAD
benefit.
I am adaptable, when I have no other choice, But dear coleague, TIME is
most valuable resource, priceless, when You do not have enough.
Sincerely, Marijan Pollak

--
View this message in context: http://forum.openscad.org/
Export-Stl-File-module-tp19829p19947.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

>As much I was able to see (which is not much, sorry) it is not possible to assign Object to name. That is what a module does. You can write a module that creates geometry and then use it by name as many times as you want, and in other modules. E.g. module nut(across_flats, hole_d, thickness) difference() { cylinder(d = across_flats / cos(30), h = thickness, $fn = 6); cylinder(d = hole_d, h = 2 * thickness + 1, center = true, $fn = 32); } module M3_nut() nut(5.5, 3, 2.5); // a row of four M3_nuts for(i = [0 : 3]) translate([i * 10, 0, 0]) M3_nut(); On 7 January 2017 at 16:04, Ronaldo <rcmpersiano@gmail.com> wrote: > Pollak, > > It will save you time and eyes to accept OpenSCAD as it is. If you don't > like it move on but do not try to change it or criticize it before fully > understand it. To understand it you should try it and read the manual. I am > sure you would have saved a lot of time if you had read selected parts of > the OpenSCAD manual instead of writing and reading a lot of messages. > > There is no join() or subtract() in OpenSCAD. The boolean operators are > union(), difference() and intersection() which are pretty standard names in > the CSG modelling > <https://en.wikipedia.org/wiki/Constructive_solid_geometry> since its > introduction decades ago. These operators are implemented in OpenSCAD as > modules > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/ > User-Defined_Functions_and_Modules#Modules> > and modules operates on the **following** objects not the previous ones! > They are prefix operators > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling> like > functions > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/ > User-Defined_Functions_and_Modules#Functions> > and logical NOT > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/ > Mathematical_Operators#Logical_Operators> > (!). Nobody would complain that the function name (an operator anyway) > comes > before its operands. Modules are the same. In english, you would say "union > this cube to that cylinder", not the other way. > > Your messages express a lot of misunderstanding. I suggest you to write > shorter messages with one (at most two) questions avoiding to digress on > how > things should be. You will receive objective answers to objective questions > and it will save everybody time. > > One important point: OpenSCAD is a declarative language not an imperative > one <https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms> > like most programming languages. It is similar to functional languages. It > means there is no variables in OpenSCAD. As nophead said before, OpenSCAD > variables > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Variables> > (a > misleading name, we all agree) are in fact named constants. Variables are > used to give a name to an expression and not to store a value. The scope > of > variables > <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/ > General#Scope_of_variables> > should be very well understood. > > Finally, I don't believe you had approached the 36 programming languages > you > said you have used before the way you are doing with OpenSCAD. Use your > long > experience and learning ability to study it instead of struggle with it. > > > Marijan Pollak wrote > > Ronaldo, I HAVE written that example and other people answered me, > saying > > basically same thing as You. > > I am sorry if I did not answer You directly, I did not expect that dozen > > peoples would start abswiring, and that > > resulted in hundreds of emails in few days. > > I am nearly blind so I must rest my eyes. What I was saying was that I am > > used that computer execute code exactly as I have writen it. > > Someone wrote that statements are "Evaluated" from last backward > something > > alike formula operands, but it is not same as in formula > > there is different priority of evaluations for different operations, i.e. > > multiplication is executed before additions, if I remember that corectly. > > I an reading cheat sheet, but someone wrote that thee is different order > > of > > X,Y,Z in different instructions, while Cheat sheet say it is same. > > I think I noticed that in rotate () as I was unable to get 120 degrees > > turn > > with cut on Y line. Last of all, I decided to construct knife with many > > edges joined together and then subtract() it once from original object. > > Problem is here how to extract part by part if it is still treated as one > > object. Someone say that I do not need to think about regenerating > > original > > object while cutting it as it is preserved and reused. > > For me is not way computers are working. If I create plate and make > > yMaleCut() then male side of cut remains and other side is removed. > > then according to examples, I had to draw same object at same place and > do > > yFemaleCut() when male side of that clone of plate is removed. > > If I do not regenerate plate, I find myself with male side missing. > > As much I was able to see (which is not much, sorry) it is not possible > to > > assign Object to name. Maybe someone was answering but I was not able to > > read till now. I am also getting duplicates of answers some time, once > > from > > You for instance and other from Forum, so it also steal > > my time. I was just looking for such duplicates to send to : > > > oz.at.michael@ > > > when I opened this email. As You can see it has > > [via Open SCAD] after Your name so I tought it was one of duplicates. > > If You read all my answers, You will find that example, however since You > > are used that Open SCAD works this way maybe You cannot > > notice what I wrote about > > I tought Open SCAD is live and growing Language, where Community can make > > it better. > > However opinions are like noses, each is different and each person has at > > least one. > > My opinion is that programs should work in order of instruction written > > and > > be as clear and understandable as possible. > > I see that some instruction like join() assume two operands, and that are > > two objects created before, or rather after it. > > Those Objects are after Join() in sense that programmer write it first, > > and > > then firstObject, then secondObject. > > To me it would be more natural to write > > firstObject, then > > secondObject THEN > > join()... > > Actually in join() operands place are irelevant, not so in subtract(), > > where I suppose secondObject is subtracted from firstObject, > > or is it opposite order? > > Now, look fella, I am old and have not much time to finish my work, so I > > cannot afford to read everything about everything, I must > > limit my self on things I need to do what needs to be done, Ok? I do not > > intend to try to do same thing several ways to see which is better. > > I need only One way to do things, and that I can be reasonably sure > > computer would do what I ask it to do. I started with Puzzlecut > > as at moment I need to cut existing Objects three way or 12 way. However > > some parameters are not explained even in its Library, so I sometimes get > > results and cannot find why, and when i try to repeat same operation I > get > > mess. I am not used to this, so I started to clear out confusion. > > You can help, or not, that is Your choice, just do not get mad at me. I > > allways tell how I perceive things not what someone like to hear. > > I am from time when computer programmer can make bad program only once > > and > > never again. Fortunately some people have noticed same things as me, like > > Export() function that should be there but it is not. If we are community > > then we should agree to change what is wrong and > > add missing or usefull things, no? If it is possible, of course. If not, > I > > would find workaround, but I would like that all others using SCAD > > benefit. > > I am adaptable, when I have no other choice, But dear coleague, TIME is > > most valuable resource, priceless, when You do not have enough. > > Sincerely, Marijan Pollak > > > > > > -- > View this message in context: http://forum.openscad.org/ > Export-Stl-File-module-tp19829p19947.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 >