Giter Site home page Giter Site logo

einsteinsworkshop / blockscad Goto Github PK

View Code? Open in Web Editor NEW
241.0 241.0 103.0 25.89 MB

Easy, Open-Source Solid CAD for Everyone! Check it out at https://blockscad.einsteinsworkshop.com .

License: GNU General Public License v3.0

Python 0.62% HTML 6.08% JavaScript 92.58% CSS 0.55% Emacs Lisp 0.01% Shell 0.01% OpenSCAD 0.11% Yacc 0.05%

blockscad's People

Contributors

dbrgn avatar dns2utf8 avatar juanblanco avatar mattminuti avatar maxt2 avatar miharix avatar yoderjen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockscad's Issues

Generate button broken in Safari on OSX

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.

Strings not handled corrected as parameters

image

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");

Can't Save From Samsung Note 10.1 2014

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.

Match OpenSCAD features

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:

  • Projection
  • Minkowski Sum
  • Children
  • Resize
  • Offset
  • Polygon
  • Polyhedron
  • Surface

blockly/msg/json/en.json parse error when building blockly components

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)

Rendering fails when defining a variable inside another block

How to reproduce

  1. Create a new project
  2. Add a block that can contain other blocks, e.g. a "sides" block
  3. Add a variable-defining block with a variable and a numeric value inside the "sides" block
  4. Click render. The rendering will fail because of Syntax Error due to a missing semicolon

Example Blocks-xml-file

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

Naming Objects

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.

Change default scale / unit

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!

Non-manifold STL

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

Collaboration with OpenJSCAD.org

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.

Variables confuse cylinder radius locking

When a variable is placed into either radius slot of a cylinder block, the radius-locking functionality no longer works.

screenshot from 2016-08-19 11 21 56

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.

Calculating with angles

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

Generate Button and the view frame are not showing up in Chrome Version 51.0.2704.106 (64-bit) running ubuntu 14.04

Arrays

We really ought to have support for arrays. It probably makes the most sense to base it on Blockly's List blocks.

Unable to set variables in module

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.

Extend BlockSCAD to allow use of the Customizer Interface

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

Internationalization

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?

BlocksCAD to OpenScad shifted text

Screen shots of 3D text on modified cube reveals a shift when save as SCAD is used.

STL(binary) appears correct in Mesh Lab.

Notice second line is also shifted from G over N

cool games nametag - meshlab - screenshot_2016-04-28_15-01-16
cool games nametag - openscad - screenshot_2016-04-28_15-04-25
cool games nametag - screenshot_2016-04-28_14-44-32

Import .scad-File!?

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

Non-manifold issues with simple geometry

screenshot

Some simple geometry results in non-manifold STLs - example attached. Looks like some bad triangulation. All earlier versions of BlocksCAD show this issue, as does the current version of OpenJSCAD. OpenSCAD 2014.01 produces perfectly fine STLs.

Model is not on a closed surface

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

Ubuntu Studio 15.10 localhost fails

Ubuntu Studio 15.10 using Chrome Version 48.0.2564.116 (64-bit) on Apache2 with

Ubuntu Studio 15.10 localhost fails with ABORT not RENDER as online does

Installed nodejs as required

apt-get install nodejs

Then clone and try

cd '/var/www/html'
git clone https://github.com/EinsteinsWorkshop/BlocksCAD.git

Screen snapshot when 'http://localhost/BlocksCAD/'

or maybe this relates to displayed results

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

SimpleHTTPServer 'http://localhost:9000/'

blockscad - screenshot_2016-04-14_16-28-32

Newest version ?

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

auth.js referenced but missing

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

Integration with nicescad

nicescad (demo at http://nicescad.bitplan.com/) tries to integrate different Open solid 3D CAD solutions e.g.

  • openscad
  • openjscad
  • python solidpython
  • blockscad

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?

Icons for Blocks

Blocks should have icons to serve as visual hints. SVG appears to be Blockly's preferred format.

  • Make Icons
  • Add icons to blocks

Rendering failure with variable assignment in block

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.

broken_loop

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>

Support for enumeration of variables for drop-down menus like Customizer

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.