Comments (9)
If the cutter can move to the starting position from the ending position in a straight line without crossing outside the cutting area then it doesn't go up to the safety height. I made this calculation conservative for safety. I limited it to a straight line because path-finding algorithms are pretty expensive.
from jscut.
I'm afraid there is an issue. Maybe something goes wrong when it's exactly the same position?
I can replicate it with the following rectangle.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg3035"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="square.svg">
<defs
id="defs3037" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.1399139"
inkscape:cx="375"
inkscape:cy="520"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1244"
inkscape:window-height="620"
inkscape:window-x="20"
inkscape:window-y="20"
inkscape:window-maximized="0" />
<metadata
id="metadata3040">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect3043"
width="344.72888"
height="163.32452"
x="200.88481"
y="496.91034" />
</g>
</svg>
Settings I used:
{"svg":{"pxPerInch":"90"},"material":{"units":"mm","thickness":25.4,"zOrigin":"Top","clearance":2.54},"curveToLineConversion":{"minNumSegments":"1","minSegmentLength":2.54},"tool":{"units":"mm","diameter":3.175,"angle":180,"passDepth":"5","stepover":0.4,"rapidRate":2540,"plungeRate":127,"cutRate":1016},"operations":{"operations":[{"rawPaths":[{"path":[["M",200.88481,496.91034],["L",545.61369,496.91034],["L",545.61369,660.23486],["L",200.88481000000002,660.23486],["L",200.88481000000002,496.91034]],"nonzero":true}],"name":"","units":"mm","enabled":true,"combineOp":"Union","camOp":"Engrave","direction":"Conventional","cutDepth":"20","ramp":false}]},"tabs":{"units":"mm","maxCutDepth":0,"tabs":[]},"gcodeConversion":{"units":"mm","gcodeFilename":"gcode.gcode","offsetX":0,"offsetY":0}}
If you point me to the peice of code that does this safety height I'd love to help out.
from jscut.
It's probably the safeToClose
boolean or the tabGeometry.length on the following line:
https://github.com/tbfleming/jscut/blob/gh-pages/js/Cam.js#L411
from jscut.
Please use the gist save option in the future; it makes reproduction a lot easier.
Odd. safeToClose == true and tabGeometry.length == 0. It's not entering that condition, which means something else is retracting.
from jscut.
Found it. It should ignore tabZ at https://github.com/tbfleming/jscut/blob/gh-pages/js/Cam.js#L419 when tabGeometry.length == 0.
from jscut.
Also at https://github.com/tbfleming/jscut/blob/gh-pages/js/Cam.js#L418
from jscut.
Nice! I was just going to mention that it's not the retractGcode part, but the Rapid to initial position part.
from jscut.
Good news! It means someone else can read my code :)
from jscut.
Works! That's gonna save lot's of milling time.
from jscut.
Related Issues (20)
- Rubber-banding to select multiple objects HOT 2
- Change order of paths HOT 2
- Exact path mode
- Please lookup location, user may live in the modern world. HOT 1
- y axis not moving HOT 2
- Cut options for laser HOT 2
- generate?
- G0 for travel
- Breif Instruction HOT 1
- Min Z in stats of "G code Conversion"
- electron
- Select all / rectangle missing HOT 4
- Simulate 3rd party gcode
- seriously??? HOT 1
- Is jscut.org down for good? HOT 1
- Inside op toolpath error
- i cant select path because it is outside my table
- feature servo operation for generated GCode
- Engrave mode closes paths HOT 2
- v-pocket bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jscut.