Online since 2002. Over 3300 puzzles, 2600 worldwide members, and 270,000 messages.

TwistyPuzzles.com Forum

It is currently Sun Apr 20, 2014 6:26 am

All times are UTC - 5 hours



Post new topic Reply to topic  [ 30 posts ] 
Author Message
 Post subject: TwistyTools -- Source Code now available
PostPosted: Sun Nov 14, 2010 7:25 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
It's not a puzzle,
But it can be used to make pretty much any shell-type puzzle

http://www.youtube.com/watch?v=ylrYEA5PPgM

There are still some bugs and some features to add, but it works well enough to make the video


[edit]
Source available here:
viewtopic.php?p=301695#p301695


Last edited by TBTTyler on Mon May 27, 2013 4:34 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 7:37 pm 
Offline
User avatar

Joined: Sat Apr 19, 2008 10:16 am
Location: Maryland,USA
Very Cool Tyler , What language is this in? This is a type of program that I have been thinking a lot about lately.

Chris Hemerich


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 7:46 pm 
Offline
User avatar

Joined: Tue Mar 10, 2009 7:06 pm
Location: Nowhere in particular.
Wow, that's awesome! This will be very useful for offering basic puzzle designs to be open to the public in the future.

This is in Python, right? Can it be adapted to be used with any other CAD Software? (I know Rhino has some sort of compatibility with Python...)

_________________
~Kapusta

PB: At home (In Competition)
2x2 1.xx (2.88)
3x3 11.xx (15.81)
4x4 1:18.26 (1:24.63)
5x5 (3:00.02)
6x6 4:26.05 (6:34.68)
7x7 6:38.74 (9:48.81)
OH (35.63)

Current Goals:
7x7 sub 6:30
4x4 sub 1:10


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 7:46 pm 
Offline
User avatar

Joined: Wed Jan 21, 2009 12:58 pm
Wow, this is really neat. Kudos!

Skarabajo.

PS: I saw Kapusta just answered... Python is wonderful

_________________
My collection | My first mod | Making of first mod | Items for sale


Last edited by Skarabajo on Sun Nov 14, 2010 7:47 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 7:46 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
Synester wrote:
Very Cool Tyler , What language is this in? This is a type of program that I have been thinking a lot about lately.


I wrote it in python (if you couldn't tell by me typing "python" into the interpreter at 0:26 :wink: )

Kapusta wrote:
Wow, that's awesome! This will be very useful for offering basic puzzle designs to be open to the public in the future.
This is in Python, right? Can it be adapted to be used with any other CAD Software? (I know Rhino has some sort of compatibility with Python...)


It certainly could.
The final output of the pieces are just boolean intersections of cones and spheres. As long as there's a command line interface and robust boolean support, this could be tailored to any CAD/3d program. In fact, I used Maya to do the display work for my debugging


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 7:52 pm 
Offline
User avatar

Joined: Wed Mar 11, 2009 3:33 pm
Location: Pennsylvania, USA
Very cool :)

What have we puzzle builders gone from; casting plastic pieces from molds and hand finishing our puzzles to having a computer generate AND build them for us :lol:

_________________
NEEDS MORE LUBIX

My Youtube and Shapeways


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 7:54 pm 
Offline
User avatar

Joined: Sat Apr 19, 2008 10:16 am
Location: Maryland,USA
TBTTyler wrote:
Synester wrote:
Very Cool Tyler , What language is this in? This is a type of program that I have been thinking a lot about lately.


I wrote it in python (if you couldn't tell by me typing "python" into the interpreter at 0:26 :wink: )




Oh wow, duh :lol: I would love to try something like this, though I'm sure it is significantly more difficult in c++,java, or in VB which are the languages I know.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 8:12 pm 
Offline

Joined: Sun Oct 30, 2005 1:30 pm
Location: bay area, california
that is totally cool...
If you need beta testers... sign me up!

:)


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 8:35 pm 
Offline
User avatar

Joined: Tue Mar 10, 2009 7:06 pm
Location: Nowhere in particular.
TBTTyler wrote:
Kapusta wrote:
Wow, that's awesome! This will be very useful for offering basic puzzle designs to be open to the public in the future.
This is in Python, right? Can it be adapted to be used with any other CAD Software? (I know Rhino has some sort of compatibility with Python...)


It certainly could.
The final output of the pieces are just boolean intersections of cones and spheres. As long as there's a command line interface and robust boolean support, this could be tailored to any CAD/3d program. In fact, I used Maya to do the display work for my debugging


Wow! I wasn't expecting that as an answer :lol: I like it even more now, I hope great things come out of it.

EDIT: Count me in for any beta testing and tomfoolery as well! :)

_________________
~Kapusta

