GithubHelp home page GithubHelp logo

tbfleming / jscut Goto Github PK

View Code? Open in Web Editor NEW
293.0 32.0 136.0 1.5 MB

In-browser CAM package

Home Page: http://jscut.org

License: GNU General Public License v3.0

Makefile 0.35% JavaScript 79.37% C++ 10.08% CSS 0.13% HTML 10.08%

jscut's People

Contributors

tbfleming avatar tytouf 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

jscut's Issues

DXF Support

Now, I have raised this on Google Plus with @tbfleming, I have emailed, I see other people have emailed, and I do have sympathy for the author in saying DXFs are a mess.

I do agree it is, but I also do believe that whats standing in the way op opensource CNC the most, is the belief that we can adapt the world to us, instead of the other way around. For many of us to suppport a project, we need to use a project to make money. Reprap got it rights years ago, it creates cashflow for the developers.

This here is the same, we have a army of open source machine owners who can make money out of their garage and in turn plow some it back to the author or other projects

BUT, and thats a big one, most of your 'customers' have Never used Inkcape. CAD has for years been dominated by DXF as the lowest common denominator between CAD/CAD and CAD/CAM. If I want a part made, I send a DXF to the factory and pickup tomorrow. Simple - no questions about dimension or pixels per unit or none of those crap.

Blaming DXF files with disconnected entities is to me a easy way out - and I am not happy with that. We have developers with skills.... The reprap slicer guys have long figured out how to repair STLs on the fly - and thats in 3D, with DXF we have on less dimension so it cant be that hard! We have talented developers like @andrewhodel etc who also has a grasp of this....

Heres what I am thinking:

a) We are looking at the DXF at too high a resolution - most commercial packages just assume if the endpoints are withing 0.1mm of each other they are connected?

b) Adding pre process instructions like "Save as R14 in QCad before opening in JSCut" is completely acceptable

c) TALK about it. Dont just wipe it under the rug as Impossible! We know its not!

Ability to select Circles and Lines and use line thickness as filled path

Need a way to select lines with thickness, and shapes from svg files.

I came across this when exporting from Fritzing, it uses circles and lines to represent pads and traces on pcbs.

Found some resources and made a prototype that converts all shapes/lines to filled paths so I could convert my pcb designs, will try to make a PR after some cleanup:

To "flatten" svg shapes to paths:
https://gist.github.com/timo22345/9413158

To expand unclosed stroked paths/lines to filled paths:
http://microsoft.github.io/maker.js/docs/advanced-drawing/#Outlining%20a%20model

Initial two-sided cutting path causes problems at high speeds

When cutting out a rectangle pocket, JSCut generates the following toolpath:

screenshot from 2014-12-28 14 17 39

Cutting starts near the middle, with a plunge followed by a fairly long X-axis move. During this move, material is cut away on both sides of the mill bit. Subsequent moves only cut away material on one side of the mill bit, subject to the configured "step over" value.

The problem is that this initial move is a lot more demanding on the mill than the subsequent moves, but they are both executed with the same horizontal cutting speed. This means I have to either lower the cutting speed for the entire cut, or use a faster speed at the risk of things breaking during the initial move.

Is there currently some way to solve this problem? If not, there's two solutions I can imagine (but I'm really a milling novice, so there might well be better solutions here):

  • Configure two cut speeds: One for regular cuts and one for "initial cuts" where more than than the "step over" amount of material is being cut.
  • Change the toolpath to cut the initial slot using small Y-axis movements. This still has a small initial move that cuts away material on both sides of the bit, but most of the initial cutting is lighter on the mill. To clarify, this is what I'd have in mind:

screenshot from 2014-12-28 14 17 39

Make all inches/mm

jscut-1

From my perspective, it looks like the "Make all mm" and "Make all inch" links should convert, but the drop-down should not convert, just read the current values as the specified units.

This is currently not the case, as both the drop-down and the link convert the values in the fields.

Operation fold-out, fold-in improvements

I'm seeing a lot of people looking over the operation fold-out button. One comment was that next to the generate button it might be confused with a go / play button.

I think there are a few things we can do:

  • Create a bit more space between the generate and the fold-out arrow
  • Place the arrow somewhere else. (see B)
  • Choose a slightly different style arrow
  • Give the operations a more accordion look. Giving them a background color for example.
  • Add the cutting depth (one of the most important settings per operation) to the bar.

