Interrupted profile path on the outside; ok on the inside

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
newyd_cnc
Junior Member
Posts: 22
Joined: Thu Feb 02, 2023 6:06 pm

Interrupted profile path on the outside; ok on the inside

Post by newyd_cnc » Sat Jul 01, 2023 12:07 pm

Hello all,
this should be an easy one...

I ihave created a panel profile to be cut with a CNC router. The shape is defined by arcs, lines and splines which are converted to polyline. This defines a closed loop profile to be cut.
If I ask for an inside profile, that works perfectly fine.
If I select an outside profile (my preferred opiion in this case) the profile stops somewher along the path. Any idea why?
Thank you
inside.png
inside.png (14.1 KiB) Viewed 9447 times
outside.png
outside.png (11.07 KiB) Viewed 9447 times

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Interrupted profile path on the outside; ok on the inside

Post by CVH » Sat Jul 01, 2023 7:32 pm

newyd_cnc wrote:
Sat Jul 01, 2023 12:07 pm
the profile stops somewher along the path. Any idea why?
Probably the same issue as here:
https://www.qcad.org/rsforum/viewtopic. ... 105#p41176

Without the file in question we can't be sure. :wink:

Can you create a perfect offset of the polyline in question with the OQ tool?
And that while referring to it at several random places?
One can always undo that/those action(s).
Remark that the preview of the offset may be partial.

You should be able to 'repair' the polyline at those positions like KHE did.
It may be difficult/impossible without the original shapes.

Regards,
CVH

newyd_cnc
Junior Member
Posts: 22
Joined: Thu Feb 02, 2023 6:06 pm

Re: Interrupted profile path on the outside; ok on the inside

Post by newyd_cnc » Sun Jul 02, 2023 1:01 am

Thank you,
here is the problematic file.

When an inner CAM path is chosen it works perfectly. When asked to do an outside profile it does not work.
Could you try and see whether you can spot the problem?
Thank you
Lorenzo
P.S see dxf in attachments
Attachments
path_problem.dxf
(332.99 KiB) Downloaded 286 times

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Interrupted profile path on the outside; ok on the inside

Post by CVH » Sun Jul 02, 2023 6:56 am

Lorenzo,
The problem zone was at the upper left and right 90 degree arcs.
Connected to those where two arc-segments with a large radius and a small sweep.
They are not perfectly symmetrical but none of the arcs from both the splines do ... BiArc fitting is not done optimized.

Another problem sits at index 36-37-38, that are 3 vertices at the same spot or 2 zero-length segments.
This is solvable with 'Normalise Polylines' (ON).

Trying to set an outer offset with OQ at 1unit resulted in multiple warnings 'Result loop not closed'.

Fix it a bit:
newyd_cnc-poly.dxf
(99.84 KiB) Downloaded 285 times

Here your base poly is logical closed and OQ will return both inner and outer 1unit or 3units offset as a perfectly closed polyline.
But with stepping through the polyline with the vertex index you might remark that those two arcs don't connect tangentially anymore. :?
Listed as Index - connection angle:
  • 7 - 179.99312054
    8 - 180.00687946
    62 - 179.99892531
    63 - 180.00968525
    0 - 179.99138944
It is thus not a perfect solution.
For that I need the original arcs, lines and splines before you exploded, trimmed and merged them into one polyline.
And then, it can still be a battle ... :roll:

Regards,
CVH

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Interrupted profile path on the outside; ok on the inside

Post by CVH » Sun Jul 02, 2023 3:12 pm

Lorenzo,

I investigated your problem in detail ...
PathProblem2.dxf
(128.46 KiB) Downloaded 267 times
You need to zoom in on the area with issues to see the details. :wink:
One can hide or freeze, un-hide or thaw layers at will.

The 90 degree arc and the next one where not connected tangentially.
At index 7 a connection angle of 180.68397883 is reported.
The angle between the sector sides (blue/cyan) is indeed about 0.683979 degrees.
Exploded the intersection of the two arc segments can no longer be indicated with snapping to intersections.
Nevertheless that they both ended in the same node point.

The offset shapes both end perfectly at the elongated sector sides and we actually can see them crossing in high zoom.
Still, there is no intersection reported when trying to snap to it.

When we draw circles instead of arcs then these are reported (yellow) to intersect about 0.31024 units to the left of where we expect it.
These circles are considered internally tangent within some (relative) tolerance, so the point of intersection is on a line through both centers.
This center line will indeed cross the smaller circle where the intersection of the circles is reported.

Tolerance = (1341.35667735 + 26) / 200000 = 0.00683678
... https://github.com/qcad/qcad/blob/maste ... .cpp#L1068
This seems rather small but R1 - R2 = 1315.35667735 and that matches with the distance between centers within the tolerance.
The relative tolerance is already better for small arcs ... https://www.qcad.org/rsforum/viewtopic. ... 907#p34907
With these radii it is just not strict enough.

Bottom line: The Math fails, there is no intersection point that is near enough to be considered valid and the offset of the polyline fails.
QCAD/CAM will only process the offset shape partially until it is not connected to anything else.

Regards,
CVH

Post Reply

Return to “QCAD/CAM”