PB: At home (In Competition)
2x2 1.xx (2.88)
3x3 11.xx (15.81)
4x4 1:18.26 (1:24.63)
5x5 (3:00.02)
6x6 4:26.05 (6:34.68)
7x7 6:38.74 (9:48.81)
OH (35.63)

Current Goals:
7x7 sub 6:30
4x4 sub 1:10


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 8:56 pm 
Offline

Joined: Sun Aug 15, 2010 11:12 am
TBTTyler wrote:
Kapusta wrote:
Wow, that's awesome! This will be very useful for offering basic puzzle designs to be open to the public in the future.
This is in Python, right? Can it be adapted to be used with any other CAD Software? (I know Rhino has some sort of compatibility with Python...)


It certainly could.
The final output of the pieces are just boolean intersections of cones and spheres. As long as there's a command line interface and robust boolean support, this could be tailored to any CAD/3d program. In fact, I used Maya to do the display work for my debugging


Sounds like it could work with OpenSCAD, then!


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 9:30 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
logan wrote:
Sounds like it could work with OpenSCAD, then!


Ooh, hadn't heard of OpenSCAD
I may have to write an output function for that as well.
Is there an easy fillet function for OpenSCAD? I didn't see one at first glance, but I didn't look too hard.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 9:34 pm 
Offline

Joined: Sun Aug 15, 2010 11:12 am
TBTTyler wrote:
logan wrote:
Sounds like it could work with OpenSCAD, then!


Ooh, hadn't heard of OpenSCAD
I may have to write an output function for that as well.
Is there an easy fillet function for OpenSCAD? I didn't see one at first glance, but I didn't look too hard.


No, unfortunately, there is no built-in fillet function in OpenSCAD.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 9:36 pm 
Offline
User avatar

Joined: Tue Mar 10, 2009 7:06 pm
Location: Nowhere in particular.
Wait, are you planning to add a fillet function to this, too? (As awesome as this would be to someone who wanted an instant finished puzzle, I'm sure a lot of people would prefer to do their fillets by hand.)

_________________
~Kapusta

PB: At home (In Competition)
2x2 1.xx (2.88)
3x3 11.xx (15.81)
4x4 1:18.26 (1:24.63)
5x5 (3:00.02)
6x6 4:26.05 (6:34.68)
7x7 6:38.74 (9:48.81)
OH (35.63)

Current Goals:
7x7 sub 6:30
4x4 sub 1:10


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 9:48 pm 
Offline
User avatar

Joined: Fri Mar 06, 2009 9:23 pm
you beat me to it! now all you need is to have the program finish the puzzle and do a direct upload to shapeways!

_________________
--Eric Vergo

My Shapeways shop


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sun Nov 14, 2010 11:47 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
Kapusta wrote:
Wait, are you planning to add a fillet function to this, too?

It's on my wishlist, but there's a lot of stuff to get done before that. The way I have it set up though, it wouldn't require any weird blends. Just straight offset calculation, circle lofting, and strategically placed ellipsoids

gingervergo wrote:
you beat me to it! now all you need is to have the program finish the puzzle and do a direct upload to shapeways!

I've already got plans for the outer shape (pull the circles from the outermost shell, find the plane the circle lies on, and use that as a cutting plane)
And a core is pretty easy.
Tolerances work, and fillets are on the backburner.
Making a pretty UI is WAY off in the distance though.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Mon Nov 15, 2010 12:06 am 
Offline
User avatar

Joined: Thu Dec 21, 2006 5:32 pm
Location: Bay Area, CA
Really, really cool. Now to have Jaap's app just integrate with yours...

Dave

_________________
Image
LitwinPuzzles.com has info on my puzzles.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Mon Nov 15, 2010 2:18 am 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
It kind of already does.
I wrote a quick function that turns the numbers from Jaap's app into one that my functions can take

def jaapAngle(n): return degrees(acos(n/300.0))


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Wed Apr 27, 2011 3:02 am 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
5 months later, I know. But there's been a development.
Using a little free time over the past couple months, I re-wrote most of the code, sped it up, and wrote an openGL display for mechBuilder.
The 'export to BRL' part of the code is out for now, but it'll be easy to drop it back in.

Next, I'm going to be working on a gui. I've got plans drawn up for it, and there are already place holders set up in the Qt gui designer.
Now I've just gotta learn Qt.

I'm still in pre-alpha stages, so no testers for now.

sorry, don't have a mic set up so it's just text-intro 'till about 0:55 in
http://www.youtube.com/watch?v=d0HeRkSiE_g


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 10:24 am 
Offline
User avatar

Joined: Mon Feb 06, 2006 12:52 am
This seems really crazy and I still haven't understood this.
So you tell the prog what shape you want i.e. dodecahedron and you tell it the depth of the cuts and it makes all the cuts for you. Is that what it does? Your first vid's example was a gigaminx right? Two series of shallow cuts.
But can this prog also create deeper cuts? Like what if you want a starminx or pentultimate. Does it create the megaminx to pyraminx crystal to starminx? I guess it's not that insanely good?

You should make the prog more intuitive for program noobs like myself. Like a window with pictures of shapes I can choose (cube, dodec.,...) and than "type in cuts you want" with a preview of a dodec with black lines only or so.
But I guess this is for you only so far. :)