operations2

I think option B is better, because the fold button is less grouped with the generate link.
Feedback is welcome.
I'd like to help out with the css / html where needed.

Tabs and Retract to clearance

Hello,

Everytime I add tabs to the design I want to cut the generated gcode keeps sending the Z axis to the clearance level before moving it to the next pass depth.

Is there any way to change that ?

Go to X Y Zero on finish

Currently the Print stops at the last X Y position and goes to the safety height. Why not move to X0 Y0 after moving to the safety height? This would make it easier to send another print.

V-pocket moves around far above workpiece

During the cut of an SVG with fancy writing (both thick and thin lines), the generated gcode caused my spindle to make a lot of slow 3d moves in negative Z space (with top lower left of workpiece as 0,0,0).

It was indeed following the projected path of the text, but as it was far (a few mm) above the workpiece, it was quite the wasted effort.

Feature Request: Animate render operation

Add to the renderer the ability to animate the operations at 100% speed or faster.

Since render currently draws at a particular time step, I don't think this would be difficult to achieve. Add some UI elements (a speed slider, Play/Pause, Stop buttons) and set up Timers that set currentTime variable and then draw.

I will attempt to figure out the code-base and create a pull request.

Safari currently dead

Safari on iPad gives up the ghost on jscut now and I don't have a Mac to debug it. Anyone with a Mac handy with a debugger?

make failed

I wanted to make a standalone local version of jscut, but it allways fails with the following message:

framlin@bach:~/src/jscut$ make default
cd cpp && em++ cam.cpp hspocket.cpp separateTabs.cpp vEngrave.cpp -I /home/framlin/src/jscut/lib/boost_1_56_0 -std=c++11 --memory-init-file 0 -fcolor-diagnostics -Wall -Wextra -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-logical-op-parentheses -s ASSERTIONS=0 -s ALLOW_MEMORY_GROWTH=1 -s SAFE_HEAP=0 -s DISABLE_EXCEPTION_CATCHING=1 -s FORCE_ALIGNED_MEMORY=1 -s NO_EXIT_RUNTIME=1 -s EXPORTED_FUNCTIONS="['_hspocket', '_separateTabs', '_vPocket']" -o ../js/cam-cpp.js -O3 --llvm-lto 1

[...] some warnings [...]

Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, _self.__kwargs)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results
task = get()
TypeError: ('__init
() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())

any hints, what I could do?

Moves to safety height on each pass?

Currently the drill seems to move to the safety height after finishing a pass before it continues with the next pass (on the same operation). Since the Z axis usually moves very slow this costs a lot of time. Why move to the safety height between passes of the same operation?

Setting Where The Gcode Cuts First.

I am using JSCut to setup OX CNC gantry plates. The parts are beautiful, and everything is almost perfect. However the fist cut on all the parts is the outside boarder of the part. How can I set it so it does all the holes and pocket cuts inside the part first, the finishes with the outside last?

If the outside is cut first, the clamping is a mute point at the part is now loose for all the rest of the operations. Please tell me how to fix this problem. PS, I love JS cut. Great job!

Path header and footer

Hi!
I am currently putting together a Plasma Cutter CNC Machine.
The Controller is an Arduino running GRBL, using grblweb in combination with jscut as a Frontend.
For the Plasma Cutter to work, i Need some Special G-Codes at the beginning of each Path (Probing the Surface, starting the Plasma, moving up a bit, waiting some time, moving a Little down) and also at the end (stopping Plasma, moving a Little up, waiting some time).

The easiest way to achieve this - i think - would be to include a headerfile to the GCode-Output before each path, followed by a footerfile after each path...

What Do you think about that? Could this be possible?

Naming Operations

It would be nice if we were able to name the operations when instead of them just being indexed 0 to n-1 . This would allow very easy manual modifications to specific pieces of gcode (when necessary) instead of forgetting the order when looking at the gcode.

Cannot select objects in view to create paths

When trying to select objects the click to select the object in the 'edit toolpaths' view has to be super accurate on the line or the object cant be selected. To select the objects the click has to be right on the line and on my CNC machine the screen is low resolution and I can t get the accuracy needed.

Would it be possible to make the line selection easier when there are simple shapes. To replicate the issue, select display resolution 1024x768 and load up the attached SVG file. Try to select the shapes in the edit toolpaths view. I find myself clicking 20 or so times to just select one path:



rdf:RDF
<cc:Work
rdf:about="">
dc:formatimage/svg+xml/dc:format
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
/cc:Work
/rdf:RDF


<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="838"
id="namedview28"
showgrid="false"
inkscape:zoom="1.3664076"
inkscape:cx="242.21269"
inkscape:cy="228.20495"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />














Rapid feedrate too high on Z axis

I am using a Shapeoko 2 with a Due and a gShield running TinyG2. My Z axis is controlled using an ACME threaded rod, where as my XY are controlled by belts and pulleys.

My Z axis on my CNC cannot move at the same rapid speed as my XY axes can. It would be nice if there was an option in jscut to set a Z axis Rapid speed that was separate from the XY Rapid speed.

I have gotten around this issue by setting the rapid speed to a low value, but it's really time consuming to watch the CNC crawl during an XY movement.

Thanks!

Progressively disclose windows

Let's start with the fact that I think your tool is great. I'm involved with a Fablab for years and this is what I and the visitors have been waiting for.
I want to do some small ui improvement suggestions through the issue queue, let me know if that's not okay. I've done the same to help improve VisiCut, which is opensource lasercut control software. See for example: t-oster/VisiCut#71

One thing that's very important with these kind tools is Progressive disclosure. The basic idea is that you only disclosure complexity when it's appropriate, in a progressive way. This keeps it simple for beginners while still have all the tools for powerusers.

A very simple way to implement this in jscut would be to have some less used windows (like Curve To Line Conversion and Gcode Conversion) closed by default. You can even implement some kind of more / less functionality. A quick example:
window-editing

V Bits

Would it be possible to add V bits?

In the current version, it is not easy to do variable depth cuts using V bits since we're unable to change the tool for the operations.

Saving gcode to chilipeppr doesn't work?

I just tried saving the generated gcode to chilipeppr.com, but it says "Not logged into http://chilipeppr.com/" (in an easy-to-miss popup in the background). I just logged into chilipeppr.com (and refreshed both chilipeppr and jscut afterwards), so that cannot be true.

Any thoughts?

Make lines easier to click

When a shape doesn't have a fill and the line doesn't have a thicker width it's currently hard to select shapes.
Could we find a way to alter the line width so that shapes are easier to click?
Maybe this can be done with css? The following css would give all path, circle, rect etc elements a bigger stroke, when one hovers over them.

svg circle:hover, svg path:hover, svg rect:hover {
  stroke-width: 3px;
  stroke: #2A6496;
}

Allow non-closed lines for the engrave option

Hi, engraving non closed lines can be a very useful function to have. Right now it is a bit annoying as every design needs to have closed shapes.

screenshot from 2015-03-04 11 35 23
screenshot from 2015-03-04 11 35 56
screenshot from 2015-03-04 11 36 55

I haven't yet found an option to do this easily, what are your thoughts?
By the way I'm loving Jscut, thank you so much for this amazing tool

Feature request: Drilling

Would love to see drilling (straight plunge cuts) as well as spiral path cutting for circular holes larger than the bit diameter.

GPL3 License Exemption

Add a license exemption to allow bringing in Google Drive, Dropbox, and Gist. I need help wording this.

Group operation and their options better

So currently users create and select the current operation in the top left. The options for the selected operation then appear bottom left. Understanding this connection can difficult at first.

My suggestion would be to group this better, maybe have a kind of fold-in, fold-out system. Like a accordion menu, but without the forged limit that only one item can be open.
operations

So users always see the basic options per operation, like it currently shows the Visible, Combine and Operation options. (I would personally skip Combine here.)
Then when the users folds out the operation he sees options like Ramp Plunge, Direction, Cut depth, Margin etc.
A extra feature would be that users could use the scrubbers to drag the operations and change the order.

What do you guys think?

Material thickness ignored (makes a single pass)

First of all, thanks for this software as it is very useful and user-friendly :)

It has been a bunch of times I have got the following error: The amount of passes when creating a cut operation isn't calculated properly.
http://jscut.org/jscut.html?gist=e1f42b8e339a2db06ec8
screenshot from 2014-10-21 12 27 17
As you can see (after pressing Generate) the result contains only a single pass.

The problem has appeared with various configurations: Linux & Chrome, Linux & Firefox, Windows & Chrome, etc. I'm sorry as I don't know how to debug the issue. Maybe I am doing something wrong?

