CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 30, 2020, 15:12:54 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Polygon Plugin with angle snapping.  (Read 9460 times)
Rodneyk
Droid
**
Offline Offline

Posts: 62


View Profile
« on: December 17, 2012, 01:00:05 am »

Updated to version 1.3

Donations gladly accepted at https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4DFD56ADQNUS8

The Polygon plugin adds regular polygons to Cambam. It behavies much like the "Add Circle" feature of Cambam but with N Sided Polygons (like an Equalangular triangle, Square, Pentagon,...,trihectahexacontagon).

The plugin adds two buttons to the tool bar. One for configuring the tool and the second for drawing the polygons. The same options are added to the Draw Menu as Polygon Properties and Polygon.

To install the plugin unzip the files and copy them into the plugins directory.
    This is normally found at :
        C:\Program Files (x86)\CamBam plus 0.9.8\plugins.

This plugin was compiled with the RC6 version of Cambam so I don't know if it works with earlier versions. If is does not and enough people want it I will  recompile it for the current version.

Use it at our own risk. It appears stable on my system, but your milage may vary.


Version 1.3Changed icons by popular demand.
Version 1.2Changed code to use only the Left mouse button for create.
Added functionality to make middle button same as ESCape.
Changed behavior so object is selected after creation.
Version 1.1Changed keys to activate plugin : <Alt>+P and <Ctrl>+<Alt>+P.
Added keys to change number of sides while in Add Mode '<' , '>'.
Changed prompt to display number of sides and snap states ("SNAP" = on, "snap"=off).
Changed prompt to show sides.
Updated help file.
Version 1.0Initial Release



* Polygons.PNG (56.01 KB, 920x495 - viewed 509 times.)

* PolyMenu.PNG (13.68 KB, 268x357 - viewed 637 times.)
* Polygon.1.3.zip (40.43 KB - downloaded 645 times.)
« Last Edit: January 13, 2013, 19:42:01 pm by Rodneyk » Logged
blowlamp
CNC Jedi
*****
Offline Offline

Posts: 1183


View Profile
« Reply #1 on: December 17, 2012, 08:20:17 am »

I haven't tried your plugin just yet, but did you know that Ctrl+P is already set up to change objects into polylines?
I'm not sure whether there might be some conflict between the two.

Martin.
« Last Edit: December 17, 2012, 08:22:27 am by blowlamp » Logged
BR52
Wookie
****
Offline Offline

Posts: 333



View Profile
« Reply #2 on: December 17, 2012, 09:56:20 am »

Hi Rodney

Please put your source code here.
For other people know your technique in making plugin, teach and learn how!


          The author will always be yours.

When I make a plugin, I put the source code, I like to teach how to do.

     Armando
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5840



View Profile WWW
« Reply #3 on: December 17, 2012, 19:18:45 pm »

Hello,

Thanks for this plugin  Wink

I found a problem:

- I can't validate the drawing by the middle mouse button, only with the 'enter' key ; if I use the middle button I get the same action that with the left MB (create a new shape).

- If I dbl click on the middle MB, I get a error message from windows

++
David
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 8172



View Profile
« Reply #4 on: December 17, 2012, 19:51:46 pm »

but did you know that Ctrl+P is already set up
-----
Martin, he didn't use that key combination.


YES!  Please publish your source here.  Some of us (me) don't have the skills to dig into the UI, and it looks like you have, and may even have documented it.  <G>

LLoyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5840



View Profile WWW
« Reply #5 on: January 13, 2013, 17:56:13 pm »

Hello,

The update works well, thanks.

If you want, I add 2 pictures in attachment for buttons with the 'Cambam look'

great work
++
David


* PolyDraw.png (3.96 KB, 48x48 - viewed 1205 times.)

* PolyProperties.png (4.03 KB, 48x48 - viewed 1192 times.)
Logged
Rodneyk
Droid
**
Offline Offline

Posts: 62


View Profile
« Reply #6 on: January 13, 2013, 19:42:38 pm »

Updated the green icons. See first post for latest version.
Logged
swarfing
Droid
**
Offline Offline

Posts: 92



View Profile
« Reply #7 on: January 13, 2013, 22:06:08 pm »

Rodney

Works in linux but if i change the number of sides under the properties it does not do anything? Also i can not change the number of sides in the properties window to the left, it just won't allow to enter the box.
Logged
Rodneyk
Droid
**
Offline Offline

Posts: 62


View Profile
« Reply #8 on: January 14, 2013, 00:35:52 am »

Rodney

Works in linux but if i change the number of sides under the properties it does not do anything? Also i can not change the number of sides in the properties window to the left, it just won't allow to enter the box.

I suggest using the hot keys to change the number of sides then.  I don't have linux so cannot really debug it.

I am not sure what you mean by your secdon statement.  The objects created are just polyline, not special polygon object.  Once created it is just a normal polyline object.
Logged
GeoffreyGRoy
Storm Trooper
***
Offline Offline

Posts: 176


View Profile
« Reply #9 on: October 07, 2017, 08:33:30 am »

Is there a new version that works with CamBam 1.0

thanks

Geoff
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 4207



View Profile
« Reply #10 on: October 07, 2017, 10:11:35 am »

Yes, it's here; http://www.cambam.co.uk/forum/index.php?topic=6802.msg55456#msg55456
but I didn't include angle snapping because I found it better to use CamBam's rotation function after the polygon was drawn.
Logged

Made in England
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.162 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap