Author Topic: [Script - Plugin] Flatten  (Read 23323 times)

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7663
    • View Profile
    • Cambam V1.0 French Doc
[Script - Plugin] Flatten
« on: December 23, 2012, 17:22:01 pm »
Hello,

A new very little VBscript.

It set to 0 the Z coordinate of each selected polyline.

Code: [Select]
' aplatir (flatten)
' set all Z values to 0 in selected polylines

sub main

if view.SelectedEntities.Length > 0 then


for each ent as Entity in view.SelectedEntities

if typeof ent is Polyline
ent.Flatten()
end if

next ent

view.RefreshView()

end if

end sub

++
David
« Last Edit: May 02, 2014, 19:32:37 pm by dh42 »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7663
    • View Profile
    • Cambam V1.0 French Doc
Re: [Script - Plugin] Flatten
« Reply #1 on: May 02, 2014, 19:34:09 pm »
Hello,

I just convert my flatten script to a plugin.

I appears in the Edit/polyline menu (main menu)

++
David
« Last Edit: January 05, 2016, 15:45:17 pm by dh42 »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1916
    • View Profile
Re: [Script - Plugin] Flatten
« Reply #2 on: May 02, 2014, 22:56:47 pm »
Thanks David the plugin works nice, Your effort is appreciated.
Dave.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7663
    • View Profile
    • Cambam V1.0 French Doc
Re: [Script - Plugin] Flatten
« Reply #3 on: May 01, 2016, 20:08:17 pm »
Hello,

New version 2.0 of the plugin.

Now it works on all 2D objects (except splines) and it can also flatten the points in a point list as for a polyline, it also move the other 2D objects to Z = 0.

undo is also now supported on this version

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/flatten.html

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7663
    • View Profile
    • Cambam V1.0 French Doc
Re: [Script - Plugin] Flatten
« Reply #4 on: May 02, 2016, 16:48:46 pm »
Re

And the source code (VB .net)

++
David

Offline pelanj

  • Droid
  • **
  • Posts: 71
    • View Profile
Re: [Script - Plugin] Flatten
« Reply #5 on: March 16, 2022, 12:09:08 pm »
I tried to install the flatten plugin, but I seem to have failed. I put the DLL into the plugin folder and restarted CamBam. I cannot find the Flatten option anywhere.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7663
    • View Profile
    • Cambam V1.0 French Doc
Re: [Script - Plugin] Flatten
« Reply #6 on: March 16, 2022, 12:21:05 pm »
Hello

It is located in the "Edit" menu

If you can't find it, maybe it's a "security" problem ; have a look here.

https://cambamcnc.com/forum/index.php?topic=6294.0

++
David

Offline pelanj

  • Droid
  • **
  • Posts: 71
    • View Profile
Re: [Script - Plugin] Flatten
« Reply #7 on: March 16, 2022, 12:26:17 pm »
Thanks a lot!!! It has been a while since I installed any plugins and I forgot this little trick.