The Issue https://github.com/jscad/OpenJSCAD.org/issues/783
Clean up usability and documentation mess calls for simplifying the access to all JSCAD related resources. Therefore i propose to move this chatroom / usergroup to github discussion to make it more accessible to interested users.
https://github.com/jscad/OpenJSCAD.org/discussions was just opened a few days ago. You are cordially invited to participate there.
Posts made by WolfgangFahl
-
Proposal to move to github discussions
-
RE: V2 Update 2021 Jan 02
I have never seen or used v2 yet. It it avaiable online somewhere? It would be great if https://www.openjscad.org/ would have a v2 link and especially a simple switch to see the same code in v1/v2.
-
RE: I made a site for sharing my Jscad designs. Please tell me how you think about it
That's great i would love if we had a common site for all jscad users where they could upload their designs to share. Especially for "components" that would be very useful. I had hoped to get this working based on a wiki but i never got i working due to the complexity of the javascript code and the v1/v2 situation that blocks proper progress. So what did you have to do to get this working?
-
RE: Displaying JScad designs in media wiki / or plain html for a start ...
@gilboonet Thank you for the hint.
There are probably certain assumptions about running this example that i don't know of. Simply opening the example file in browser gives:And no OpenJSCAD.org Logo appears as the title would make you think.
So does the example expect some environment?
It looks like it does - the url to the logo is examples/logo.jscad while examples is not a subdirectory of web but a neighbouring - directory changing the design-url to "../examples/logo.jscad" gives not different result though. So how does this example work? -
RE: Displaying JScad designs in media wiki / or plain html for a start ...
There is now a stackoverflow question about this at https://stackoverflow.com/questions/56520743/integrating-openjscad-into-mediawiki and a trial page at http://wiki.bitplan.com/index.php/ParametricLampShade
-
Displaying JScad designs in media wiki / or plain html for a start ...
The current solutions I know of for displaying JSCad Designs:
- https://www.openjscad.org/
- https://danmarshall.github.io/jscad-gallery/
- https://risacher.org/OpenJsCad
- https://johnwebbcole.gitlab.io/vesa-shelf/
- https://joostn.github.io/OpenJsCad/
all need quite some infrastructure to work.
I am looking for a (hopefully) much simpler solution that can be embedded in Mediawiki. For a start a plain html page with a bit of javascript would do for me.
Would it be possible to source the necessary javascript from some other website?
If not what would be the minimum amount of code that neeeds to reside on the server of the Mediawiki site?I'd be willing to create a MediaWiki extension for displaying JSCad files if there is a long-term (multi-year) future for such a solution. Will Version2 be compatible in this respect to Version 1.9?
-
RE: How to control the orientation ?
You might want to post your question on stackoverflow https://stackoverflow.com/questions/tagged/openjscad - the audience is bigger there.
-
Cooperation with BlocksCAD
The issue https://github.com/EinsteinsWorkshop/BlocksCAD/issues/37 is closed.
I'd love to see that parameterized OpenJSCAD designs can be used as Blocks in BlocksCAD. Would this be a different issue?It would be great if BlocksCAD would have some "import" mechanism where one simply has to specify an URL of an example e.g. for:
https://www.openjscad.org/#examples/gear.jscadthe url would be:
https://www.openjscad.org/examples/gear.jscadand since the design describes it's own parameters a corresponding BlocksCAD block would be made available for use.
I think this would be a tremendous improvement for the transition from beginner to expert. Beginners could use BlocksCAD but still get access to parameterized more complicated "parts". Intermediate users could combine there own first OpenJSCAD solutions with BlocksCAD stuff they started with. And finally if experts don't need BlocksCAD anymore they can work in OpenJSCAD all day.
What do you think?
-
RE: remote.pl for dockerized openjscad
Thank you kaosat-dev for looking into this. I added the issue:
https://github.com/jscad/OpenJSCAD.org/issues/438
to more clearly show what the problem is. Locally I can work with the drag&drop solution or with the workspace-mounting approach of the dockerized OpenJSCAD at https://github.com/BITPlan/docker-openjscad
-
RE: dockerized OpenJSCAD
There was only a very small difference ...
diff main.jscad /Users/wf/source/scad/testinclude/main.jscad 6c6 < return myLib().b(2); --- > return myLib.b(2);
I 'v fixed the dockerized github repo and will try to fix the wiki now, too.
Thanks for all the help finally I am going to work on my own designs now ... -
remote.pl for dockerized openjscad
In remote.pl I found the following comment:
2017/09/23: 0.005: fix vulnerability: disallow file://
In a local installation like with the docker image https://github.com/BITPlan/docker-openjscad this is probably not such a big issue.
Where can i find a remote.pl that is more suite to the local installation use case? -
RE: dockerized OpenJSCAD
Thanks for the swift reply. I think we are getting closer.
I gave up with the "sister-directory" approach and put the workspace below the examples directory.This way
docker run --publish=8080:8080 --name openjscad -v /Users/wf/source/docker/docker-openjscad/workspace:/openjscad/packages/web/examples/workspace bitplan/openjscad:latest
works and mounts my workspace directory to the docker container. I have added a sample workspace now to https://github.com/BITPlan/docker-openjscad/tree/master/workspace
http://localhost:8080/index.html#examples/workspace/Cube.jscad
now leads to the error:ReferenceError: Box is not defined
which is a pity since it would be exactly my expectation for an include command to really include another source as if it would be part of the source that I am editing.
For the "official" example from the wiki i have fixed the include statement (both in the wiki as well as in the dockerization github workspace).
I also tried to follow your hint of adding a myLib() call. The result is:
TypeError: myLib(...) is undefined
So I think we only need one of your working examples and we'd be all set to improve the documentation and file a few issues / change requests.
The general principle works with the docker approach and probably also if you include OpenJSCAD in a local browser installation.
-
RE: dockerized OpenJSCAD
Thanks for trying to explain this. I do not understand this.
"The include file name must be the same as the lib name"
What is a lib name and how is it specified?
"the call to b function from myLib must not contain parenthesis"
So it seems as if there are some assumptions on how includes have to behave to be "includeable" .
In this case the include would not be an "include" that includes the text of another file but some other mechanism that needs explanation.How does this mechanism work?
"a call to the library must be done at the beginning of main (I call this instanciation but it might be something else)."
Again there is some "library" assumption. A true include would include anything not just predefined libraries. So the naming "include" seems to be misleading again and needs more explanation.
What is a library that can be included?
The main issue seems to be that when the include fails no proper error message appears. If something is included that exists but the mechanism fails it would be helpful if one could see what's going on.
-
dockerized OpenJSCAD
To answer https://stackoverflow.com/q/54959351/1497139 I tried dockerizing OpenJSCAD.
The idea was to show how comparable to https://www.openjscad.org/examples/ you could setup your own "workspace" and make it available via a Docker Volume. That way the include commands should work much easier than with the drag & drop solution that mostly seems not to work with recent browser versions of Chrome & Firefox i tested.
I started https://github.com/BITPlan/docker-openjscad inspired by
https://github.com/LarsModig/openjscad-dockerI get OpenJSCAD to succesfully run locally on port 8080 on my computer this way but if I try:
http://localhost:8080/examples i get:404 not found: /examples/
http://localhost:8080/index.html#examples/globe.jscad
works.Now I am going to try to make some kind of "workspace" available. Unfortunately something like
http://localhost:8080/index.html#workspace/Box.jscaddoes for some reason not work although
http://localhost:8080/workspace/Box.jscaddoes supply the required file.
See https://stackoverflow.com/a/55198689/1497139 for the state of affairs.
What am i missing here?