[FIXED] Bug #3071: List of vertexes returned by wire.OrederedVertexes missing last vertext in the list

Need help, or want to share a macro? Post here!
User avatar
Kunda1
Posts: 7532
Joined: Thu Jan 05, 2017 9:03 pm

[FIXED] Bug #3071: List of vertexes returned by wire.OrederedVertexes missing last vertext in the list

Postby Kunda1 » Sat Sep 30, 2017 3:57 pm

issue #3071: List of vertexes returned by wire.OrederedVertexes missing last vertext in the list

The list of vertexes returned by wire.OrderedVertexes is ok if the wire is closed. If the wire is not closed, the last vertexes is missing in the list.

Code: Select all

#!/bin/bash

import FreeCAD as F
import Part as FP

wire = FP.read("test.brep").Wires[0]
print "Number of Vertexes in the wire                 = ",len(wire.Vertexes)
print "Number of Vertexes returned by OrderedVertexes = ",len(wire.OrderedVertexes)
Download example brep file to use with above script.
Last edited by Kunda1 on Sat Sep 30, 2017 8:54 pm, edited 1 time in total.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Chris_G
Posts: 1343
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Bug #3071: List of vertexes returned by wire.OrederedVertexes missing last vertext in the list

Postby Chris_G » Sat Sep 30, 2017 6:05 pm

Indeed, there is something wrong here.
The last vertex is not appended to the list.
User avatar
Kunda1
Posts: 7532
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #3071: List of vertexes returned by wire.OrederedVertexes missing last vertext in the list

Postby Kunda1 » Sat Sep 30, 2017 8:54 pm

@wmayer committed fix in git commit 62d98deccf6572eb5c6c540d64fd402817edfc6d
'dat boy fast!'
Thanks!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features