Ignore, another test. Sorry

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Ignore, another test. Sorry

MichaelAtOz
Administrator
See if email changed to Cc



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

* click on my MichaelAtOz label, there is a link to email me.

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

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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

Re: Ignore, another test. Sorry

MichaelAtOz
Administrator
<http://forum.openscad.org/file/t359/Footprint_Moon_Apollo_100x100_NASA_GPN-2001-000014.jpg>



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

* click on my MichaelAtOz label, there is a link to email me.

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

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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

Re: Ignore, another test. Sorry

MichaelAtOz
Administrator
In line url link  this_is_the_anchor
<http://support.nabble.com/Inserting-images-and-links-not-inline-or-formatted-in-final-post-td7603030.html>  
see if it is inline.



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

* click on my MichaelAtOz label, there is a link to email me.

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

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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

Re: Another test. Sorry

OpenSCAD mailing list
In reply to this post by MichaelAtOz
Yes, as some have noticed, there has been a change in email behaviour.
Hopefully back to how it was now. Crosses fingers.
Testing, One, Two - Two, Two...

As Torsten noted, this was due to SFP, specifically DMARC* and me trying to
get Gnome Mailman to work nicely with Nabble, the Forum software.
* https://en.wikipedia.org/wiki/DMARC 





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

* click on my MichaelAtOz label, there is a link to email me.

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

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Ignore, another test. Sorry

Michael Marx
In reply to this post by MichaelAtOz

Hopefully back to normal...



---
This email has been checked for viruses by AVG.
https://www.avg.com


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Ignore, another test. Sorry

OpenSCAD mailing list-2
In reply to this post by MichaelAtOz

Email from Yahoo.

On Monday, 30 September 2019, 2:00:30 am AEST, <[hidden email]> wrote:


Send Discuss mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Discuss digest..."
Today's Topics:

  1. Re: Extending OpenSCAD from assembler to C or Perlish
      language and adding standard library (Torsten Paul)
  2. Re: How can I generate dependency graphs for my variables ?
      (MichaelAtOz)
  3. Re: dotSCAD 2.0 RELEASE (MichaelAtOz)
  4. Re: Extending OpenSCAD from assembler to C or Perlish
      language and adding standard library (Revar Desmera)
  5. Re: Extending OpenSCAD from assembler to C or Perlish
      language and adding standard library (Revar Desmera)
  6. Re: dotSCAD 2.0 RELEASE (caterpillar)
  7. "unable to convert parameter to a vec3 or vec2" warning
      meaning? (onion)
  8. Re: "unable to convert parameter to a vec3 or vec2" warning
      meaning? (Torsten Paul)
  9. Re: "unable to convert parameter to a vec3 or vec2" warning
      meaning? (onion)
  10. Re: "unable to convert parameter to a vec3 or vec2" warning
      meaning? (onion)
  11. Re: Extending OpenSCAD from assembler to C or Perlish
      language and adding standard library (Robin2)
  12. Re: dotSCAD 2.0 RELEASE (nop head)
  13. Re: dotSCAD 2.0 RELEASE (caterpillar)
  14. Re: dotSCAD 2.0 RELEASE (nop head)
  15. Re: dotSCAD 2.0 RELEASE (adrianv)
  16. Re: dotSCAD 2.0 RELEASE (nop head)
<div id="ymsg84808" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.1">On 26.09.19 23:42, Revar Desmera wrote:
> if I hadn’t already invested thousand of lines of OpenSCAD
> code in BOSL/BOSL2 *grumble*

So what changes in OpenSCAD would help to take away the
*grumble*?

ciao,
  Torsten.


<div id="ymsg76999" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.2">crevettedragon wrote

> Hello,
>
> I am using openscad for a small  project  and the number of variable is
> getting pretty big and my code messier. Some part of my code have "hard
> coded" variables and other parts are much more parametric -clean - ie
> depend
> on other variables.
> I wish to make the whole code clean and I thought a parser making a
> dependency graph for all the variables in my code would allow me to
> visually
> and easily track what is to be changed and remove all parameters that
> could
> be calculated instead of hard-coded.
>
> Altough I could go over each variable one by one I thought it would be
> cooler to learn how to automatically generate a graph.
>
> What are you using to achieve that ?
>
> Thank you,
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> [hidden email]

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

There is nothing built in obviously, I don't use an IDE, perhaps there is
support in some?



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

* click on my MichaelAtOz label, there is a link to email me.

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

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/


<div id="ymsg99491" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.3">caterpillar wrote
> https://github.com/JustinSDK/dotSCAD
>
> dotSCAD 2.0 is based on OpenSCAD 2019.05.
>
> -----
> http://openhome.cc
> --

Hi caterpillr,

I just read the readme, it says

> Some modules depend on other modules. For example, the polyline2d module
> depends on the line2d module, so you also have to include
> <line2d.scad>
> ; besides include
> <polyline3d.scad>
> ;.
>
> include
> <line2d.scad>
> ;
> include
> <polyline3d.scad>
> ;
>
> polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
>
> If OpenSCAD generates "WARNING: Ignoring unknown xxx function" or
> "WARNING: Ignoring unknown xxx module" when using one module of dotSCAD.
> Just try to include
> <xxx.scad>
> ; or include
> &lt;
> dir/xxx.scad
> &gt;
>  if xxx.scad exists in dir directory.
>
> Too many dependencies? Because OpenSCAD doesn't provide namespace
> management, I personally think that exposing dependencies is better than
> hiding them.

Why don't you include the dependency in the library file, e.g. 'include
<line2.scad>' in polyline3d.scad?
With the directories, I believe 'include <../line2.scad>' & 'include
<../pixel/px_something.scad> work.



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

* click on my MichaelAtOz label, there is a link to email me.

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

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/


<div id="ymsg98710" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.4">I have a long wishlist, however the things that keep biting me in the keister make for a shorter list.  Unfortunately they are also probably the hardest for you to implement, and I apologize in advance for that.

1. Mutable variables.  I know that this is nearly impossible to implement with the current design, and I understand the reasoning, even if I don't necessarily agree with the design decisions. The thing is, it becomes much, much harder to write a lot of algorithms when you have to redesign them to use recursion.  It's still doable, but it makes for an order of magnitude more frustration and effort.  This is coming from someone who has written 3D Bezier patch code and union/diff/intersect for lists of points in OpenSCAD. I used to write code in an RPN stack based language. I hated tail-recursion so much I ended up adding proper loops to that language.

2. Better data structures. Classes would be beautiful. HashTables/Dictionaries, if nothing else. While it is technically possible to make immutable element data structures with lists, it is incredibly inefficient.  I've had to abandon various algorithms for doing things like efficient splitting of self intersecting paths, simply because the data structures they build up would make them far less efficient than the naive algorithm. This *is* possible to implement immutably, but less efficiently. It would still be more efficient than using `search()` on a list.

2b.Relatedly, a data structure for polyhedron vertices-and-faces, such that you can add faces to it by lists of vertices, and it will add previously nonexistent vertex points to the vertex list, and add a face indexed into that vertex list, such that it can be eventually passed to `polyhedron()`.  I implemented this using lists in BOSL2 (calling them VNFs), but it's not fast, as it uses `search()` a lot, and yet still relies on `polyhedron()` merging duplicate vertices. It makes it far easier to create complex geometry in parts, though.  This CAN be done with immutable variables. https://github.com/revarbat/BOSL2/wiki/geometry.scad#5-creating-polyhedrons-with-vnf-structures

3. The work I've seen on passing functions as a first class object has been excellent.  Good job there!

4. The ability to rename built-in and existing modules/functions would allow for extending functionality on things like `linear_extrude()`, `polygon()`, and `polyhedron()`.

5. Access to the bounds of 2D/3D geometry, if not access to the vertex list.  Again, I know this is very difficult, and why it is difficult, but the ability to get geometry bounds would enable various functionality that I have been wanting to do, but can't.

6. Ways to call external C/C++ libraries like ClipperLib.  Pie in the sky, I know, but this is something I can do in Python, Ruby, and many other languages. It would have saved me from spending dozens of hours writing boolean path code in OpenSCAD. Even just access to calls in the already included C++ geometry libraries could be very useful.

