Author Topic: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]  (Read 2780788 times)

0 Members and 1 Guest are viewing this topic.

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2200 on: Tue, 12 March 2019, 11:54:19 »
Yes I found my mistake, the key is stepped. I forgot to add that into KLE.


Code: [Select]
["¬\n`","!\n1","\"\n2","£\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"Enter"],
[{w:1.25,w2:1.75,l:true},"Caps Lock",{x:0.5},"A","S","D","F","G","H","J","K","L",":\n;","@\n'","~\n#"],
[{w:1.25},"Shift","|\n\\","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift"],
[{w:1.5},"Ctrl","Win",{w:1.5},"Alt",{a:7,w:7},"",{a:4,w:1.5},"Win","Menu",{w:1.5},"Ctrl"]

I'll make final verifications but it seems OK now.
Show Image


Thanks Swill !

Ah, ok.  Good catch.   :thumb:

Offline Primuds

  • Posts: 9
  • Location: Singapore
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2201 on: Thu, 14 March 2019, 07:21:14 »
Hi Geekhack,
I am a fairly new guy to the custom keyboard scene, but I am really interested in making my own custom. As such, I have used Swillkb's tool to make a plate for a 75% layout. I am planning on using a kbd75 PCB with a 3d printed case as I wanted to have in-switch and underglow lighting. However, I am unsure if the cutouts on the rendering tool will line up correctly with a 75% layout pcb like the kbd75 or xd84. I think most boards use standardized spacing between switches, but is anybody aware if I will run into any issues? I would really appreciate if anybody has any feedback.  Thank you! ;D

Offline ctrl

  • Posts: 287
  • Location: Umeå, Sweden
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2202 on: Thu, 14 March 2019, 07:34:12 »
Thank you very much!

Another question, when opened up in LibreCad and saved in the 2007 file format, the measurements are actually 94.92mm by 285.37 instead of 95.252 mm by 285.752 mm on the swillkb website. This is when creating a pok3r plate. What is the correct measurement?

I would have to look into that one.  It could be that kerf is messing with my calculation on the site, but I would expect it to be consistent in terms of how the two numbers are different in both dimensions, so that doesn't seem like it would be the case.   

Are you use custom polygons at all?  Do any of them overlap the outer edge of the plate?  I am wondering if I am not updating the bounds correctly (how I calculate the width and height) after the final operations (ie: cut | add) on the custom polygons.  I will have to dig into this a bit.  Anything special you were doing?

Were you able to find out what's causing this? I'm running into the same thing right now actually. I first noticed it when I uploaded the dxf file I exported from swillkb to bigbluesaw.

I'm totally messing about with custom polygons. I'm attempting a half-plate so I've cut away all alphas including the numerical row. As well as using superellipse to round corners. (See my other question in the previous comment.)

I'd like to know more about this because I'm hesitant to have plates cut for a sackful of gold if there's something messing up the measurements.

Can you link me what you are trying to do so I can review?  I don't believe I have applied kerf to the custom polygons, so if you are going to be doing anything that is pressure fit into a custom polygon, you may want to do a small test before you do a full build.

If you can give me a feel for what you are doing I can try to support.  Cheers...

I solved the inner cutout by doing it in LibreCAD instead. It was faster that way. However, it appears swillkb doesn't want to return correct plate measurements. Something happens that alter them, like merlin64 also wrote: "when opened up in LibreCad and saved in the 2007 file format, the measurements are actually 94.92mm by 285.37 instead of 95.252 mm by 285.752 mm on the swillkb website."
« Last Edit: Thu, 14 March 2019, 07:41:36 by ctrl »

Offline Slavfot

  • Posts: 52
  • Location: Sweden
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2203 on: Sun, 17 March 2019, 13:12:37 »
Hi!
I'm really impressed with your tool and have used it alot!
I'm a CAD user professionally and use solidworks to design keyboards on my spare time.
I''m wondering how you can get the x and y coordinates for each switch cutout from the KLE raw data?
I would like to import the raw data from KLE to an excel document that i can use with a table driven variable pattern in Solidworks.
In the excel document i would like to get X coordinates in one column and Y coordinates in the next column. And also the rotation data in columns.
Is there any way you could help me with this or at least point me in the right direction of achieving this?
I'm no programmer but i can copy paste and edit code and I'm always interested in learning new stuff.

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2204 on: Sun, 17 March 2019, 17:08:12 »
Hi!
I'm really impressed with your tool and have used it alot!
I'm a CAD user professionally and use solidworks to design keyboards on my spare time.
I''m wondering how you can get the x and y coordinates for each switch cutout from the KLE raw data?
I would like to import the raw data from KLE to an excel document that i can use with a table driven variable pattern in Solidworks.
In the excel document i would like to get X coordinates in one column and Y coordinates in the next column. And also the rotation data in columns.
Is there any way you could help me with this or at least point me in the right direction of achieving this?
I'm no programmer but i can copy paste and edit code and I'm always interested in learning new stuff.
This is absolutely possible, but you will have to get into the open source code a bit to do it. Everything you are looking for is already calculated and stored in the main KAD object.

I am not at a computer right now, but when I have a free few minutes I could write you a program to get you started.

If you want to start looking at it, review the 'Draw()' function in this file. It is the main sequence of operations to build the keyboard. https://github.com/swill/kad/blob/master/kad.go

You care mainly about the state of the KAD.Layout object after the ParseLayout() and maybe the DrawLayout() functions. Parse layout builds all they Key objects and fills in the details about rotations and such. DrawLayout() handles things like absolutely positioned keys and such which may be relevant for you.

Keep in mind that I have a static (I think 10mm) zone which I call the DMZ which is empty space outside the final drawing so the edges are not right against the edge of the artboard (or whatever it is called). Depending on if you want the X and Y to be relative to the top left of the workspace/artboard, then you will likely have to subtract the DMZ values from the coords you have for each switch. Hope that makes sense.

Have a look at the code and get a feel for what you need. If you can send me a few details about what the format of the output you need is, I should be able to get you going with some initial code anyway.

Cheers...

Sent from my ONEPLUS A5000 using Tapatalk


Offline Slavfot

  • Posts: 52
  • Location: Sweden
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2205 on: Mon, 25 March 2019, 06:54:47 »
The coordinates i want should be relative to the top left corner like in KLE.
And i want the coordinate and rotation to be relative to the center of the switch, like in my picture.
I use an sacrificial extrude feature that is being copied with the variable driven table pattern.
This sacrifical feature is being copied and then deleted after all the switch holes have been copied with the pattern.
In the picture you can see the excel document that my CAD program drives the pattern from.
It needs to have every switch on a separate row and the x, y and rotation in columns next to it

Offline abrahamstechnology

  • Posts: 210
  • Location: USA
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2206 on: Fri, 05 April 2019, 07:14:22 »
Update: My plate was too thick, the stabs work perfectly in 1.2mm FR-4 plates.
« Last Edit: Thu, 02 May 2019, 17:06:37 by abrahamstechnology »

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2207 on: Fri, 05 April 2019, 11:41:11 »
I got some plates made using this, but the Alps stabilizer cutouts are too close to the switch and too tall. I have to shove the clips down away from the switch and then tack them down with hot glue, otherwise the wire will rub against the base of the switch. I'm using brand-new Matias stabilizers, and I know the dimensions and kerf is correct as the switches fit in perfectly, and the one Cherry stabilizer I put in works great also.
Thanks for the feedback. I will review the specs and see what I can do to adapt.

Sent from my ONEPLUS A5000 using Tapatalk


Offline abrahamstechnology

  • Posts: 210
  • Location: USA
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2208 on: Fri, 05 April 2019, 16:03:51 »
I got some plates made using this, but the Alps stabilizer cutouts are too close to the switch and too tall. I have to shove the clips down away from the switch and then tack them down with hot glue, otherwise the wire will rub against the base of the switch. I'm using brand-new Matias stabilizers, and I know the dimensions and kerf is correct as the switches fit in perfectly, and the one Cherry stabilizer I put in works great also.
Thanks for the feedback. I will review the specs and see what I can do to adapt.

Sent from my ONEPLUS A5000 using Tapatalk
Thanks!

Offline abrahamstechnology

  • Posts: 210
  • Location: USA
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2209 on: Wed, 17 April 2019, 16:23:28 »
Is it possible to set a nonstandard switch size (eg 13.5mm*13.5mm?)

Offline azhdar

  • Praise the AZERTY god
  • Posts: 2383
  • Location: France
  • 65% Enlighted
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2210 on: Mon, 06 May 2019, 14:32:06 »
Yes I found my mistake, the key is stepped. I forgot to add that into KLE.


Code: [Select]
["¬\n`","!\n1","\"\n2","£\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"Enter"],
[{w:1.25,w2:1.75,l:true},"Caps Lock",{x:0.5},"A","S","D","F","G","H","J","K","L",":\n;","@\n'","~\n#"],
[{w:1.25},"Shift","|\n\\","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift"],
[{w:1.5},"Ctrl","Win",{w:1.5},"Alt",{a:7,w:7},"",{a:4,w:1.5},"Win","Menu",{w:1.5},"Ctrl"]

I'll make final verifications but it seems OK now.
Show Image


Thanks Swill !

Follow up question.
What kind of stabs am I supposed to use with the plate above?
I have stabs like this one :


It seems it's not the right kind for the plate designed above.

Offline azhdar

  • Praise the AZERTY god
  • Posts: 2383
  • Location: France
  • 65% Enlighted
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2211 on: Thu, 09 May 2019, 05:17:31 »
anyone ?

Offline abrahamstechnology

  • Posts: 210
  • Location: USA
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2212 on: Sat, 11 May 2019, 09:32:09 »
anyone ?
Those should work for the spacebar.

Offline azhdar

  • Praise the AZERTY god
  • Posts: 2383
  • Location: France
  • 65% Enlighted
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2213 on: Fri, 17 May 2019, 02:42:23 »
anyone ?
Those should work for the spacebar.

I'll try again but that didn't seem to be the case.

So what are those Alps (Costar Fallback) Stabilizers ?

Offline hasu

  • Posts: 2993
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2214 on: Fri, 17 May 2019, 16:05:53 »
anyone ?
Those should work for the spacebar.

I'll try again but that didn't seem to be the case.

So what are those Alps (Costar Fallback) Stabilizers ?

We have source code fortunately! As comment says it draws Costar stab hole instead of Alps when it doesn't know stab offset for a key.

https://github.com/swill/kad/blob/e59f378cdbe7243088890ebbac429c2070af67fe/key.go#L405-L407

You can find known offsets for Alps here and offset for your 7u space bar is not available. So the tool draws Costar stab for the key. This is how "fallback" works.

https://github.com/swill/kad/blob/e59f378cdbe7243088890ebbac429c2070af67fe/key.go#L79-L95


Alps stablizer hole design for space bar can vary depending on manufacturer of your key stabilizer, not one design fits for all. You will have to draw for cylinder guide part yourself with CAD software. You may want to check this thread for Alps plate.
https://geekhack.org/index.php?topic=82916.150

« Last Edit: Fri, 17 May 2019, 16:07:25 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline ideus

  • * Exalted Elder
  • Posts: 7654
  • Location: In the middle of nowhere.
  • Björkö.
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2215 on: Mon, 02 September 2019, 11:17:05 »
Is the builder tool off-line?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 3484
  • Location: England
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2216 on: Mon, 02 September 2019, 14:25:25 »
Is the builder tool off-line?
Can't access it here either so looks like it is.
                               
Ducky Zero, MX Reds    JD40, Jailhouse Blues           GH60
Soarer controller

Offline gipetto

  • Posts: 53
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2217 on: Sun, 08 September 2019, 04:43:35 »
I don't know has anyone posted this before but I ran into difficulty with the importing the plate files into ponoko, which demands blue line art and 0.01 width. Ponoko recommends the files be edited by hand in graphics software which is tedious and non libre. Inkscape will not work either.

I found a workaround which is to save the files as svg type and edit them via text editor, search replace black with blue and 0.05000 with 0.01000, save each file and that's it.

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2218 on: Sun, 08 September 2019, 10:17:45 »
I don't know has anyone posted this before but I ran into difficulty with the importing the plate files into ponoko, which demands blue line art and 0.01 width. Ponoko recommends the files be edited by hand in graphics software which is tedious and non libre. Inkscape will not work either.

I found a workaround which is to save the files as svg type and edit them via text editor, search replace black with blue and 0.05000 with 0.01000, save each file and that's it.
Hey gipetto,
I actually added a feature to the builder specifically to handle their requirements.

You can use the Line Color feature to output the line color as blue.
http://builder-docs.swillkb.com/features/#line-color

You can use the Line Weight feature to specify the line weight.
http://builder-docs.swillkb.com/features/#line-weight

Let me know if you have additional questions.  Cheers...

Sent from my ONEPLUS A5000 using Tapatalk


Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2219 on: Sun, 08 September 2019, 10:23:59 »
I don't know has anyone posted this before but I ran into difficulty with the importing the plate files into ponoko, which demands blue line art and 0.01 width. Ponoko recommends the files be edited by hand in graphics software which is tedious and non libre. Inkscape will not work either.

I found a workaround which is to save the files as svg type and edit them via text editor, search replace black with blue and 0.05000 with 0.01000, save each file and that's it.
Hey gipetto,
I actually added a feature to the builder specifically to handle their requirements.

You can use the Line Color feature to output the line color as blue.
http://builder-docs.swillkb.com/features/#line-color

You can use the Line Weight feature to specify the line weight.
http://builder-docs.swillkb.com/features/#line-weight

Let me know if you have additional questions.  Cheers...

Sent from my ONEPLUS A5000 using Tapatalk
Oh, one more thing. I don't remember how ponoko handles kerf, but be sure to check. If I remember correctly, cutting acrylic usually has a substantial kerf and can really mess with the fit of parts like switches if not properly accounted for. I would recommend contacting ponoko and getting a clear understanding if they account for kerf in their process, or if you need to specify their kerf into the tool so the builder can account for the kerf. Hope that is helpful.

Sent from my ONEPLUS A5000 using Tapatalk


Offline psyduck200

  • Posts: 4
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2220 on: Mon, 07 October 2019, 03:02:33 »
Hi swill, thanks for making such an incredible open source tool for users. It is incredibly useful for newbies.  ;D

Just wanna ask about the mount holes part in the CAD details. Is it possible to move those holes to another location instead of having them around the edges of a plate?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 3484
  • Location: England
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2221 on: Mon, 07 October 2019, 04:45:48 »
Just wanna ask about the mount holes part in the CAD details. Is it possible to move those holes to another location instead of having them around the edges of a plate?

You would need to select case type 'none' to remove the side slots and holes used on a standard 60% then use the 'Custom Polygons' section to add holes wherever you want them :)
                               
Ducky Zero, MX Reds    JD40, Jailhouse Blues           GH60
Soarer controller

Offline psyduck200

  • Posts: 4
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2222 on: Mon, 07 October 2019, 05:30:50 »
@suicidal_orange

ah i see. i'll give it a try, thanks!

Offline xiaoquana

  • Posts: 7
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2223 on: Sun, 15 December 2019, 06:24:39 »
Hi swill, sorry to bother you , but your site seems to lay down , i can not open it .

Offline joeym

  • Posts: 17
  • Location: Berlin, Germany
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2224 on: Tue, 17 December 2019, 01:02:38 »
god I love this tool and thank you very much for providing it.

it looks like http://builder.swillkb.com/ is down and I did not have success building kad for myself (I added a ticket but suspect I am doing it wrong.) At any rate can anybody give me any help here?

Offline PancakeMSTR

  • Posts: 477
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2225 on: Sun, 05 January 2020, 13:19:00 »
How can I draw a circle, or some otherwise arbitrary geometry, INSIDE the cutout holes for the switches? Is it possible at all?
   

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2226 on: Sun, 05 January 2020, 13:31:42 »
What is the intention of drawing a geometry inside an area that will be waste in the resulting cutout?

I think I need more info to be able to help you find a solution to this.

Sent from my ONEPLUS A5000 using Tapatalk


Offline PancakeMSTR

  • Posts: 477
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2227 on: Sun, 05 January 2020, 14:17:16 »
What is the intention of drawing a geometry inside an area that will be waste in the resulting cutout?

I think I need more info to be able to help you find a solution to this.

Sent from my ONEPLUS A5000 using Tapatalk

Kinda hard to explain.

The simple answer is that I'm not actually cutting plates, but using the dxf files from swill KB to locate keycap models I've created in fusion 360.

Long explanation: I made some keycaps in fusion 360, and I locate them by importing a swillKB dxf plate and creating rigid joints between (sets of) keycaps and corresponding cutouts on the switchplate. Works great, and  your tool is invaluable.

Problem is, that once I create the joints between the keycaps and the dxf plate in Fusion, the keycaps become rigidly pinned to the ground and I can't move them (at least, as far as I can tell).

To deal with this problem, I tried creating a mesh surface from the switchplate, which works, except for some reason fusion won't let me create joints between the keycap bodies and the center of the switch cutouts. Don't ask.

So the next thing I tried was creating surfaces from each of the cutouts (so, basically, the inverse of what I was doing above) and then joining the keycaps to them. This works, except it creates literally like a hundred little surfaces (one for each switch cutout), and clutters up my model.

So what I want to be able to do is make a circle in the center of each switch cutout that is continguous with the rest of the plate, so that I can locate the keycaps to these center points and only create one surface.

So, basically, what I'm trying to do is make each switch cutout look something like this: https://imgur.com/rvlWsLv
   

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2228 on: Mon, 06 January 2020, 22:25:59 »
So it turns out that the implementation as it was did not allow for any custom polygons to be drawn inside the cut lines.  Basically, the cut lines always took precedence regardless if they were switch/stabilizer or custom polygons.  I actually did this on purpose so people couldn't accidentally have a custom polygon interfere with the defined switch cutouts.  Because the usage of the tool has evolved a lot since I originally developed it, I don't think this assumption is valid anymore.

I have made an update to the draw logic to essentially establish all of the plate/switch/stabilizer elements, and then have the custom polygons applied to the resulting drawing.  I think is is likely how people expect the functionality works anyway, so I think this will make it more intuitive to work with.

So, in order to create the shape you are showing in your image, you can do the following.

So if we take a normal layout like this Poker Layout:
Code: [Select]
["~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\"],
[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"],
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift"],
[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl"]

We can add the following 3 custom polygons:
233146-0

We then configure the centers to be [0,0] and the appropriate diameter, width and height as needed:
233148-1

Notice that we have not specified any values in the relative to field.  By not specifying this field, the polygons are only defined, but are not actually specified to be drawn anywhere.  Instead of drawing them explicitly, we are defining them so they can be placed in relation to the center of the switch cutout/position.  This is done by specifying a metadata object for each key you are drawing.

For more details about how to work with custom polygons, check the following docs:

Essentially, the following code modifies the first row of switches to apply the custom polygons with index "0,1,2" (defined above).
Code: [Select]
[{_c:"0,1,2"},"~\n`",{_c:"0,1,2"},"!\n1",{_c:"0,1,2"},"@\n2",{_c:"0,1,2"},"#\n3",{_c:"0,1,2"},"$\n4",{_c:"0,1,2"},"%\n5",{_c:"0,1,2"},"^\n6",{_c:"0,1,2"},"&\n7",{_c:"0,1,2"},"*\n8",{_c:"0,1,2"},"(\n9",{_c:"0,1,2"},")\n0",{_c:"0,1,2"},"_\n-",{_c:"0,1,2"},"+\n=",{_c:"0,1,2",w:2},"Backspace"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\"],
[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"],
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift"],
[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl"]

Which results in the following drawing:
233150-2

You will notice that all the custom polygon that are specified as Add (or Cut) will be unioned together to make a different complex polygon.  You can actually union together both Add and Cut operations to produce very interesting shapes.

Let me know if this covers your use case.

Cheers...

What is the intention of drawing a geometry inside an area that will be waste in the resulting cutout?

I think I need more info to be able to help you find a solution to this.

Sent from my ONEPLUS A5000 using Tapatalk

Kinda hard to explain.

The simple answer is that I'm not actually cutting plates, but using the dxf files from swill KB to locate keycap models I've created in fusion 360.

Long explanation: I made some keycaps in fusion 360, and I locate them by importing a swillKB dxf plate and creating rigid joints between (sets of) keycaps and corresponding cutouts on the switchplate. Works great, and  your tool is invaluable.

Problem is, that once I create the joints between the keycaps and the dxf plate in Fusion, the keycaps become rigidly pinned to the ground and I can't move them (at least, as far as I can tell).

To deal with this problem, I tried creating a mesh surface from the switchplate, which works, except for some reason fusion won't let me create joints between the keycap bodies and the center of the switch cutouts. Don't ask.

So the next thing I tried was creating surfaces from each of the cutouts (so, basically, the inverse of what I was doing above) and then joining the keycaps to them. This works, except it creates literally like a hundred little surfaces (one for each switch cutout), and clutters up my model.

So what I want to be able to do is make a circle in the center of each switch cutout that is continguous with the rest of the plate, so that I can locate the keycaps to these center points and only create one surface.

So, basically, what I'm trying to do is make each switch cutout look something like this: https://imgur.com/rvlWsLv
« Last Edit: Mon, 06 January 2020, 22:33:42 by swill »

Offline PancakeMSTR

  • Posts: 477
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2229 on: Tue, 07 January 2020, 00:21:29 »
****in A. That looks like just what I need, I'll get back to you if I have any issues. Let me just say - it's creators like you that make this community awesome. I thought you might have been out there adding support for this to swillkb (not that that was necessarily my intention), but I didn't want to hold my breath.

Awesome. Thank you.
   

Offline PancakeMSTR

  • Posts: 477
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2230 on: Wed, 08 January 2020, 21:27:12 »
Any idea why it's doing this?

Code: [Select]
[{_c:"0,1,2"},{_c:"0,1,2",x:1},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2",x:0.5},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2",x:0.5},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2",x:0.25},{_c:"0,1,2"},{_c:"0,1,2"}],
[{_c:"0,1,2",y:0.5},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_s:0,_c:"0,1,2",w:2},{_c:"0,1,2",x:0.25},{_c:"0,1,2"},{_c:"0,1,2"}],
[{_c:"0,1,2",w:1.5},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2",w:1.5},{_c:"0,1,2",x:0.25},{_c:"0,1,2"},{_c:"0,1,2"}],
[{_c:"0,1,2",w:1.75},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_s:0,_c:"0,1,2",w:2.25},"Enter"],
[{_s:0,_c:"0,1,2",w:2.25},"Shift",{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_c:"0,1,2"},{_s:0,_c:"0,1,2",w:2.75},"Shift",{_c:"0,1,2",x:1.25}],
[{_c:"0,1,2",w:1.25},{_c:"0,1,2",w:1.25},{_c:"0,1,2",w:1.25},{_s:0,_c:"0,1,2",a:7,w:6.25},"",{_c:"0,1,2",a:4,w:1.25},{_c:"0,1,2",w:1.25},{_c:"0,1,2",w:1.25},{_c:"0,1,2",w:1.25},{_c:"0,1,2",x:0.25},{_c:"0,1,2"},{_c:"0,1,2"}]
   

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2231 on: Wed, 08 January 2020, 22:32:25 »
I am not sure what you are referring to by "this". Can you describe what you expect and how the results differ from your expectation.

A couple things I notice:
- you are assuming there are 3 custom polygons in the key definition, with indexes "0,1,2", but you only appear to have 2 polygons defined.
- you have set the "relative to" field to [0,0], which defines a point relative to the center of the plate. I suspect that you want to leave that blank in order to not draw those shapes on the plate (in the global coordinate system) and passively specify the "relative to" coordinates based on the switch centers by using the metadata for the different switches.

Do my points make sense?  Did I answer your question?

Sent from my ONEPLUS A5000 using Tapatalk


Offline PancakeMSTR

  • Posts: 477
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2232 on: Thu, 09 January 2020, 11:13:14 »
My bad,
I'm referring to this strange geometry it decided to draw on one of the cutouts. I've circled it in the image I attached to this comment.

Oh damn, you're right, it's probably that I specified [0,0]. I bet you that's the problem.

Sorry for not being super clear with my first question.

   

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2233 on: Thu, 09 January 2020, 12:42:47 »
Yes, the problem is that you specified the "relative to" field to [0,0], which will draw the polygon at the center of the board.  If you specify a "relative to" set of coordinates, it will draw the polygons globally at those coordinates (relative to the center [0,0] point on the board).  If you leave the "relative to" field blank, the polygons won't be drawn on the board unless you specify a {_c:"index"} metadata element for a key, at which point the center point of that key will be the new [0,0] reference point.

I hope that helps.  Again, it is likely useful to review the documentation if you have questions.
http://builder-docs.swillkb.com/features/#plate-layout
http://builder-docs.swillkb.com/features/#custom-polygons

Cheers,

Will

My bad,
I'm referring to this strange geometry it decided to draw on one of the cutouts. I've circled it in the image I attached to this comment.

Oh damn, you're right, it's probably that I specified [0,0]. I bet you that's the problem.

Sorry for not being super clear with my first question.

Offline idolon

  • Posts: 2
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2234 on: Thu, 09 January 2020, 22:43:46 »
I may be completely failing to understand how custom polygons are supposed to work, but I can't get cut polygons to work at all.

My layout looks like this:

Code: [Select]
[{sm:"cherry",a:5},"M1","M2","M3","M4"],
[{y:0.5},"Num Lock","/","*","-"],
["7\nHome","8\n↑","9\nPgUp",{h:2},"+"],
["4\n←",{n:true},"5","6\n→"],
["1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"],
[{w:2},"0\nIns",".\nDel"]

Case type is set to none, and I want to add some slots/holes where the plate should fit into a 3D printed case. Adding polygons works:

233335-0

233337-1

But if I cut the same polygons, nothing gets cut out:

233339-2

Am I doing something wrong?

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2235 on: Fri, 10 January 2020, 06:14:08 »
Let me test. I made some changes to support Pancake's use case. I will need to confirm I didn't break something else.

Sent from my ONEPLUS A5000 using Tapatalk


Offline idolon

  • Posts: 2
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2236 on: Sat, 11 January 2020, 14:03:52 »
It looks like someone else has run into the same issue: https://github.com/swill/kad/issues/19

I can confirm that reverting to 5b444fe and running everything locally works.

Offline abrahamstechnology

  • Posts: 210
  • Location: USA
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2237 on: Thu, 16 January 2020, 11:29:33 »
Is there a way to make cutouts for Omron switches? (13.5mm instead of 14mm)

Offline swill

  • * Elevated Elder
  • Thread Starter
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2238 on: Thu, 16 January 2020, 17:33:12 »
You could do something similar to what PancakeMSTR was doing and specify custom polygons for each switch cutout, and add 1/2 the difference to the appropriate sides with rectangles. It would work, while being a bit hackish.

I need to find some time to review how things are broken with the changes which enabled Pancakes use case.

Sent from my ONEPLUS A5000 using Tapatalk


Offline Gilead_1999

  • Posts: 1
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2239 on: Tue, 28 January 2020, 08:11:20 »
I'm at the step where I'm ready to upload to Ponoko. They require you too set the stroke lines to 0.10, and recommend a kerf of 0.15 before uploading. When I add this to the builder, the Cherry MX cut-outs have dimensions of  13.888 x 13.888. They should be 14 x 14 from what I've read. Should i increase the dimensions to 14.15 x 14.15 to account for the kerf?

Offline Zustiur

  • Posts: 201
Re: NOW OPEN SOURCE!!! swill's plate building tool [builder.swillkb.com]
« Reply #2240 on: Tue, 28 January 2020, 18:37:08 »
Hi Swill,
I've just attempted to use your builder as a way of verifying my manually drawn plate. I see your tool still struggles to handle rotation correctly. It appears to be ignoring the rx and ry values entirely.
Here's my raw code:
["Esc",{x:0.77},"F1","F2","F3","F4",{x:0.76},"F5","F6"],
[{r:12.5,rx:0,ry:0,y:0.25,x:5,f:3},"#\n3"],
[{y:-0.75,x:4},"@\n2"],
[{y:-0.75,x:6},"$\n4"],
[{y:-0.75,x:7},"%\n5","^\n6"],
[{y:-0.75,x:2},"~\n`","!\n1",{x:1},"F"],
[{y:-0.75,x:4},"W"],
[{y:-0.75,x:6},"P"],
[{y:-0.75,x:7},"G",{h:1.25},"{\n["],
[{y:-0.75,x:1.5,w:1.5},"Tab","Q",{x:1},"S"],
[{y:-0.75,x:4},"R"],
[{y:-0.75,x:6},"T"],
[{y:-0.75,x:7},"D"],
[{y:-0.75,x:1.5,w:1.5},"E","A",{x:1},"C",{x:2,h:1.25},"Enter"],
[{y:-0.75,x:4},"X"],
[{y:-0.75,x:6},"V"],
[{y:-0.75,x:7},"B"],
[{y:-0.75,x:1.5,w:1.5},"L Shift","Z",{x:1},"L Alt"],
[{y:-0.75,x:4},"N"],
[{y:-0.75,x:6,h:1.25},"BSpc"],
[{y:-0.5,x:1.5,w:1.25},"L Ctrl",{w:1.25},"M"],
[{r:42.5,rx:0,ry:0,x:10.19,y:0.75,h:2},"Del"],
[{r:42.5,rx:0,ry:0,x:9.19,y:1,h:1.5},"Space"]

In your tool this produces a key placement with miles between the main body of keys and the final two keys. I use rx:0 and ry:0 to reset the measurement to the top left corner, but your tool seems to be continuing it's calculations based purely on x: and y: + the previous row. This also results in an extra U of space between row 0 and row 1.

As a separate note, I don't care for stabilizers, I was just going to use plain square switch holes, but the tool isn't letting me select {_s:0}. I've tried this in three browsers (palemoon which is a firefox spin off, edge and chrome).

There's no urgency on these issues as I was just using it for verification, but I thought you should know of the errors I encountered.