Occt category icon with logo interpretation


Edge is a 1D shape that can be used to construct a wire, and wires define boundaries of the face. Edges have start and end points and a curve that defines the path in between those points. Edges can be straight or curved.

How to create an edge?

In bitbybit we allow you to create, manipulate and analyse edges by using the "bitbybit.occt.shapes.edge..." commands. You can make linear edges, an arc, ellipse or a circle. It is also possible to create a wire first and transform it into an edge as long as wire does not consist of multiple edges. If that is the case you can deconstruct a wire into the edges.

Edge analysis

We provide several commands that allow you to inspect the edges. You can get the length of the edge, the start and end points. You can also subdivide the edge to points in a given number of segments.

There is also a command called "edgesToPoints" that will create more points on higher curvature areas of the edge and fewer points on straight sections. This is useful for various CNC applications.

Constructing wires

You can construct a wire from multiple edges, but these edges have to have end points that match. If your edges are disconnected a wire will not be created.

Deconstrcting shapes

Both solids, shells, faces and wires can be deconstructed into the edges. This is useful for various analysis and manipulation tasks. You can use "getEdges" command to deconstruct any shape. When you deconstruct shapes to edges the list might not be ordered in any particular preferred way, but order will be the same as drawing the edge indexes.

Deconstructing wires

When you want your deconstructed edges to be ordered along the wire you can use the command called "getEdgesAlongWire". This will not only return the edges along the direction of the wire, but will also reverse wires that might be facing different direction than the wire. In OCCT you can construct a wire by joining edges that are facing different directions. And sometimes this is not what you want. This command will help you to get the edges in the right order.

This command works on a single wire. If you'd like to do it on solids, first you would need to get the faces, then wires of those faces and for each wire get the edges along the wire. This would allow you to create lists of well ordered edge collections.