Category: Show Your Stuff
I have converted my old vismach to this VTK and i must say that i am impressed with it!
My configuration is only a simple 3 axis machine.
In the attachments, my configuration (vtkvismach is in the config folder) and 3d files (these go in your nc_files folder)
Some pro's for the new VTK implementation, in my opinion:
- Smaller stl from freecad (old vismach you needed to export as .ast, now normal .stl)
- In less lines you can configure your machine.
- Model groups are a real nice way to toggle off machine components you don't want to see during simulation.
- Transparent stock!
- Runs from you config folder stand alone.
- You can start it while your program is already running, or even if your machine is not homed yet.
- Quick switching of the viewing planes.
I found out that (in any case by HUD) that using hal pin's and don't create hal pins with the vtkvismach script makes you able to restart vtkvismach without restarting linuxcnc since you don't create double hal pins. For creating your model this faster.
The pins necessary for my HUD are now created in "custom.hal".
Also i added a few extra lines (classes) to vtk_vismach.py, some for my own preferences/use
- ini_work_file:
ini file reading, i use a ini file in the NC folder to specify my Job, in the ini file you can state your workpiece, raw stock and the work holding. In my example the files are read from the nc_files folder.
- Syntax:
- Product_stl=ini_work_file('WorkpieceModel', 'solidname').database_read(INI_Path_File)
- Polygon:
enter a polygon solid in Z direction (for example: used for my stock creation from hexbar to round)
- Syntax:
- Polygon((comp),x_center, y_center, z_center, length, radius, number_sides, inscribed)
- number_sides = number of polygon sides
- inscribed = boolean = if the given radius is: read as inscribed, measured on flats (1) or measured on the points (0).
- ThreadBox:
Creates a box of "wiremess" (for example: used for my working area)
- Syntax:
- Polygon((comp),xmin, ymin, zmin, xmax, ymax, zmax, radius, sradius)
- xyz min and max for your corners.
- radius = the radius of the ribs.
- sradius = the radius of the sphers on the corners.
- Small aditions, icon, View_Ori and TextHeightButtons (to keep the screen small with to many model groups).
- Made parallel the starting option.
- Changed "show overlay" from radio button to check box
- CylinderOriented, this function won't work if xystart and xyend are equal. i added some (brute force) logic to check and bypass the used matrix.
Aciera thanks for providing this nice simulation tool!