Author Topic: In Place Resize plugin  (Read 326 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • View Profile
In Place Resize plugin
« on: September 22, 2020, 20:18:02 pm »
Edit: I rushed to get this posted tonight as I may be away for a few days, so bugs may exist  :D

As a result of this thread; https://cambamcnc.com/forum/index.php?topic=8720.msg69458#msg69458

I thought about a plugin to address some of the issues.
The plugin will resize all selected objects and will ensure the selected "Base point" stays in place following the resize.
It measures the current distance between two points then prompts the user for a final target distance, scale factor is calculated then the objects are scaled accordingly.

Ctrl + Z will Undo the resize if required.

Please download and install the plugin
then download the attached sample cb file and open it
now follow these instructions.

It's best to have "snap to grid" off, the plugin will automatically enable "snap to object" while it is working.

In this example we require the distance between points A and B to be 118mm

1. Select the objects, (circle and shape)
2. Edit->Transform->In Place Resize
3. "Select Base point (A)", this is a point on the objects that will remain in place following the resize
4. choose the centre of the small circle as "Base point"
5. "Select Reference point (B)", this is another point on the objects that is the required distance from Base point
6. Choose the right most tip of the object.
7. A form will appear showing the current length between Base point (A) and Reference point (B)
8. Type the required length into "Target Length" box, enter 118
9. click the OK button
10 the objects have been resized and the Base point has not moved
11. Use Tools->Measure to check the new distance between A and B

Obviously the Centroid of an object or objects can be selected as the "Base point"
« Last Edit: September 22, 2020, 20:26:19 pm by EddyCurrent »
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6211
    • View Profile
    • Cambam V1.0 French Doc
Re: In Place Resize plugin
« Reply #1 on: September 22, 2020, 20:47:47 pm »
Hello

Very nice job and useful plugin ! thanks !!

I often thought to add something like this to the NumMove plugin as a new resize tab .... but I never did it ...  :-*

++
David

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 3988
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: In Place Resize plugin
« Reply #2 on: September 22, 2020, 22:15:29 pm »
Resize with a selectable anchor point is standard in ViaCAD which would address most issues.  VC also allows the origin or overall center as one of the selectable points. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • View Profile
Re: In Place Resize plugin
« Reply #3 on: September 24, 2020, 06:37:25 am »
@David, Attached are the source project files for version 1.0.

If you want to incorporate it into your NumMove plugin that would be fine with me.
« Last Edit: September 24, 2020, 06:41:10 am by EddyCurrent »
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6211
    • View Profile
    • Cambam V1.0 French Doc
Re: In Place Resize plugin
« Reply #4 on: September 24, 2020, 17:14:24 pm »
Hello

thanks ;)

++
David