View Issue Details

IDProjectCategoryView StatusLast Update
0002753PathBugpublic2016-11-14 18:58
Reportermlampert Assigned Tosliptonic  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformallOSallOS Versionall
Product Version0.17 
Summary0002753: Profiling operation produces wrong path
DescriptionGiven a part where the base is not constructed of a single face the Profile operation can generate wrong paths (see attached example).
Steps To ReproduceCreate a base body, attach "limbs" to it, create a job with the part as Base and generate a profile for it.
TagsNo tags attached.
FreeCAD Information

Activities

mlampert

2016-10-28 05:38

developer  

contour.fcstd (25,303 bytes)

sliptonic

2016-10-28 14:45

manager   ~0007431

The contour operation uses a helper function in Pathutils called silhouette() which in turn calls TechDraw.findOuterWire()

It seems to be that function that isn't returning the correct shape.

mlampert

2016-10-29 03:47

developer   ~0007432

Verified sliptonic's assertion, for the attached example the returned wire has the following edges:

   (30.00, -30.00, 0.00) -> (-30.00, -30.00, 0.00)
   (30.00, 30.00, 0.00) -> (30.00, -30.00, 0.00)
   (10.00, 30.00, 0.00) -> (30.00, 30.00, 0.00)
   (10.00, 30.00, 0.00) -> (10.00, 30.00, 5.00)
   (10.00, 30.00, 5.00) -> (-10.00, 30.00, 5.00)
   (-10.00, 30.00, 5.00) -> (-10.00, 30.00, 0.00)
   (-30.00, 30.00, 0.00) -> (-10.00, 30.00, 0.00)
   (-30.00, 10.00, 0.00) -> (-30.00, 30.00, 0.00)
   (-30.00, -10.00, 0.00) -> (-30.00, 10.00, 0.00)
   (-30.00, -30.00, 0.00) -> (-30.00, -10.00, 0.00)

wandererfan

2016-10-29 13:11

manager   ~0007433

What is passed to EdgeWalker, please? If it is the whole 3D shape your results will be suspect due to the number of alternate paths. Is it a projection of the 3D shape to get a planar figure? If so, we may need to add the logic from TechDraw that finds all the missing edge intersections in a projection. In a projection, your ears do not have intersections with the side lines.

sliptonic

2016-10-29 15:19

manager   ~0007434

PathContour is passing the whole 3D shape. The silhouette helper in PathUtils is just turning around and calling the findOuterWire() but it should be changed to do the projection and pass it.

However, I tested by hand, creating a Shape2DView and passing it to silhouette and got the same results. That is, it gives the top square and ignores the ears. sounds like we need the extra logic.

sliptonic

2016-10-29 16:21

manager   ~0007435

I've been trying to use Draft.makeShape2DView() to create the projecton but this automatically adds the projection to the document. I don't want this since it causes a refresh which triggers the execute of the operation and throws me into a loop. I don't know how to create a 2D projection without adding it to the document. I'm sure TechDraw can do that. Need to dig a bit. Ideas welcome.

wandererfan

2016-10-29 16:38

manager   ~0007436

Yes we do it behind the scenes. Let me look into making a version of "project and find missing intersections" that is more friendly. We'll need a shape (Part::Feature, TopoShape, or ??), a scale (likely 1:1 for you?) and a ProjectionDirection (FreeCAD.Vector) as input.

sliptonic

2016-11-03 22:31

manager   ~0007438

Hey Wanderfan,
With all the TechDraw changes lately, I wanted to make sure I didn't miss this. No hurry, but please update if you've had a chance to look at this or need anything from us. Thanks.

wandererfan

2016-11-03 23:21

manager   ~0007440

No results yet, sorry. I've mapped out how I want to do it, just don't have any usable code yet. :(

sliptonic

2016-11-14 18:58

manager   ~0007456

fixed in PR 0000336

Issue History

Date Modified Username Field Change
2016-10-28 05:38 mlampert New Issue
2016-10-28 05:38 mlampert File Added: contour.fcstd
2016-10-28 14:45 sliptonic Note Added: 0007431
2016-10-29 03:47 mlampert Note Added: 0007432
2016-10-29 13:11 wandererfan Note Added: 0007433
2016-10-29 13:14 wandererfan Status new => feedback
2016-10-29 15:19 sliptonic Note Added: 0007434
2016-10-29 16:21 sliptonic Note Added: 0007435
2016-10-29 16:38 wandererfan Note Added: 0007436
2016-11-03 22:31 sliptonic Note Added: 0007438
2016-11-03 23:21 wandererfan Note Added: 0007440
2016-11-14 18:58 sliptonic Note Added: 0007456
2016-11-14 18:58 sliptonic Status feedback => closed
2016-11-14 18:58 sliptonic Assigned To => sliptonic
2016-11-14 18:58 sliptonic Resolution open => fixed