7. Ability to read a file from disk, and better string/binary processing functions.  Wouldn't it be nice to be able to read height data from a Digital Elevation Model, instead of having to find or create some way to convert the file to a greyscale image first?  And there are file formats where the data isn't directly convertible to a height-field, yet it would be nice to read the data from them.


I also have a wishlist of easier to implement features.  In general these are already implemented in BOSL/BOSL2, but would be a lot more efficient in C++:

8. built-in `rotate(a=SPIN_ANGLE, from=VECTOR1, to=VECTOR2)` which is effectively `rotate(v=cross(VECTOR1,VECTOR2),a=angle_between(VECTOR1,VECTOR2)) rotate(SPIN_ANGLE) ...`

9. built-in functions for rotate/translate/scale/mirror that can manipulate lists of 2D/3D points.

10. built-in functions for union/difference/intersection/offset that can perform boolean geometry on lists on 2D points forming closed polygons. These are useful when you need to form a complex path to pass to a function like `sweep()` or `skin()`.  Having built-in functions for `square()` and `circle()` that return lists of 2D points helps with this.  Adrian and I implemented all these in BOSL2, but they are FAR FAR slower and less accurate than just letting ClipperLib do it in C++. https://github.com/revarbat/BOSL2/wiki/geometry.scad#4-regions-and-boolean-2d-geometry

11. Adrian created a turtle-graphics type function in BOSL2 that turns out to be ridiculously useful in making pointlist paths for irregular polygons, that can be instantiated into 2D geometry via `polygon()`, then `linear_extrude()`d or `rotate_extrude()`d. This doesn't really scream to be a built-in, but it's just so handy, it might be something to think about, especially since you can use it with the above boolean path code. https://github.com/revarbat/BOSL2/wiki/shapes2d.scad#turtle

12. A way to, given a list of vertices, and a list of faces (indexed into the vertex list), triangulate any faces that have more than 3 vertices.  Returns a new list of triangulated faces. Because CGAL just doesn't always realize non-triangle faces are planar.  Actually, this might not be a problem any longer in recent versions of OpenSCAD. Not sure.

13. Built-in functions for calculating pointlist paths from lists of arbitrary-degree bezier control points.  These can be used to built 2D paths, or, with the help of the VNF structure mentioned above, create polyhedrons from 3D bezier patches.


I'm sure I'm forgetting a lot of things, but these were what come to mind immediately as useful, but hard or inefficient to implement in libraries.

- Revar



> On Sep 28, 2019, at 11:42 AM, Torsten Paul <[hidden email]> wrote:
>
> On 26.09.19 23:42, Revar Desmera wrote:
>> if I hadn’t already invested thousand of lines of OpenSCAD
>> code in BOSL/BOSL2 *grumble*
>
> So what changes in OpenSCAD would help to take away the
> *grumble*?
>
> ciao,
>  Torsten.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



<div id="ymsg33802" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.5">Actually, thinking about it, you could implement immutable dictionaries fairly efficiently via reference counting.

- Revar