Thanks again!!

Establishing an XY origin

First of all, thanks for all of the hard work on this. jscut really is an awesome app.

The first few times I created an SVG file (with Inkscape) and generated gcode with jscut, it didn't make much sense to me. Y coordinates originate in the upper left, and use negative coordinates while Inkscape appears to use the lower left and positive coordinates. After applying some google-fu, I found out about Inkscape's wonky coordinates/ruler system.

The "set origin to lower left" button doesn't appear to work until after I generate a toolpath. Often the 3D view re-sizes on(during?) regeneration giving the appearance that nothing happened until I export and read the gcode or resize the browser.

In addition, setting the origin to the lower left chooses the leftmost point of a selected object. In the case of a circle, I may not be able to accurately find that point to square my stock in relation to it before milling.

I have a "template" file setup in Inkscape with the page set to the dimensions of my Shapeoko. Since the page size is obvious in Inkscape and tied to X and Y, would it be possible to allow selecting a page corner as the origin? I think asking a user would point out the difference between what Inkscape presents and what it saves in the SVG file, eliminate a lot of initial head scratching, and eliminate a lot of questions on the forums/G+/here, etc.

Working with one positive axis and one negative axis sounds like it will get really confusing while configuring Grbl come homing/limit switch time. Would it be possible to have a selection to convert negative coordinates to positive ones (or an option to just set all coordinates positive or all coordinates negative)?

As a final suggestion, maybe roll all of the XYZ coordinate stuff into a single box and make it an early step?

Thanks for reading this. I hope it makes some sense and I'm not missing something obvious.

Object from SVG too big

The following SVG was made in inkscape to be 90x85mm. The versions of inkscape I have tried agree on the size, and Makercam figures it out correctly too (although it spaces the two pieces far apart). However, jscut makes it ~96mm wide.

A browser gives me a pixel-count matching what jscut makes gcode for, but it might be necessary to listen to the specified (The SVG states that it's 90x85mm), as inkscape (which is a quite popular tool for making projected 2D for milling) can apparently not be trusted to output 90px/inch.

Link to SVG: https://www.dropbox.com/s/mzq81jfazikf6ie/spindle-clamp.svg?dl=0

EDIT: On second thought, Makercam uses the input px/inch to compute the size, and gets it wrong if you type the default of 72, instead of inkscapes 90. I'm not entirely sure of what's going on.

Jscut generating 2 identical cut paths on lowest layer

Steps to reproduce issue

  • open jscut
  • Open SVG -> Local
  • Select tocut.svg
  • Click "Make all mm"
  • Change Thickness to 10
  • Change Clearance to 3
  • Change Tool Diameter to 6.35
  • Change Tool Pass Depth to 4
  • Change Tool Cut Speed to 600
  • Select Both SVG Drawings (they turn from yellow to blue when selected)
  • Click Create Operation
  • Change Operation to Outside instead of Pocket
  • Change from 4 to 12 Deep for Operation
  • Click Generate on Operation
  • Look at Gcode, on the lowest layer it runs the same code twice for each object

Files

tocut.svg - http://pastebin.ca/3018586

tocut.gcode - http://pastebin.ca/3018587 (line 780 it goes to Z-12 and cuts, then on line 1157 it again repeats the same process)

This results, especially when cutting sheets, in the object being cut free from the sheet and then the tool making another pass on the same path at the same depth. Unless you are standing there holding the cut out part in place it will ruin the cut.

Larger cut that expected in a simple square

First let me say Iā€™m new to CAM and CNC so I may well have hold of the wrong end of the stick on what the different operations like inside, outside etc do. But I really like the concept of jscut, you have done a great job so far on it! Its great to have something to use from OS/X :-)

Iā€™m using a 3.175mm tool and to try and figure out what happens I made a very simple filled square in inkscape, is 10mm x 10mm and looks like this :

<rect
   style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.25084114;stroke-miterlimit:3.4000001;stroke-dasharray:none;stroke-opacity:1"
   id="rect4710"
   width="35.433071"
   height="35.433071"
   x="3.5433071"
   y="1013.3858" />

So I know inkscape is 90 dots per inch (DPI), that means its (90/25.4) dots per mm (DPMM). I can see the width and height is 35.433071 mm. Dividing that by the DPMM the width and height are 10.000000038 mm. So thats as I expect.

