CauldronDevelopmentLLC / CAMotics

Open-Source Simulation & Computer Aided Machining - A 3-axis CNC GCode simulator
Other
624 stars 143 forks source link

Rendering issues with real-time simulation. #264

Closed hpmachining closed 5 years ago

hpmachining commented 6 years ago

Rendering looks correct when using "Run", but incorrect when using "Play" button. It is worse the faster you run the simulation. Also, the renderings don't repeat when simulated multiple times (using "Play"). I get similar quality, but deviations differ.

Run run

Play 1x play_1x

Play 1x - 2nd example play_1x 2

Play 4x play_4x

System Information: Memory: 15.5GiB Processor: Intel® Core™ i5-8250U CPU @ 1.60GHz × 8 Graphics: Intel® UHD Graphics 620 (Kabylake GT2) OS - Arch Linux 64bit with GNOME 3.28.2 CAMotics 1.2.0 commit 5c02a34 V8 3.14.5 Qt 5.11.0

jcoffland commented 6 years ago

Yes, I was aware of this. Thanks for opening an issue for it though. When "Play" is active CAMotics attempts to simulate as the tool moves but the simulation cannot keep up unless the simulation is very simple or the movement slowed way down. So it attempts to simulate only the area of the workpiece that has changed since the last simulation was run. Unfortunately, it doesn't always run these localized simulations correctly. I believe the problem is due to incorrectly calculating the area that needs to be restimulated. This feature is a work in progress.

hpmachining commented 6 years ago

Thank you for the information. I thought it had something to do with not keeping up. I understand that it is a work in progress. Thank you for all you have done with this project. I have been studying the code and hope to learn how you do the simulations, but for now I'm just playing around with the UI. See my fork if you are interested in anything I have done.

jcoffland commented 6 years ago

Awesome, I merged all of your changes. You may want to resync your fork.

jcoffland commented 5 years ago

Fixed in new v1.2.0 release.