Development version shape library

Having problems with or questions about SheetCam? Post them here.
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Development version shape library

Post by robertspark »

luis lopez wrote: Fri Aug 30, 2019 7:12 am Thank you very much for your great work.
Could you do the whole library shape?
haha... I'll try or see how far I get...

Les the shape dialog, is there a way I can make it bigger, I've had a look at the xrc files (in notepad++), but I didn't see a form size setting (or it wasn't apparent to me)

do you think there may be a way to change this list to a form with PNG images that are clickable?

it may be a bit more of a user friendly GUI (in my opinion).... do I need to look at wxWidgets?
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: Development version shape library

Post by Les Newell »

I have attached an update that has a bigger dialog and you can resize it. If your shape directory contains a file called 'icon.png' it will be used as an icon for that shape. Put the contents of the zip file in your shape plugin directory.
Attachments
update.zip
(2.23 KiB) Downloaded 156 times
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Development version shape library

Post by robertspark »

thanks Les very much, I'll have a play tonight / weekend
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Development version shape library

Post by robertspark »

Les,

That works great
2019-08-30 21_04_03-SheetCam TNG Development - Untitled.png
2019-08-30 21_04_03-SheetCam TNG Development - Untitled.png (6.01 KiB) Viewed 4149 times
Bit of a suggestion :) {some people are never happy.... haha}

When you first select the shape and it appears on the screen, it may be useful (for asthetics .... no other reason) for the shape (icon.png) to appear in the location where the dimensions shapes appear. Given its already within the file there is no object creation overhead to doing this in my opinion..... but it makes it look nice and finishes it off as a selection confirmation.
2019-08-30 21_04_24-Window.png
2019-08-30 21_04_24-Window.png (2.89 KiB) Viewed 4149 times
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: Development version shape library

Post by Les Newell »

That shouldn't be a problem. I'll take a look on Monday.
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Development version shape library

Post by robertspark »

Inscribed Shapes / Circumscribed Shapes:

(3sided)Triangle
(4sided)Square
(5sided)Pentagon
(6sided)Hexagon
(7sided)Heptagon
(8sided)Octogon
(9sided)Nonogon
main.lua
(4.93 KiB) Downloaded 139 times
Interesting question / bug?

AddChoiceControl("inOutShape", "Shape Location", {"Inscribed","Circumscribed"}, "")

It appears that the "text / name" for the control does not appear on screen to the left of the dropdown menu {which is what does occur for "AddNumControl()" functions}
2019-08-31 20_42_35-Window.png
2019-08-31 20_42_35-Window.png (4.2 KiB) Viewed 4140 times
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: Development version shape library

Post by Les Newell »

Rob, is it okay if I include these in the next release?
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Development version shape library

Post by robertspark »

Yes Les, of course, not a problem.

I'll just keep trying to add a few as there are different ways to input the same shape (eg, Triangle, could be an equilateral with just a height and width {which is what shape I'd done), but it could be a right angle with just a height and width.... or it could be a triangle with a width and two angles or a height and two angles, or a height and width with one angle..... I'll just put them all in as individual shape options. say you are trying to cut out a gusset to fit a particular shape it could be measured in many ways.... and a corresponding shape to match those dimensions you have to hand.

:roll:
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: Development version shape library

Post by Les Newell »

The triangular gusset already does most of what you want for triangles. Don't try to go too complicated in one shape. It's all too easy to confuse users with a plethora of options.

For your polygon function I think it may be better to just stick to equal sided polyons. It would probably also be better to use geometry to calculate the sides. The attached version allows any number of sides, though higher numbers get caught by SheetCam's arc recognition and turned into circles :oops:

By the way, have you had any crashing issues when playing with shapes? I am seeing some crashes here and it's taking a bit of work to figure out what is going on.
Attachments
main.lua
(1.27 KiB) Downloaded 129 times
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Development version shape library

Post by robertspark »

Les, not had any crashes. I've only run them on my laptop not the machine outside yet.... but that should not have any problems (i7, 8gb, ssd)

I noticed any shapes with more than 9 sides ended up a circle....
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Development version shape library

Post by David_Lelen01 »

Robert and Les, thanks for all of these generic shapes! They are a huge time saver. I have not had any time yet to try my hand at adding some but hopefully soon. Thanks again!
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Development version shape library

Post by David_Lelen01 »

Finally had a chance to create some commonly used shapes myself. Thought i would upload them in case others would like to use them.

Les, feel free to include them in the next release if you think others may find them useful.
Attachments
shapes.zip
(675.84 KiB) Downloaded 158 times
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: Development version shape library

Post by Les Newell »

I just uploaded a new release. This has the new shapes in it. Thank you.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Development version shape library

Post by David_Lelen01 »

Hey Les,

I'm working on creating some more standard shapes that we seem to use a lot of. I should be done in a few days, so hopefully they will be finished in time / be useful for the stable release coming up... if you would like to include them. Just wanted to give you a heads up.
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Re: Development version shape library

Post by Les Newell »

Awesome. That would be great.
Post Reply