Author Topic: Move multiple points in a polylines  (Read 16705 times)

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Move multiple points in a polylines
« on: May 05, 2015, 16:20:45 pm »
In response to this thread: http://www.cambam.co.uk/forum/index.php?topic=4855.msg36700#msg36700

It allows the user to select and move multiple points in a polyline when editing. Select one or more points with the mouse, select the starting point and the last the end point.

1. Install the dll into your CamBam 'plugins' folder, restart CamBam
2. Draw a polyline, or convert a circle etc. to polylines (it only works with polylines)
3. Select the object so it's highlighted (one object only)
4. In the context menu "Polyline" or the sub-menu "Polyline" in menu "Edit" a new item will appear, "Poly Move Point"
5. Click on "Poly Move Point" or press the shortcut (default F2, can be configured on menu Plugin > MovePoints Config) to run the plugin.
6. You now enter an edit mode "LeftClick to Select/Unselect a point, Ctrl + LeftClick to set the start point, Esc to end"
While in the edit mode you can zoom in or out.
Just click on the points for select or unselect, after press Ctrl + LeftClick for set the start point (reference point for the movement).
7. After setting the start point you move on to the next step of the edit mode "Start point set (X,Y) please select the end point, Esc to end"
8. Click on the view for set the end point of the movement.
9. Just click on the Esc key for done the editing.
10. Now you are back to CamBam


I used part of code of the plugin Add Points ( Node Editing ) To Polylines. Thanks EddyCurrent.

Change log:
  • Version 1.0
    • First version
  • Version 2.0
    • Can define any start point (not only a node of the polyline)
    • Improved the mechanism for select/unselect the points
    • Resolved the problem the crash of CB if runs the plugin on any existing file instead of a new file
    • Added the item "Poly Move Point" to the context menu and menu edit "Polyline"
  • Version 2.1
    • Changed the code for set the start point equal to the end point after move the points.
  • Version 2.2
    • Resolved problem with inches:
      • The plugin checks the drawing unit used on the file
      • Creates a polyrectangle with the width based on the MinorScale defined on the grid info for the select drawing unit
    • Improved the mechanism for move the points
  • Version 3.0
    • Changed the polyrectangle to point list to resolve the problem with zoom-in/zoom-out
    • Added a new item on Menu Plugin (MovePoints Config)
    • Added a shortcut to start the plugin
  • Version 3.1
    • Removed the translation until get ok from users about the stability of the plugin
    • Improved the engine of the selection/unselection and move points
  • Version 3.2
    • Added translation with key PointsMove:TRANSLATE_TEXT

Thank you for your feedback.

Best regards,
Vasco Cruz
« Last Edit: February 23, 2016, 16:35:21 pm by BaNoBi »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4847
    • View Profile
Re: Move multiple points in a polylines
« Reply #1 on: May 05, 2015, 17:59:22 pm »
Good one Vasco, also pleased to be of help  :D
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #2 on: May 05, 2015, 18:39:53 pm »
Hello,

Yet I have not drunk ..! ... but no plugin  ;D

I'll try to remove all other ; maybe incompatibility ?

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #3 on: May 05, 2015, 18:44:51 pm »
No change, no error when loading ... an idea  ???

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #4 on: May 05, 2015, 19:01:22 pm »
tried on XP pro32 bit, W7 64, CB 0.9.8P beta 2 (tested in english and french) ... I try also to re-download the file ... same results .... strange

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4847
    • View Profile
Re: Move multiple points in a polylines
« Reply #5 on: May 05, 2015, 19:06:21 pm »
Try here, right click context menu, 'Poly Move Points'
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #6 on: May 05, 2015, 19:33:26 pm »
Ah ah !!  Yes, I can search a long time in the plugin menu ;D

I've found a bug ; look on the file, one point is not selectable ; if I moves slightly the shape, it works ..

Vasco, it is possible to do that the start point for moving can be anywhere and not necessary on a node ?

++
David

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Re: Move multiple points in a polylines
« Reply #7 on: May 05, 2015, 19:35:53 pm »
Hello,

Yet I have not drunk ..! ... but no plugin  ;D

I'll try to remove all other ; maybe incompatibility ?

++
David
Sorry, my mistake. The new menu entry is on context menu Polyline and the menu edit.

EddyCurrent is correct.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #8 on: May 05, 2015, 19:39:56 pm »
Quote
Sorry, my mistake. The new menu entry is on context menu Polyline and the menu edit.

Ok  ;D .. but for me it is only in the context menu, not in the main edit/polyline menu.

a second bug ; if I run the plugin on any existing file instead of a new file, CB crashes when running the plugin .. (even on a file where the plugin has never been used)

++
David

« Last Edit: May 05, 2015, 19:42:22 pm by dh42 »

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Re: Move multiple points in a polylines
« Reply #9 on: May 05, 2015, 21:33:58 pm »
New version on first topic.

Version 2:
  • Can define any start point (not only a node of the polyline)
  • Improved the mechanism for select/unselect the points
  • Resolved the problem the crash of CB if runs the plugin on any existing file instead of a new file
  • Added the item "Poly Move Point" to the context menu and menu edit "Polyline"

Thank you for your feedback.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #10 on: May 05, 2015, 21:48:29 pm »
Hello,

Yes, better  ;D

It do strange things if we click more that one time to place the second point ....
(I think that the offset is added to the last click position instead to the start point position)

Ex: point to move is at 0,0 ; start point clicked at 0,0 too

2nd click at 10,0 -> OK the point jump to 10,0
3rd click at 20,0 -> Wrong, the point jump to 30,0

++
David

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Re: Move multiple points in a polylines
« Reply #11 on: May 05, 2015, 22:05:55 pm »
It do strange things if we click more that one time to place the second point ....
(I think that the offset is added to the last click position instead to the start point position)

Yes, it is wrong. I need change the start point to the end point after move the points.

New version 2.1 on the first topic.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #12 on: May 05, 2015, 22:17:31 pm »
Good ... but it seems I've a trick to find bug today !!  ;D

look on the picture, the selected point can't be moved ..  ???

same that previous, if you move slightly the shape, that works

++
David
« Last Edit: May 05, 2015, 22:19:12 pm by dh42 »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: Move multiple points in a polylines
« Reply #13 on: May 05, 2015, 22:24:19 pm »
And maybe inches users while have some problem  ;) (4x3 inch for the part)

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Re: Move multiple points in a polylines
« Reply #14 on: May 06, 2015, 08:40:07 am »
New version 2.2 on the first post.

  • Resolved problem with inches:
    • The plugin checks the drawing unit used on the file
    • Creates a polyrectangle with the width based on the MinorScale defined on the grid info for the select drawing unit
  • Improved the mechanism for move the points