Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Need help, or want to share a macro? Post here!
Post Reply
stefankorisnik3
Posts: 99
Joined: Sun Jul 24, 2022 12:49 pm

Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Post by stefankorisnik3 »

What is the difference between Edges and OrderedEdges (Vertexes - OrderedVertexes) for the wire and general?
edwilliams16
Veteran
Posts: 1447
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Post by edwilliams16 »

To create a wire you have to provide a list of edges, ordered head-to-tail. If your list isn't so ordered, there's a method to order them.
stefankorisnik3
Posts: 99
Joined: Sun Jul 24, 2022 12:49 pm

Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Post by stefankorisnik3 »

Thanks.
Basically i-th edge in the OderedEdges is same edge as in Edges but with the proper orientation?
Now for the OrderedVertexes. I-th vertex in the OrderedVertexes is not the same as i-th in the Vertexes prop?
User avatar
Chris_G
Veteran
Posts: 2176
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Post by Chris_G »

Take a cylinder face.
It is built from a rectangle wire (4 edges and 4 vertexes), wrapped around a cylinder surface.
The 2 opposite edges get fused into a single edge (the seam edge).
And the 4 vertexes get fused into 2 vertexes.
OrderedEdges and OrderedVertexes include the edges and vertexes that were fused when the face was built:

Code: Select all

import Part
cylinder = Part.makeCylinder(2, 10)
wire = cylinder.Face1.Wire1
Part.show(cylinder.Face1)
wire.Edges  # -> 3 edges
wire.OrderedEdges  # -> 4 edges
wire.Vertexes  # -> 2 vertexes
wire.OrderedVertexes  # -> 4 vertexes
User avatar
dprojects
Posts: 463
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Post by dprojects »

stefankorisnik3 wrote: Sun Aug 07, 2022 10:38 pm What is the difference between Edges and OrderedEdges (Vertexes - OrderedVertexes) for the wire and general?
OrderedEdges are mostly for regular rectangle shapes and they are in similar order. There might be no OrderedEdges at all. I use it to make "informal" difference between rectangle Pad and other shapes. It is better to use Edges for all shapes.

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
stefankorisnik3
Posts: 99
Joined: Sun Jul 24, 2022 12:49 pm

Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)

Post by stefankorisnik3 »

Thanks.
When we work with simple closed wires (that's not contains circles -- like the wire from the face of the cylinder like in the previous post), Edges are the same as OrderedEdges?
Is this true? Also what's about OrderedVertexes and just Vertexes for the simple closed wire?
Post Reply