View Issue Details

IDProjectCategoryView StatusLast Update
0002541FreeCADBugpublic2017-07-08 15:53
Reportersliptonic Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformAll 
Summary0002541: Part.Wire.makeoffset() doesn't offset single edge.
Description
Part.Wire.makeoffset doesn't correctly offset a single edge. If a wire contains multiple edges, the offset is correct but if it contains only a single edge, no offset is created.

Steps To ReproduceCreate a new file and add a Part cube.

Select two vertical faces (side and right) of the cube.
run the attached macro sortpathtest and observe the output. With two faces selected, offset is possible and 9 edges are returned. this is correct since it includes the arcs around the ends of the faces.

Now select just one face and repeat. A shape object is returned but it includes no edges. No offset was done. I would expect a shape object with 6 edges.

Output with 2 faces:
wires in slice:1
Line
Line
edgelist: [<Edge object at 0x348de50>, <Edge object at 0x272f440>]
edges in edgelist:2
newwire: <Wire object at 0x2b8f220>
edges in newwire:2
offset: <Shape object at 0x31c8850>
edges in offset:9

output with 1 face:
Line
edgelist: [<Edge object at 0x3247c80>]
edges in edgelist:1
newwire: <Wire object at 0x2b35610>
edges in newwire:1
offset: <Shape object at 0x2db8540>
edges in offset:0
Additional InformationOS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7514 +17 (Git)
Build type: Unknown
Branch: pathimprove
Hash: f20a1ed9055f09880b26e00fa841b062bf679c7d
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0002542 closedsliptonic Part Part.Wire.makeoffset() doesn't handle circles correctly. 

Activities

sliptonic

2016-05-09 14:14

manager  

sortpathtest.FCMacro (Attachment missing)

sliptonic

2016-05-09 14:43

manager   ~0007073

This offsetting is used widely in Path workbench for calculating tool position.

When I said that I'd expect a wire with 6 edges, that is based on how the offset function currently works and not how I would desire it. It would be better if the option existed to offset open wires and only create edges for one side of the base wire rather tnan offsetting all the way around. If that were the case, I would expect the result to contain a Shape object with a single edge offset from the reference wire by the amount specified.

wmayer

2016-05-12 20:38

administrator   ~0007085

As mentioned in 0002542 the offset algorithm only works for planar wires or edges. However, for a single straight line this plane is not unique and thus it's impossible for the algorithm to determine in which direction to offset.

Kunda1

2017-06-15 12:43

administrator   ~0009386

@sliptonic do you mind re-upping the attachment? It was lost in the tracker restore :(
Also do you mind opening a thread for this ticket as well so it gets a little more exposure? Thanks in advance!

Kunda1

2017-07-08 14:47

administrator   ~0009683

@sliptonic ping

sliptonic

2017-07-08 15:35

manager   ~0009684

I don't think I've got it either anymore.

Honestly, I don't think it's worth keeping open. We're using PathArea for almost all the offsetting now. Let's close this for now. If issue resurfaces in another context, we'll have a better test case.

Kunda1

2017-07-08 15:53

administrator   ~0009686

Makes sense. Thanks!
Closing per @sliptonic

Issue History

Date Modified Username Field Change
2016-05-09 14:14 sliptonic New Issue
2016-05-09 14:14 sliptonic File Added: sortpathtest.FCMacro
2016-05-09 14:43 sliptonic Note Added: 0007073
2016-05-12 20:38 wmayer Note Added: 0007085
2017-01-18 01:06 Kunda1 Relationship added related to 0002542
2017-06-15 12:43 Kunda1 Note Added: 0009386
2017-06-15 12:43 Kunda1 Status new => feedback
2017-07-08 14:47 Kunda1 Note Added: 0009683
2017-07-08 15:35 sliptonic Note Added: 0009684
2017-07-08 15:35 sliptonic Status feedback => new
2017-07-08 15:53 Kunda1 Status new => closed
2017-07-08 15:53 Kunda1 Resolution open => no change required
2017-07-08 15:53 Kunda1 Note Added: 0009686