> On Sep 28, 2019, at 7:38 PM, Revar Desmera <[hidden email]> wrote:
>
> I have a long wishlist, however the things that keep biting me in the keister make for a shorter list.  Unfortunately they are also probably the hardest for you to implement, and I apologize in advance for that.
>
> 1. Mutable variables.  I know that this is nearly impossible to implement with the current design, and I understand the reasoning, even if I don't necessarily agree with the design decisions. The thing is, it becomes much, much harder to write a lot of algorithms when you have to redesign them to use recursion.  It's still doable, but it makes for an order of magnitude more frustration and effort.  This is coming from someone who has written 3D Bezier patch code and union/diff/intersect for lists of points in OpenSCAD. I used to write code in an RPN stack based language. I hated tail-recursion so much I ended up adding proper loops to that language.
>
> 2. Better data structures. Classes would be beautiful. HashTables/Dictionaries, if nothing else. While it is technically possible to make immutable element data structures with lists, it is incredibly inefficient.  I've had to abandon various algorithms for doing things like efficient splitting of self intersecting paths, simply because the data structures they build up would make them far less efficient than the naive algorithm. This *is* possible to implement immutably, but less efficiently. It would still be more efficient than using `search()` on a list.
>
> 2b.Relatedly, a data structure for polyhedron vertices-and-faces, such that you can add faces to it by lists of vertices, and it will add previously nonexistent vertex points to the vertex list, and add a face indexed into that vertex list, such that it can be eventually passed to `polyhedron()`.  I implemented this using lists in BOSL2 (calling them VNFs), but it's not fast, as it uses `search()` a lot, and yet still relies on `polyhedron()` merging duplicate vertices. It makes it far easier to create complex geometry in parts, though.  This CAN be done with immutable variables. https://github.com/revarbat/BOSL2/wiki/geometry.scad#5-creating-polyhedrons-with-vnf-structures
>
> 3. The work I've seen on passing functions as a first class object has been excellent.  Good job there!
>
> 4. The ability to rename built-in and existing modules/functions would allow for extending functionality on things like `linear_extrude()`, `polygon()`, and `polyhedron()`.
>
> 5. Access to the bounds of 2D/3D geometry, if not access to the vertex list.  Again, I know this is very difficult, and why it is difficult, but the ability to get geometry bounds would enable various functionality that I have been wanting to do, but can't.
>
> 6. Ways to call external C/C++ libraries like ClipperLib.  Pie in the sky, I know, but this is something I can do in Python, Ruby, and many other languages. It would have saved me from spending dozens of hours writing boolean path code in OpenSCAD. Even just access to calls in the already included C++ geometry libraries could be very useful.
>
> 7. Ability to read a file from disk, and better string/binary processing functions.  Wouldn't it be nice to be able to read height data from a Digital Elevation Model, instead of having to find or create some way to convert the file to a greyscale image first?  And there are file formats where the data isn't directly convertible to a height-field, yet it would be nice to read the data from them.
>
>
> I also have a wishlist of easier to implement features.  In general these are already implemented in BOSL/BOSL2, but would be a lot more efficient in C++:
>
> 8. built-in `rotate(a=SPIN_ANGLE, from=VECTOR1, to=VECTOR2)` which is effectively `rotate(v=cross(VECTOR1,VECTOR2),a=angle_between(VECTOR1,VECTOR2)) rotate(SPIN_ANGLE) ...`
>
> 9. built-in functions for rotate/translate/scale/mirror that can manipulate lists of 2D/3D points.
>
> 10. built-in functions for union/difference/intersection/offset that can perform boolean geometry on lists on 2D points forming closed polygons. These are useful when you need to form a complex path to pass to a function like `sweep()` or `skin()`.  Having built-in functions for `square()` and `circle()` that return lists of 2D points helps with this.  Adrian and I implemented all these in BOSL2, but they are FAR FAR slower and less accurate than just letting ClipperLib do it in C++. https://github.com/revarbat/BOSL2/wiki/geometry.scad#4-regions-and-boolean-2d-geometry
>
> 11. Adrian created a turtle-graphics type function in BOSL2 that turns out to be ridiculously useful in making pointlist paths for irregular polygons, that can be instantiated into 2D geometry via `polygon()`, then `linear_extrude()`d or `rotate_extrude()`d. This doesn't really scream to be a built-in, but it's just so handy, it might be something to think about, especially since you can use it with the above boolean path code. https://github.com/revarbat/BOSL2/wiki/shapes2d.scad#turtle
>
> 12. A way to, given a list of vertices, and a list of faces (indexed into the vertex list), triangulate any faces that have more than 3 vertices.  Returns a new list of triangulated faces. Because CGAL just doesn't always realize non-triangle faces are planar.  Actually, this might not be a problem any longer in recent versions of OpenSCAD. Not sure.
>
> 13. Built-in functions for calculating pointlist paths from lists of arbitrary-degree bezier control points.  These can be used to built 2D paths, or, with the help of the VNF structure mentioned above, create polyhedrons from 3D bezier patches.
>
>
> I'm sure I'm forgetting a lot of things, but these were what come to mind immediately as useful, but hard or inefficient to implement in libraries.
>
> - Revar
>
>
>
>> On Sep 28, 2019, at 11:42 AM, Torsten Paul <[hidden email]> wrote:
>>
>> On 26.09.19 23:42, Revar Desmera wrote:
>>> if I hadn’t already invested thousand of lines of OpenSCAD
>>> code in BOSL/BOSL2 *grumble*
>>
>> So what changes in OpenSCAD would help to take away the
>> *grumble*?
>>
>> ciao,
>> Torsten.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>



<div id="ymsg29247" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.6">If OpenSCAD deals with module dependency diagrams, including in the library
file will be better. But I read the document of `include`:

include <filename> acts as if the contents of the included file were
written in the including file.

And, if I include the same file twice, the code on the top-level runs twice.
I guess OpenSCAD just merges all including files recursively into one
source. I don't like the result so I decided to expose dependencies. The way
gives more flexibility to users who want to define their commonly-used
modules.

In this way, if OpenSCAD provides a better namespace mechanism in the
future, moving dependencies into the library file will be easier.








-----
https://openhome.cc
--
Sent from: http://forum.openscad.org/



<div id="ymsg86568" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.7">hey,

this is probably super basic stuff, but can anyone explain to me what the
warning "Unable to convert translate([[9.78], [0.455208], 0]) parameter to a
vec3 or vec2 of numbers, in file" means? i'm currently trying to generate
shapes at random x/y values to form a texture and i'm using the rand
function. i started with this to see if it would work, and the code threw
back the above warning:

spongeX=rands(0,10,1);
spongeY=rands(0,5,1);

translate([spongeX,spongeY,0]){
  cube([10,10,10]);
}

i figure i'm misunderstanding variable types somehow, but i can't find a
more detailed how-to on using rands. i searched around but all i can find is
that error popping up when it shouldn't, not an explanation of what it
means. any advice is super appreciated and sorry if this question has been
answered elsewhere



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



<div id="ymsg72223" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.8">On 29.09.19 05:55, onion wrote:
> Unable to convert translate([[9.78], [0.455208], 0])

The extra [ ] are the hint. The rands() function always returns
a vector, even if it's just a single value.

To get just the actual number, you could do something like:

spongeX = rands(0,10,1)[0];

ciao,
  Torsten.



<div id="ymsg39211" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.9">ah, i just solved my own problem. i was omitting this part at the end:
(example code from openscad manual)
// get a single number
single_rand = rands(0,10,1)*[0];*
echo(single_rand);

second probably dumb question, what purpose does the "[0]" serve?



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



<div id="ymsg78247" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.10">thanks!



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



<div id="ymsg62030" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.11">RevarBat wrote
> I have a long wishlist,
>
> [......]
>
> 6. Ways to call external C/C++ libraries like ClipperLib.  Pie in the sky,
> I know, but this is something I can do in Python, Ruby, and many other
> languages.

I have read through this Post and as newish user of Openscad I must say I
understand very little of it. If these points are mainly about adding extra
functionality to Openscad then it would be very useful if someone could
explain what sort of practical things the extra capabilities might be useful
for.

On the specific point of linking with other languages it seems to me it
would make sense to turn that on its head and use another language (such as
Python) to generate Openscad code as it could then draw on all the
wide-ranging capabilities available to Python (or whatever language you
prefer) without needing to make any changes to Openscad.

...R



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



<div id="ymsg18785" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.12">
If you use files instead of including them then they get cached and only one copy is in memory regardless of how many times it is used. As you say include just inserts the text so if it is included twice it gets parsed twice.

In my library I have two files for each library module. The first is included and has all the constants and then it uses the second file which has all the functions and modules. If those function and modules depend on another library file then it is used or included in the library,

The end result is there is only one copy of any function or module and mostly only one copy of each constant.

On Sun, 29 Sep 2019 at 04:02, caterpillar <[hidden email]> wrote:
If OpenSCAD deals with module dependency diagrams, including in the library
file will be better. But I read the document of `include`:

 include <filename> acts as if the contents of the included file were
written in the including file.