I pop that into jscut and ask it to do an inside and this is the relevant bit of GCode :

; cut
G1 X0.0000 Y0.0000 F200
G1 X0.0000 Y7.4917
G1 X7.4917 Y7.4917
G1 X7.4917 Y0.0000

So if we add the Tool width to that its cut will be from -(3.175/2) to 7.4917 + (3.175/2) which is a total cut size of 10.6667mm. That making the square just over 6% larger than I would have expected it to be. Is this just a pile of rounding errors adding up to generate this, or is there something I have done wrong?

Select panel

Coming from lasercutting applications I though having to manually select elements would be limiting, but I also think it's quite userfriendly. I also think users usually have less parts in their design when they mill something compared to when they lasercut something. But I think I might have found a way to implement a easy mass selection interface that works together with the current selection method.

select
This panel should start closed.
It would be filled by properties found in the file, grouped under property type.
Selecting a property would select all the parts in a file that match that property. This would allow you to very easily select all red parts for example. This becomes especially interesting when you have a lot of small items you want to do the same thing with, for example turn them into tabs (#17).
It could allow multiple selections.
Properties like colors could have a small preview.
The possible selection could be highlighted in the design when you hover over the properties.

This idea is inspired by VisiCut and this design brainstorm: t-oster/VisiCut#168

Use svg.js ?

Hi folks,
In collaboration with the maintainer of the svg.js library I've been able to make it very easy to import and parse svg files. We worked on making importing and converting all shapes to polygons as simple as:

var svg = SVG(containerElement)
svg.svg(importedSVGContent);
svg.toPath(true).toPoly("2px",true);

This imports the contents of a svg file into a svg, converts all shapes (eclipse, rects etc) into path's and then converts all paths into polygons. The import functionality supports Illustrator and Inkscape files. toPoly also subdivides curves into straight lines by a determined sample rate (in this case 2px).

This uses svg.js, import, toPath and toPoly

We still have to work on ungrouping: svgdotjs/svg.js#238

Maybe this is something you can use?

By improving the existing svg.js library and plugins I hope to make it easier for others to build other digital fabrication interfaces, like your jscut.
My personal goal is to use these webbased interfaces for another project: Tosqa

Laser cut svg

I couldn't find the required settings to configure jscut for laser cutting along the path instead of outside the path.

Safari: Offsets not working

It seems that offsets are having problems (see also http://www.shapeoko.com/forum/viewtopic.php?f=6&t=3572&start=40). I use grbl 0.9f with Universal G-Code sender 1.0.7 and setting offsets to 'Zero at lower left' does not seem to work correctly. 'Zero at center' neither.

I'm trying to do a pocket operation on a 100mm x 45mm rectangle created in inkscape exported as SVG. Loading the file and creating the pocket just works.

However, when milling it, the mill moves to coordinated too far away.

Would be great if you could take a look into this as jscut is otherwise really really great :)

Tooltips / popovers?

Another one for after #12.
There are quite a few configurations that are in need of a bit of explanation, like Step over, Plunge etc. It would be very nice to have short explanations in some kind of tooltips. Bootstrap seems to have them build in:

I would recommend the popovers, since it's better suited for a bit more text.
With a proper show delay this shouldn't be annoying for power users.

Cura also uses tooltips to explain almost all it's options, I think it's quite useful.

If you guys like it I'd like to help with the texts.

Use with LinuxCNC

I tried to get jscut to play nicely with LinuxCNC a while back, but I didn't know much g-code at the time, and the error message from LinuxCNC wasn't very helpful.

Now I recognize that jscut is leaving off M30 at the end of the file. Adding it manually works fine.

Could this be added by default or as an option?

Support adding tabs

jscut is awesome and would be even greater if it could support the inclusion of tags to prevent the piece from floating on the cut table when separated from the raw material.

Ideally it should be possible to add tags manually and hand pick each tag position or they could be part of the svg file as specific elements (discriminated by name or id for instance).
The tags height can be edited as a global parameter.

Auto generate?

Out of curiosity, why not automatically regenerate the path's when configuration is changed?
On my laptop the generation seems almost instant, it would be very nice to have a Auto generate checkbox somewhere. This leaves it as a choice. Users with older computers might not appreciate this.
Web workers, when supported might be interesting for this.

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.