Releases: grotius-cnc/hal-core
sketcher progress
Its time to test a chamfer & fillet function.
- I left a [x] side polygon input behind. This has no priority.
- The
slot
draw function can be used in 3 planes. But i now realize it can be a fully 3d implementation. By a slightly different method. - For the most part i switched from adding child shapes to buidling compounds to save points of interest.
Sketcher coding progress
Added a 3d spline and a 3d bezier curve to the code. Also the 3point contour circle is coded.
In the bezier curve i added the control points as child shapes. They now belong to the bezier linestrip shape.
The controlpoints will select if main shape is selected.
In this way we can edit the primitives later on quite easy, for example when a trim has to be done.
Todo
- Add ellipse.
- Add slot. I think this is a nice one to have).
- Add polygon. (inner or outer result, user defined N edges).
- Remove the tangent circle.
Notice
In previous release the used opencascade lib was provided.
Progress of a opencascade sketcher
Progress of a opencascade sketch
implemenation.
~/opt/hal-core/src/hal/components/matrix/cpp_interface/libocct/occ_apps/OcctQtWidget
You need to load (eventually compile) the 2 projects of above path.
- OcctQtApp (is only the executable app that executes the OcctQtLib code)
- OcctQtLib (the source code. Coded as a Widget)
The opencascade.tar.gz is the used opencascade library. The .pro files have linked path's to this.
This opencascade archive is also a qt project. And can be compiled by qt.
Sniff into the ~/opt/opencascade/oce-upstream-V7_5_0beta/adm/qmake/ dir to find the Occt.pro file.
Specs until now
- User can select 3 types off drawing grid plane's to draw on.
- Primitives all in 3d space working :
point
line linestrip
arc 3p center
arc 3p contour
circle 2p center
square
- Most of the icons work, like view top, bottom, left, right etc, zooming, etc.
- Color selector. Contains a nice piece of code to convert qt to occt colors.
- For F8 ortho i made a test input that run's like a classic autocad line input method.
- Contains a old russian code named libsctecher for reference.
Todo soon
- 3d spline... Got algo for this already.
- bezier curve... Got old algo for this, but maybe use a occt shape for this.
- Starting a trim implemenation.
For reference : eryar/occSketcher#4 source code example.
new gcode parser
In this release i removed the gpr gcode parser. This gpr parser was used from github.
Removed gcode parser : https://github.com/dillonhuff/gpr
Inserted a clean coded c++ std::lib style gcode file parser.
~/opt/hal-core/src/hal/components/matrix/cpp_interface/libgcode/gcode_parser.h
~/opt/hal-core/src/hal/components/matrix/cpp_interface/libgcode/gcode_parser.cpp
update
The program is capable of performing a gcode, forward & backwards full gcode file.
The program can do a restart at line. It asks to perform a mdi to the startposition. If in position, the program starts from line.
The manual jog mode is working with scurve motion profile.
The program can perform a multiline mdi command.
The program can run multiple machines doing a gcode at the same time. With my pc it could perform up to 4~5 machines max.
In this update
TODO:
- Look ahead.
- Mcodes.
- Tangential pos outputs?
- Input relative coordinates by hand.
DONE:
- Startpos mdi should be machine curpos.
- Restart from line. User can do a mdi with safe height when not in position.
- relative positions + reset j0-j5
- solve the isnan euler output. gcode_interface line 335. (caused by a ratio division to 0).
- When in reverse feed fix euler abs outputs. (solved)
- Manual mode, scurve adaption.
basic multiline mdi functionality
Some basic mdi functionality is working.
Todo:
I see at reverse motion the interpolated euler abc has to be modified.
Video of the multiline mdi commands:
simplescreenrecorder-2022-01-13_22.51.05.mp4
Updated with hal-core-1 archive wich contains more mdi and auto mode functionality.
Todo : restart from line in auto mode.
update
In this update
- Machines are coded as widget instances. For every machine it does : "machine_1 = new widget ..."
- The machine gui design is now done graphical, was previously coded without graphical design.
- It now run's 2 seperate gcode's on different machines. The servo load is around 50% wich is perfect !
Todo
- Make the start, stop interface more robust when no gcode is loaded.
- Restart from line.
- Macro's.
- Hal io.
- Manual online movements, manual move respecting a scurve motion.
- Etc.
Picture of this archive
Vido of this archive
simplescreenrecorder-2022-01-13_18.25.24.mp4
update ~/src/hal/components/matrix ...
The trajectory planner can move a program forward & backward (reverse feed) entirely.
The difficulty of programming this are the velocity user interrupts. This is when a user demands a higher or lower max
velocity during runtime. Or the user changes acceleration values during runtime.
The trajectory planner has to calculate a new traject for the current gcodeline. This situation can happen unlimited times
when a user holds button to scroll values down.
When user press pause or stop, the machine is performing a controlled stop. Pressing run, will resume the motion with
a controlled velocity up stage.
Todo:
- Use the gcode feedrate instead of max velocity input.
- Add a % velocity override spinbox.
- Use a look ahead function to enable velocity end's at crossing waypoints.
- Code the restart at line.
- Let the macro outputs interact when running the gcode.
- A few things more.
Video example. It's kind of shocky because of the video capture program.
simplescreenrecorder-2022-01-09_23.48.46.mp4
negative feed
gcode now includes negative feed.
Implementation of negative feed:
The ruckig trajectory can not have 0 velocity or negative velocity. So if 0 velocity is commanded it is changed to 0.001 vel.
The ruckig input for velocity is always done with the "abs(value)". This ensures a positive input value.
When a negative feed is commanded,
The target position is set to 0 of current exec gcodeblock. When targetposition 0 is reached the gcode goes back one line and the
actual position is set to the gcode blocklenght of the new gcodeline.
The reverse feed can go back the whole gcode program.
The negative feed is in fact a few lines of code.
For reference, the negative feed is also integrated in the halcore/src/hal/component/trajectory example.
gcode runner active
Improvements
- The gcode scrollbar is moving along with the current exec gcodeline.
- Gcode .ngc files can be performed in 3d. The machine can do a cartesian xyz & euler abc 3d gcode.
- The video shows that the joint values for vel,acc & jerk are set to low. Machine xyz vel are set too high. The path following error is visible wich is a good sign.
- The gocde runner has no "Ve" end velocity algorime under the hood. It now stops at every gcode line. WIch has to change soon.
- Gcode close button has to be improved. Only close a gcode when program is stopped.
simplescreenrecorder-2021-12-05_16.21.12.mp4
Some high level stuff. Each gcode program has 2000+ lines. So 2 machines are doing 4000 gcode lines.
This gcode, containing pockets is processed by cam. See my other github repository.
The servo load (lower left of window) stay's acceptable for me. This say's if 100%, 1ms is quaranteed for the servo-thread.