Userscript for Trotec Ruby® - Move to the center of a rectangle from x1/y1/x2/y2
This script allows you to quickly construct a rectangle from 4 points (that lie on its boundaries) and move the laser head to its center in Trotec Ruby®. Say goodbye to having to measure everything manually in order to find the center. Does not work for JobControl.
This userscript is in no way, shape or form associated, supported or approved by Trotec Laser GmbH. By using it you understand that it may void your warranty or invalidate your Trotec Ruby® license. You are using it at your own risk.
How-to:
- You have an item or a piece of material to cut/engrave on your Trotec laser and you want to know where its center is (rectangular boundaries)
- Ensure that your piece is lined up on both axes and focused across the entire Z-plane. Make absolutely sure that there are NO OBSTACLES anywhere within or near the boundaries of the rectangle that could cause a head crash
- Manually move the red dot to your desired X1 position, this will be the first (likely left side) edge of the rectangle. If you have an item to engrave, ensure that the red dot is halfway on the left edge of your item. If your item is circular or elliptic, you may want to manually scan across the Y axis to check if the X1 line is on the point furthermost to the left of your item. In no time that action will become second nature.
- Do it 3 more times, for Y1, X2 and Y2. The order doesn't matter. For Y lines, scan across the X axis if you need to. If you want to obtain just the horizontal or vertical center point, click Y1 and Y2 or X1 and X2 (respectively) without manually adjusting the red dot
- The order should not actually matter. X1 can be the right edge
- Click on "Move to center", the laser head will automatically move to the center of the measured rectangle
- Now you can snap the center of your design to the crosshair. Make sure that snapping is enabled
- Additionally, size measures are displayed underneath the buttons.
Tested in Google Chrome 120.
Copyright © 2024 Michał Nowak (Neoqueto)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.