einsteinsworkshop / blockscad Goto Github PK
View Code? Open in Web Editor NEWEasy, Open-Source Solid CAD for Everyone! Check it out at https://blockscad.einsteinsworkshop.com .
License: GNU General Public License v3.0
Easy, Open-Source Solid CAD for Everyone! Check it out at https://blockscad.einsteinsworkshop.com .
License: GNU General Public License v3.0
"Error: Failed to Load Font:" when using TEXT on Ubuntu Studio localhost.
next issue is error
blocscad.js needs to be set offline true as revealed by phone call to developer
Blockscad.offline = true; // true unless using a cloud service backend for file management
I am trying to increment a variable based on a loop counter and hitting a rendering failure. This might be the same as issue #3, but I can't be certain. If that is the case, how should I perform this sort of variable modification for a loop? I was trying to create a stack of increasingly larger spheres on the y-axis.
OpenSCAD code view:
//!OpenSCAD
offset = 0;
for (radius = [1 : abs(2) : 10]) {
offset = offset + radius;
translate([0, radius, 0]){
sphere(r=radius);
}
}
XML:
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="variables_set" id="688" x="28" y="7"><field name="VAR">offset</field><value name="VALUE"><block type="math_number" id="705"><field name="NUM">0</field></block></value><next><block type="controls_for" id="784"><field name="VAR">radius</field><value name="FROM"><block type="math_number" id="785"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="786"><field name="NUM">10</field></block></value><value name="BY"><block type="math_number" id="787"><field name="NUM">2</field></block></value><statement name="DO"><block type="variables_set" id="710"><field name="VAR">offset</field><value name="VALUE"><block type="math_arithmetic" id="727"><field name="OP">ADD</field><value name="A"><block type="variables_get" id="732"><field name="VAR">offset</field></block></value><value name="B"><block type="variables_get" id="794"><field name="VAR">radius</field></block></value></block></value><next><block type="translate" id="755"><value name="XVAL"><block type="math_number" id="756"><field name="NUM">0</field></block></value><value name="YVAL"><block type="variables_get" id="763"><field name="VAR">radius</field></block></value><value name="ZVAL"><block type="math_number" id="758"><field name="NUM">0</field></block></value><statement name="A"><block type="sphere" id="774"><value name="RAD"><block type="variables_get" id="801"><field name="VAR">radius</field></block></value></block></statement></block></next></block></statement></block></next></block></xml>
The simplest union of objects creates STL which RepetierHost judges to be non manifold. Generally slic3r can handle these but not always, and cleanup via say netfabb would be tedious. The equivalent code in OpenSCAD has no such problem eg.
cube(10);
translate([10,5,0]) cube(10);
nicescad (demo at http://nicescad.bitplan.com/) tries to integrate different Open solid 3D CAD solutions e.g.
e.g. there is docker support to run convertes and frontends in parallel. See:
https://github.com/WolfgangFahl/nicescad/tree/main/docker
To make the different platforms cooperate we'd e.g. need a RESTFul way to "POST" designs into the blockscad editor and e.g. get back the openscad version of things as a response.
Is this project still alive enough to have any chance to get this done?
At least one recent version of Safari works fine until attempting to generate STL or any other format. Clicking the button results in no action, and nothing in the browser console.
It seams that this project is making some changes to common libraries which both BlocksCAD and OpenJSCAD.org are using. How about some collaboration on these libraries, which can benefit both projects.
Great to see I can set a variable inside a module - now need to be able to set a variable inside a loop
creates this openSCAD
module makeText(label) {
linear_extrude( height=10, twist=0, center=false){
text("label", font = "Liberation Serif", size = 10);
}
}
makeText(hello);
but it should be
module makeText(label) {
linear_extrude( height=10, twist=0, center=false){
text(label, font = "Liberation Serif", size = 10);
}
}
makeText("hello");
declaring a variable and then using that variable in the sides block produces illegal code like:
item = 10;
assign($fn=NaN){
}
I want to compute local variables based on parameter values but attempts to add set variable blocks to a module are rejected although the obvious OpenSCAD code (with or without assign() ) is fine.
This is rather important when developing good programming practice. Without it you end up with lots of meaningless duplicated numbers and expressions.
Yes, one can export a DXF, but I don't see how one can make something worth exporting with only 4 objects and text --- if I'm missing something, please let me know.
Hi,
First, thanks for your work an your sharing.
I'm a teacher and I've downloaded the BlocksCAD here for an offline use (no Internet connection in the school room) in order to print parts with Cura and Octoprint on a Raspberry Pi 4 (project here in french : https://lofurol.fr/joomla/impression-3d/142-imprimante-3d-anet-a8-pilotee-sous-primtux6).
It seems that this is an older version in the git repository (1.7.3) than here https://www.blockscad3d.com/editor/?lang=fr# (Version 1.13.0, 2021/03/31). So is it possible to download a newer version and where ?
Thanks for your help, regards,
Thierry Munoz
Rotation works fine but I can't see how to zoom or translate
It would be really nice to have an orthogonal view mode.
In OpenSCAD, with the Customizer interface it's possible to instantiate drop-down menus using comments for the customizer:
//Part
PARTNO = "0"; // [0:All, 1:Top, 2:Bottom]
Add that as an option for variable assignment?
Unfortunately, adding comments to a variable doesn't quite have the same effect for use in OpenSCAD:
// [0:ball, 1:square, 2:dovetail]
endmillshape = "ball";
This is fantastic, the power of OpenSCAD with the ease of Scratch!
I would love to teach 3D modelling to kids with BlocksCAD. Is it translatable already? If not, how could we get it there?
When I take a Rotation block, it has an Angle sub-block. If then then want to multiply that angle by a certain factor, I take a multiply block, insert it into the Rotation block, instead of the Angle block, and then take the Angle block that fell out into the Multiply block. Then I add a number block as the factor, or some variable block as the second multiplier. But this does not work, a multiplication only wants to operate on numbers, not on angles. 5*10°=50° does not seem to work. The workaround I have found so far is to use a number block instead of the Angle block, and write the degrees as a number in there. Then the multiplication works. The disadvantage is that I cannot graphically select the angle anymore.
Generate Button and the view frame are not showing up in Chrome Version 51.0.2704.106 (64-bit) running ubuntu 14.04
After checking out 58a2fdb the dropdown menu for blocks only contains 'disable all blocks' and 'enable all blocks' and no longer shows the option to disable individual blocks nor delete them.
We really ought to have support for arrays. It probably makes the most sense to base it on Blockly's List blocks.
Blocks should have icons to serve as visual hints. SVG appears to be Blockly's preferred format.
Hi,
I want to point a bug I found using a model I created today : https://www.blockscad3d.com/community/projects/43698
When I tried to export this model in STL format to my 3D printer I got the message : "Model is not on a closed surface"
And when I try to print this model it fails. I also have trouble when i try to import this STL model in tinkercad,etc it bugs.
Perhaps the problem is in STL générator ?
Indedd, I take the code of this model and I copy/paste it in opensCAD software and when I export the model in STL it works fine on my printer.
Best regards
Christophe
recursive call in a module generates a syntax error even though the resultant OpenSCAD code executes correctly.
using blockscad code in openscad reveals that the assign function is being deprecated (due to their new variable handling). We use that for our sides block and need a move forward plan.
There's a number of features that we're missing, and if we want to be fully OpenSCAD-compatible, we need to add them.
Working from the OpenSCAD cheatsheet, just looking at shape generation:
I can use "js_to_json.py“to generate zh.json, and then modify it. At last, use "create_massges.py" to generate zh.js.
But, after that, there is no changes on the webside.
please tell me the right processes to generate language files.
Samsung Note 10.1 2014
Chrome Browser
Was able to log into my account. Created an object. When I tried to input a project name the keyboard got stuck in the text window. Refreshed the page which worked: kept the blocks, kept the name, got rid of the keyboard. But I could not save my project nor interact with any of the top bar menus.
Installed nodejs as required
apt-get install nodejs
cd '/var/www/html'
git clone https://github.com/EinsteinsWorkshop/BlocksCAD.git
python -m SimpleHTTPServer 9000
Serving HTTP on 0.0.0.0 port 9000 ...
127.0.0.1 - - [14/Apr/2016 16:13:27] "GET /blockscad/lightgl.js HTTP/1.1" 200 -
127.0.0.1 - - [14/Apr/2016 16:13:27] code 404, message File not found
When a variable is placed into either radius slot of a cylinder block, the radius-locking functionality no longer works.
While the lock is active, I'd expect putting a variable into radius1 would make a dimmed version appear in radius2. Failing that, I'd expect inserting a variable to forcibly unlock the cylinder, to make it clear that the value isn't getting carried into the second slot.
I really enjoy BlockSCAD --- it's made me far more productive in OpenSCAD --- Thanks!
But the one feature I use which it doesn't support is the Customizer --- it would be wonderful if one could directly support it in BlockSCAD and that when OpenSCAD code was created it would be compatible with the Customizer (I add comments to help it, but I always have to edit the underlying code).
I would like to be able to assign (programmatically) names to objects and have those names be used when exporting to X3D, STL, ... where the export formats support names, so that I can more easily reference the objects in X3D.
Support for the animation capabilities of X3D would be great as well.
Exported XML files have the namespace declared as
xmlns="http://www.w3.org/1999/xhtml"
but this is not XHTML and the document is thus not rendered by a browser as XML
Suggest removing the xmlns attribute altogether or giving it a URI appropriate to BlockSCAD eg
http://blockscad.einsteinsworkshop.com
Hi devs!
I'm trying to play with the tool to design a shipping container house. I've found some 20ft and 40ft container models and imported them in my new project (.stl files). Unfortunately, it seems the default unit is millimeter, while the container are respectively 6 and 12 meters long. Thus the rendering is way too much zoomed and unzooming it leads to losing the image as it's probably out of bounds.
Is there any way to change settings either globally or for the imported blocks?
Generally speaking, is there any help to learn about the different blocks and functions?
Thanks in advance fro any clue!
Hi,
I've downloaded BlocksCAD (version 1.7.3) here in order to use it without Internet connection.
When, I want to see or use the exemples provided, nothing happens : nothing is displayed.
No problem when I use the site https://www.blockscad3d.com/editor/?lang=fr#.
Thanks for your help, regards,
Thierry Munoz
Heyas,
On my system I'm seeing a python error when running build.py in the blockly directory on the development branch (commit 58a2fdb):
Error reading ./msg/json/en.json
Traceback (most recent call last):
File "i18n/create_messages.py", line 149, in <module>
main()
File "i18n/create_messages.py", line 65, in main
source_defs = read_json_file(os.path.join(os.curdir, args.source_lang_file))
File "/home/anomaly/devel.hosting/BlocksCAD/blockly/i18n/common.py", line 64, in read_json_file
raise InputError(filename, str(e))
common.InputError: ./msg/json/en.json: Expecting property name enclosed in double quotes: line 7 column 2 (char 173)
('Error running i18n/create_messages.py: ', CalledProcessError())
The python json parser doesn't seem to like the stray commas after the final properties in a list. Changing this
{
"@metadata": {
"author": "Ellen Spertus <[email protected]>",
"lastupdated": "2015-09-15 10:09:56.877000",
"locale": "en",
"messagedocumentation" : "qqq",
},
}
to this
{
"@metadata": {
"author": "Ellen Spertus <[email protected]>",
"lastupdated": "2015-09-15 10:09:56.877000",
"locale": "en",
"messagedocumentation" : "qqq"
}
}
resolves the issue. My system is using python 2.7.3 (Debian Wheezy)
I think it would be nice to have the possibility to import .scad-Files - or is there already a possibility to do this?
Greetings
Thomas
It seems there's a file missing from the blockscad/ directory, auth.js. If I try to build the 'core' with the reference to the file removed, the resulting application is a bit broken. I've checked on several branches (standalone, development, master) and the result is the same in each - if I rebuild without this file I am unable to render or create projects
How to draw a collection along a straight line with varying separating distances? We could do that in csnap and scratch. We are trying to superimpose a head with braids. A braid is iin a location relative to the previous braid and the head position.
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="$fn" id="1279" x="-83" y="67"><value name="SIDES"><block type="math_number" id="1280"><field name="NUM">8</field></block></value><statement name="A"><block type="variables_set" id="1327"><field name="VAR">some_var</field><value name="VALUE"><block type="math_number" id="1348"><field name="NUM">42</field></block></value><next><block type="sphere" id="1359"><value name="RAD"><block type="math_number" id="1360"><field name="NUM">10</field></block></value></block></next></block></statement></block></xml>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.