_________________
Life is simple.
eat. sleep. train. repeat.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 10:41 am 
Offline
User avatar

Joined: Fri Feb 08, 2008 1:47 am
Location: near Utrecht, Netherlands
You could create a shells pentultimate using this program, but you would have to individually specify each layer of the mechanism. I think that in its current state, Tyler's program is more of a tool for existing puzzle designers than something which will enable the general public to design puzzles - you still need a good amount of insight to determine the correct cut placement and experience with a CAD tool to prepare the parts for printing.
Of course, you could combine evolutionary algorithms with this work and make an automatic puzzle designer. I don't think the search space would be that insane if some smart heuristics are used. Really cool!

_________________
Tom's Shapeways Puzzle Shop - your order from my shop includes free stickers!
Tom's Puzzle Website


Buy my mass produced puzzles at Mefferts:
- 4x4x6 Cuboid for just $38
- Curvy Copter for just $18
- 3x4x5 Cuboid for just $34


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 12:03 pm 
Offline
User avatar

Joined: Tue Aug 11, 2009 2:44 pm
TomZ wrote:
Of course, you could combine evolutionary algorithms with this work and make an automatic puzzle designer. I don't think the search space would be that insane if some smart heuristics are used. Really cool!

Yeah, that would be great. I had had thoughts on writing such a program. But Tyler is way ahead of me!

But let me see if I understand MechBuilder -- the input is the geometry and the profile curves? From the videos, it wasn't clear how the profile curves were specified.


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 12:57 pm 
Offline
User avatar

Joined: Fri Feb 08, 2008 1:47 am
Location: near Utrecht, Netherlands
The profile curves are put in as successive Jaap's Spheres. So it's geometry + number of cuts + number of shells + cut depth for each shell and cut.

_________________
Tom's Shapeways Puzzle Shop - your order from my shop includes free stickers!
Tom's Puzzle Website


Buy my mass produced puzzles at Mefferts:
- 4x4x6 Cuboid for just $38
- Curvy Copter for just $18
- 3x4x5 Cuboid for just $34


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 12:58 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
alaskajoe wrote:
This seems really crazy and I still haven't understood this.
So you tell the prog what shape you want i.e. dodecahedron and you tell it the depth of the cuts and it makes all the cuts for you. Is that what it does? Your first vid's example was a gigaminx right? Two series of shallow cuts.
But can this prog also create deeper cuts? Like what if you want a starminx or pentultimate. Does it create the megaminx to pyraminx crystal to starminx? I guess it's not that insanely good?


TomZ is right, It's all done as shells, so all you'd have to do is specify the correct shells for a crystal/starminx/pentultimate.


alaskajoe wrote:
You should make the prog more intuitive for program noobs like myself. Like a window with pictures of shapes I can choose (cube, dodec.,...) and than "type in cuts you want" with a preview of a dodec with black lines only or so.
But I guess this is for you only so far. :)


That's actually not that far off.

First a background of how it works:
There's a loose hierarchy of geometry. Puzzle, Shell, Shard, Graph, Circle, Region, Arc.
You tell the Puzzle what axes you want to twist about and at what depth.
The puzzle then creates the individual shells.
The Shell makes a Graph (just a bunch of circles on the surface of a sphere)
The Graph then cuts those circles into arcs, and groups them into regions. And regions are extruded into shards.
Shards that are on top of one another and twist the same (like crystal/megaminx corners) are auto-detected and grouped into pieces. Congruent pieces (ones that contain all congruent shards) are grouped together.

The way I want it to work is I give you a design tree and you create a new Shell and give it a symmetry (dodeca,cube,icosa,etc). You then drag circles along the surface just like in Jaap's sphere symmetry editor. Continue creating shells to your desired depth, then process.
Then there will be a spreadsheet at the bottom where columns are Pieces, the rows are Shells, and the individual cells are Shards. So to edit any connections, you just drag/drop a shard from one column to another.



bhearn wrote:
But let me see if I understand MechBuilder -- the input is the geometry and the profile curves? From the videos, it wasn't clear how the profile curves were specified.


The profile curves are specified as cones intersected with a sphere.
Shell(InnerRadius,OuterRadius,[axisList],[coneAngleList])




TomZ wrote:
Of course, you could combine evolutionary algorithms with this work and make an automatic puzzle designer. I don't think the search space would be that insane if some smart heuristics are used. Really cool!


That's been in the back of my head for quite some time. What I think I would really need to make that happen is a way to identify when a region is created/destroyed as the cuts get deeper. Once that's done, you can limit your search to those radii where a region is created, or a region is destroyed.
Then the algorithm would work it's way from the user-specified outer shell inward. When it finds the place where all pieces from the previous shell are destroyed, it backtracks to a halfway point between the previous creation/destructions, creates a shell there, and continues the search until there's a region that's only contained within one circle (A center piece).


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 2:47 pm 
Offline
User avatar

Joined: Sat Jan 16, 2010 11:48 am
Location: In Front Of My Teraminx (saying WTF?)
What CAD program can use this?

_________________
My Shapeways Shop!
My Designs
My Official Results
My Website on Twisty Puzzles with Gears

Grégoire Pfennig


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Sat Apr 30, 2011 2:53 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
RubixFreakGreg wrote:
What CAD program can use this?


viewtopic.php?p=236557#p236557
TBTTyler wrote:
Kapusta wrote:
Can it be adapted to be used with any other CAD Software? (I know Rhino has some sort of compatibility with Python...)

It certainly could.
The final output of the pieces are just boolean intersections of cones and spheres. As long as there's a command line interface and robust boolean support, this could be tailored to any CAD/3d program. In fact, I used Maya to do the display work for my debugging


Top
 Profile  
 
 Post subject: Re: My latest project -- MechBuilder
PostPosted: Mon May 27, 2013 4:25 am 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
After over a year of not touching it and two years since I posted about it, I figured I should just let it out into the open.
The source repository:
https://github.com/tbttfox/TwistyTools

A video of its use in the current state:
http://www.youtube.com/watch?v=eZ7aTlrYaA0

To run it, you'll need
Python 2.7: http://www.python.org/download/
PyQT: http://www.riverbankcomputing.com/softw ... t/download
PyOpenGL: https://pypi.python.org/pypi/PyOpenGL/3.0.2

After all that, just run ttMainWindow.py

To rotate/pan/zoom the 3d puzzle, you hold down the alt key and drag one of the three mouse buttons.
Most everything else is done via right-click in the hierarchy to the left.


Top
 Profile  
 
 Post subject: Re: TwistyTools -- Source Code now available
PostPosted: Fri May 31, 2013 5:04 pm 
Offline
User avatar

Joined: Sat Apr 21, 2007 11:21 pm
Location: Marin, CA
I never saw this before! Has it been used to make a puzzle?

I've had fantasies of a heuristic based tool that would design a given puzzle at the minimum size, given feet thicknesses, etc. and it sounds like I'm not alone.

Now that Shapeways has an API, you really could go end to end. How neat would that be?

Are you using your own geometry libraries?

_________________
Jason Smith posted here as 'io' through 2012.
Visit Jason Smith's PuzzleForge on Shapeways!
Jason Smith's Puzzles - YouTube Channel.


Top
 Profile  
 
 Post subject: Re: TwistyTools -- Source Code now available
PostPosted: Fri May 31, 2013 5:59 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
It has not been used to actually make a puzzle. The current incarnation has no output ability, though earlier versions were able to output BRL-CAD code. It certainly wouldn't be all that difficult to re-implement though. There's a class called the "shard" which is the simplest solid in my library, and it just represents a Boolean of cones and a single shell.

Yes, I'm using my own geometry libraries. I wrote this for fun, and I really wanted to know how an entire graphics program worked. I'm sure there's something out there that would be much faster, but premature optimization is the root of all evil. However, the plan all along has been to use an outside library to do the final creation of the piece. Triangulation of 3d surfaces kinda sucks.

The next things on the to-do list involve combining the shards together to make pieces. I've already got a method for determining which shards connect together; there just needs to be a way to represent that data to the user and let them edit it.
Also, there's some preliminary work on an auto-filleting technique. I call it making a "core" (or something similar) in the code. There just needs to be a way to fillet a simple shard and represent it in a constructive way.

Of course, if anybody has any questions, feel free to ask.


Top
 Profile  
 
 Post subject: Re: TwistyTools -- Source Code now available
PostPosted: Sat Jun 01, 2013 6:14 pm 
Offline
User avatar

Joined: Thu Jun 03, 2010 2:25 pm
Location: Farmington, NM
Have you tried using cx_Freeze or something similar to convert the source code into an executable?

_________________
Autism Speaks can go away. I have Autism. I can speak for myself.

"You say tomater, I zader matermorts." - Coach Z


Top
 Profile  
 
 Post subject: Re: TwistyTools -- Source Code now available
PostPosted: Sat Jun 01, 2013 6:22 pm 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:53 pm
Location: Los Angeles
Jorbs3210 wrote:
Have you tried using cx_Freeze or something similar to convert the source code into an executable?


Not really. It's nowhere near being actually usable out of the box, so I feel it's kinda pointless at this time, but that doesn't mean that I'm necessarily against it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Forum powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group