Author Topic: Making rectangle cut outs in curved polylines, scripting help  (Read 183 times)

Offline Raymond

  • Ewok
  • *
  • Posts: 1
    • View Profile
Making rectangle cut outs in curved polylines, scripting help
« on: December 22, 2021, 06:17:07 am »
Hello You all

Looking for a script to automate a verry boring work.
As you can see, in the cb, file i'm drawing slopes in these curves, but its verry long.

I draw à rectangle crossing all the curves
Find the intersections most far away on one curve
draw a rectangle between these intersections
calculate half of the x size
change the value of the x size of the rectangle.
cut at intersection.
delete the lines witch are too much
Join the rectangle to the polyline.

And the next one, just to the last curve.
delete the first drawn rectangle
draw a new one 50 mm higher

And start all over

I realy don't know how to start scripting this.

Ive tried to use existing scripts but i can't get anything working.

Please give me some clues

Raymond




Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6723
    • View Profile
    • Cambam V1.0 French Doc
Re: Making rectangle cut outs in curved polylines, scripting help
« Reply #1 on: January 17, 2022, 21:32:05 pm »
Hello
Quote
cut at intersection.
delete the lines witch are too much
Join the rectangle to the polyline.

At this point, you can use "subtract" to generate the grove in the source object. (the small rectangle will be removed from the source object) so you do not need to delete/join

++
David