View Issue Details

IDProjectCategoryView StatusLast Update
0002883PathBugpublic2017-08-13 15:20
Reportermlampert Assigned Tosliptonic  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformallOSallOS Versionall
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002883: Contour produces wrong path depending on direction (CW vs. CCW)
DescriptionContour generates a wrong Path for the attached part. As others have found playing with the precision "fixes" the issue.

As it turns out Contour and Profile generate the same wrong path if the direction is CW, and both generate the correct path if the direction is CCW.

An initial guess is that due to rounding errors one edge doesn't get flipped when it should be, or vice versa.
Additional Informationdiscussion: https://forum.freecadweb.org/viewtopic.php?f=15&t=20341
TagsNo tags attached.
FreeCAD Information

Activities

mlampert

2017-01-30 18:54

developer  

contour.fcstd (14,145 bytes)

Kunda1

2017-05-31 04:19

administrator   ~0009212

@realthunder do you mind weighing in on this?

realthunder

2017-05-31 08:28

developer   ~0009214

When talking about CW vs. CCW, we should take the viewing direction into consideration. For CNC, we normally assumes that we are viewing against the Z+ direction. But the underlying geometry in FC may not always agree with this assumption. In fact, it is very hard to directly control the desired orientation of the underly geometry in FC, or more specifically, in OpenCascade. And it is further complicated by the existence of outer and inner wires (hole).

I have a recent patch of Path.Area to deal with this. In the new Path.fromShapes(), there is a parameter called 'orientation' to control the loop direction. 0 means normal, 1 means reversed. 'Normal' orientation means CCW regarding the face/wire surface normal, and 'reversed' means CW. If you pass in shapes generated by Path.Area or Path.FeatureArea, then the face/wire surface normal is auto adjusted to point to Z+ direction. For other shapes, you'll have to adjust the surface normal yourself.

You can find my further explanation at https://forum.freecadweb.org/viewtopic.php?f=15&t=20273&start=110#p172731

sliptonic

2017-06-01 16:31

manager   ~0009241

Fixed my migration to PathArea. Implemented for Contour and PathMillFace in PR 755.

Similar problems may still exist for profile and profilefromedges but will be addressed by migrating those operations to PathArea as well.

Kunda1

2017-06-01 18:42

administrator   ~0009242

FreeCAD Pull Request 755

Kunda1

2017-08-13 15:20

administrator   ~0009899

Closing

Issue History

Date Modified Username Field Change
2017-01-30 18:54 mlampert New Issue
2017-01-30 18:54 mlampert File Added: contour.fcstd
2017-05-31 04:19 Kunda1 Note Added: 0009212
2017-05-31 08:28 realthunder Note Added: 0009214
2017-06-01 16:31 sliptonic Assigned To => sliptonic
2017-06-01 16:31 sliptonic Status new => resolved
2017-06-01 16:31 sliptonic Resolution open => fixed
2017-06-01 16:31 sliptonic Fixed in Version => 0.17
2017-06-01 16:31 sliptonic Note Added: 0009241
2017-06-01 18:42 Kunda1 Note Added: 0009242
2017-08-13 15:20 Kunda1 Status resolved => closed
2017-08-13 15:20 Kunda1 Note Added: 0009899