And, if I include the same file twice, the code on the top-level runs twice.
I guess OpenSCAD just merges all including files recursively into one
source. I don't like the result so I decided to expose dependencies. The way
gives more flexibility to users who want to define their commonly-used
modules.

 In this way, if OpenSCAD provides a better namespace mechanism in the
future, moving dependencies into the library file will be easier.








-----
https://openhome.cc
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
<div id="ymsg05272" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.13">If modules/functions get cached and only one copy is in memory, I have a
question.

Is it encouraged or not to include the same module/function more than one
time from the perspective of OpenSCAD?



-----
https://openhome.cc
--
Sent from: http://forum.openscad.org/



<div id="ymsg17800" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.14">
If you include them then you get multiple copies so I don't think that is a good idea. If you use them there is very little overhead using them multiple times. The file name is looked up in a cache and when it hits the parsed AST of the file is reused. So it takes virtually no time and doesn't use any more memory.

On Sun, 29 Sep 2019 at 13:02, caterpillar <[hidden email]> wrote:
If modules/functions get cached and only one copy is in memory, I have a
question.

Is it encouraged or not to include the same module/function more than one
time from the perspective of OpenSCAD?



-----
https://openhome.cc
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
<div id="ymsg48649" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.15">Really?  If you include multiple copies the code doesn't just replace the
previous version?  If I define a module and then define it again, do both
definitions stay in memory? 

Regarding "use", it has some performance problems.  You should make sure
that no file that gets "used" has any commands in it except function and
module definitions, because any assignments will be run in their entirety
any time any function or module in the file is executed.  (This can slow
performance if you have slow assignments and call a module or function in a
loop.) 

It also appeared in my tests that calling functions from a "used" module is
just slower in general.  So this means that utility functions that get
called a lot should probably be "included" but higher level modules that do
more complex things are probably fine to "use". 


nophead wrote
> If you include them then you get multiple copies so I don't think that is
> a
> good idea. If you use them there is very little overhead using them
> multiple times. The file name is looked up in a cache and when it hits the
> parsed AST of the file is reused. So it takes virtually no time and
> doesn't
> use any more memory.





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



<div id="ymsg77871" class="ymsg0420585815" src="mid://AMAsRIlUF3lZXZDVHg5raADO5y8/3.16">
My understanding is that if you include something twice it certainly gets parsed twice. I am not sure if it replaces a previous definition in memory or not. Certainly if you include a file into other files that are themselves used then you will have multiple copies because used modules have their own namespace. 

Yes constant expressions in a used file get evaluated each time any function or module in the same file is called. I wasted a lot time trying to optimise the spring module in my library so that I can store the polyhedron of the spring an reuse it. I did that because in my battery module each battery is shown with battery clips that include a spring. I found it is impossible to make one copy of that spiral spring in my library and reuse it because assigning the mesh to a variable keeps re-evaluating it over and over again making it slower instead of quicker.

On Sun, 29 Sep 2019 at 13:59, adrianv <[hidden email]> wrote:
Really?  If you include multiple copies the code doesn't just replace the
previous version?   If I define a module and then define it again, do both
definitions stay in memory? 

Regarding "use", it has some performance problems.  You should make sure
that no file that gets "used" has any commands in it except function and
module definitions, because any assignments will be run in their entirety
any time any function or module in the file is executed.  (This can slow
performance if you have slow assignments and call a module or function in a
loop.) 

It also appeared in my tests that calling functions from a "used" module is
just slower in general.  So this means that utility functions that get
called a lot should probably be "included" but higher level modules that do
more complex things are probably fine to "use". 


nophead wrote
> If you include them then you get multiple copies so I don't think that is
> a
> good idea. If you use them there is very little overhead using them
> multiple times. The file name is looked up in a cache and when it hits the
> parsed AST of the file is reused. So it takes virtually no time and
> doesn't
> use any more memory.





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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
Discuss mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Ignore, another test. Sorry

OpenSCAD mailing list-2
Another Yahoo




On Wednesday, 23 October 2019, 2:49:29 pm AEDT, Michael M via Discuss <[hidden email]> wrote:



Email from Yahoo.

On Monday, 30 September 2019, 2:00:30 am AEST, <[hidden email]> wrote:

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org