CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 23, 2018, 04:57:03 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: rotate objects to minimize stock height (script)  (Read 774 times)
jk
Storm Trooper
***
Offline Offline

Posts: 239


View Profile
« on: December 09, 2017, 03:17:45 am »

Following the http://www.cambam.co.uk/forum/index.php?topic=7012.0 feature request, did a little script just
for fun.

Select objects and run script. It will try to rotate objects in a way to minimize stock height.

The algorithm is dumb but effective - try a lot a rotations and choose the best )

By default script tries to minimize box height.  Box width, area or perimeter may be selected - just modify a
script header.


* rotate_to_minimize.zip (1.11 KB - downloaded 44 times.)
« Last Edit: December 09, 2017, 03:23:48 am by jk » Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3492



View Profile
« Reply #1 on: December 09, 2017, 12:39:19 pm »

I knew you couldn't resist  Cheesy
Logged
kvom
CNC Jedi
*****
Offline Offline

Posts: 1471


View Profile
« Reply #2 on: December 09, 2017, 12:54:35 pm »

Tried it on my project.  Eyeball by me got 10.04", script 9.93".  It did end up rotated 180 from my starting point, but that's easy to re-rotate.
Logged
jk
Storm Trooper
***
Offline Offline

Posts: 239


View Profile
« Reply #3 on: December 10, 2017, 09:16:20 am »

I knew you couldn't resist  Cheesy

I didn't even try to )

I made a few parts like this which should benefit from the script:


* hanger.png (7.01 KB, 411x376 - viewed 71 times.)
« Last Edit: December 10, 2017, 09:22:16 am by jk » Logged
kvom
CNC Jedi
*****
Offline Offline

Posts: 1471


View Profile
« Reply #4 on: December 10, 2017, 23:37:20 pm »

If you want the minimum X you just have to find minimum Y and rotate 90 degrees.  No need to modify the script.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.11 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap