Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 101
- Joined: Sun Jul 24, 2022 12:49 pm
Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
What is the difference between Edges and OrderedEdges (Vertexes - OrderedVertexes) for the wire and general?
-
- Veteran
- Posts: 3182
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
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.
-
- Posts: 101
- Joined: Sun Jul 24, 2022 12:49 pm
Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
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?
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?
Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
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:
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
Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
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.stefankorisnik3 wrote: ↑Sun Aug 07, 2022 10:38 pm What is the difference between Edges and OrderedEdges (Vertexes - OrderedVertexes) for the wire and general?
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking
-
- Posts: 101
- Joined: Sun Jul 24, 2022 12:49 pm
Re: Difference between Edges and OrderedEdges (Vertexes - OrderedVertexes)
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?
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?