Author Topic: Point List Step Around Geometry FAIL  (Read 201 times)

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Point List Step Around Geometry FAIL
« on: July 05, 2021, 18:40:53 pm »
In this thread https://cambamcnc.com/forum/index.php?topic=9216.0 I discovered what may well be a bug in the Draw > Point List > Step Around Geometry function.  It fails to complete the creation of points to the full extent of the geometry.  It could be an isolated issue with this particular polyline or it could be a larger problem, but it does appear to be a failure to perform as expected. 

In the image below you can see two examples of results.  In one you can see the typical CamBam failure with regards to arcs in dimensions other than XY.  This was expected behavior.  The other uses a polyline with arcs removed.  (made up of tiny line segments)  As you can see the point list did not complete the step around geometry.  The points that were created do appear to be in the expected and desired locations.

The CB file is also attached. 
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: 4739
    • View Profile
Re: Point List Step Around Geometry FAIL
« Reply #1 on: July 05, 2021, 19:17:42 pm »
I think the, Draw > Point List > Step Around Geometry, function is working okay because if the last point of the polyline is closer than your step value then it will not add that last point.
Using, Draw > Point List > Divide Geometry, will add the last point but it becomes more difficult to decide upon the number of points to get the required step size.

"Divide Geometry    
Evenly divides a selected shape into a given number and inserts a point at each division.

This is useful for generating a bolt hole pattern.

Step Around Geometry    
Inserts a point at given distances around a selected shape."
Made in England

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8449
    • View Profile
Re: Point List Step Around Geometry FAIL
« Reply #2 on: July 05, 2021, 19:33:37 pm »
So, Eddy,
Will just reducing the step distance solve that?  Or, will it always be a problem on the 'last step'?

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4739
    • View Profile
Re: Point List Step Around Geometry FAIL
« Reply #3 on: July 05, 2021, 19:35:34 pm »
I think the last step will always be a problem if;  polyline length / step size = non integer value

When I wrote the Polyline Smooth plugin I made sure that the final point was added even if the step size dictated otherwise.
It's possible to use that plugin for Bob's idea but the points collection for the polyline would have to be copy/pasted into the points collection of a new Pointlist.

I suppose I could add that option to the plugin.
« Last Edit: July 05, 2021, 19:39:56 pm by EddyCurrent »
Made in England

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #4 on: July 05, 2021, 19:41:33 pm »
I think the, Draw > Point List > Step Around Geometry, function is working okay because if the last point of the polyline is closer than your step value then it will not add that last point.
Using, Draw > Point List > Divide Geometry, will add the last point but it becomes more difficult to decide upon the number of points to get the required step size.

"Divide Geometry    
Evenly divides a selected shape into a given number and inserts a point at each division.

This is useful for generating a bolt hole pattern.

Step Around Geometry    
Inserts a point at given distances around a selected shape."

The one that fails is a polyline made of tiny line segments.  There are no arcs, so it must maintain a series of nodes around the visible arc where it has failed.  I explained the basics of this in the previous post, but here is a screen shot to illustrate the point. 

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: 4739
    • View Profile
Re: Point List Step Around Geometry FAIL
« Reply #5 on: July 05, 2021, 19:49:01 pm »
Yes I saw that but it's a different issue and as yet I can't explain it. The pointlist seems to think it's reached the end of the polyline.
« Last Edit: July 05, 2021, 19:50:33 pm by EddyCurrent »
Made in England

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #6 on: July 05, 2021, 19:56:52 pm »
Yes I saw that but it's a different issue and as yet I can't explain it. The pointlist seems to think it's reached the end of the polyline.

I may be an anomalous issue related to the number of decimal places in the embedded mathematical functions as we have seen in some other orphaned instances.  I have used a few more practical polylines more related to the project I am working on and so far not duplicated the failure.  If I do I will post screenshots back into this thread.  In any case I do believe its a bug.  Possibly a rare bug, but a bug nonetheless. 
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: 4739
    • View Profile
Re: Point List Step Around Geometry FAIL
« Reply #7 on: July 05, 2021, 20:03:23 pm »
In the example cb file you attached there is polyline 6 and polyline 4, both appear to be identical other than the number of points. However when I used the CBubble plugin; http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/CBubble.html it reports that polyline 6 has a perimeter of 7.54 while polyline 4 has a perimeter of only 7.25

Polyline 6 has been transformed and still has the transform parameters while polyline 4 has been reset to "identity"
« Last Edit: July 05, 2021, 20:07:25 pm by EddyCurrent »
Made in England

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #8 on: July 05, 2021, 20:12:10 pm »
That is a good thought. I will select apply transformations and see if that affects the results.  I had forgotten that sometimes if transformations are not applied cambam acts on the original geometry and position rather than the current geometry and position.
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 Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #9 on: July 05, 2021, 20:28:37 pm »
I should have remembered, but I was already working on the real application. 

The one that fails unexpectedly in an unexpected manner is not transformed.  It is at identity and is made of line segments. 

The one that is made of arc segments fails in a predictable and known manner due to CamBam's inability to manage arcs other than in a flat XY orientation.  It is irrelevant, and I probably should not have even shown it in my example.  We knew it would fail in the manner shown before even trying to use it.  A shortcoming I discovered when I first started using CamBam many years ago. 

« Last Edit: July 05, 2021, 20:32:15 pm by Bob La Londe »
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 Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #10 on: July 05, 2021, 20:52:56 pm »
Duplicate failure.  Different polyline. 
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 dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6489
    • View Profile
    • Cambam V1.0 French Doc
Re: Point List Step Around Geometry FAIL
« Reply #11 on: July 05, 2021, 21:50:32 pm »
Hello

On your first example, if I rotate polyline 4 so it is on the XY plane, there is no problem with divide geometry.

Maybe this function is not done to be used on another plane than XY.

++
David

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #12 on: July 05, 2021, 22:14:09 pm »
That is possible. 

I found the work around as situated was to break the polyline and step around the missing segment, then join the two point lists.
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 dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6489
    • View Profile
    • Cambam V1.0 French Doc
Re: Point List Step Around Geometry FAIL
« Reply #13 on: July 05, 2021, 22:35:43 pm »
On the polyline 4, if I "invert" the polyline, the missing points are at the other end ...

I tried to move the polyline so all its points are above Z0, but no change.

seems to be not dependent of the step given in the divide geometry ... same result with a step of 0.2 ...

And with divide geometry by N points, this works on the polyline oriented verticaly (XZ), but the step between points is not constant along the line (but is constant along X)

++
David
« Last Edit: July 05, 2021, 22:41:10 pm by dh42 »

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4117
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Point List Step Around Geometry FAIL
« Reply #14 on: July 06, 2021, 01:33:29 am »
Thank you.  In any case.  Starting with the polyline flat is not an issue.  I can rotate it into location after creating point list and converting point list to polyline.  Well, for this application rotate the original poly to flat, and the new poly to vertical. 

« Last Edit: July 06, 2021, 02:24:13 am by Bob La Londe »
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