Skip to main content
OCCT category icon with a stylized logo representation

Creating Wires from Edges

Combining edges into a wire is one of the most fundamental operations in 3D modeling and computational geometry. While individual edges represent simple geometric elements like lines, arcs, or splines, wires allow us to connect these edges into more complex, continuous shapes that form the backbone of sophisticated geometric models.

Why Combine Edges into Wires?

In practical 3D modeling scenarios, you rarely work with isolated geometric elements. Instead, you need to create connected paths, profiles, and contours that can serve various purposes:

  • Creating complex profiles for extrusion or sweeping operations
  • Building wireframe models that define the skeleton of 3D objects
  • Generating paths for manufacturing tools, robot movements, or animation curves
  • Forming closed loops that can later be converted into faces and surfaces
  • Constructing architectural elements like floor plans, structural frameworks, or decorative patterns

The Power of Edge Combination

When you combine individual edges into a wire, you gain several important capabilities:

1. Continuity Control

OCCT automatically ensures that edges connect properly at their endpoints, maintaining geometric continuity throughout the wire.

2. Complex Shape Creation

By combining different types of edges (lines, arcs, splines), you can create sophisticated shapes that would be impossible to achieve with single geometric primitives.

3. Topology Management

Wires maintain the topological relationships between edges, making them suitable for advanced operations like face creation, boolean operations, and geometric analysis.

4. Manufacturing Applications

Combined wires can represent tool paths, cutting profiles, or assembly sequences in manufacturing and CAD applications.

Understanding the Example

In this tutorial, we'll demonstrate edge combination by creating a flower-like pattern from four arc segments. The process involves:

  1. Creating a base arc through three specific points
  2. Generating variations by rotating the base arc in 90-degree increments
  3. Combining all arcs into a single, continuous wire structure

This example showcases how simple geometric operations (arc creation and rotation) can be combined with wire operations to create complex, aesthetically pleasing shapes that would be challenging to define manually.

Bitbybit Platform

Combining edges into a wire

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"d3eae5ce6dc65c7d": {
"id": "d3eae5ce6dc65c7d",
"name": "bitbybit.occt.shapes.edge.arcThroughThreePoints",
"customName": "arc through three points",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"start": [
0,
0,
0
],
"middle": [
0,
1,
0
],
"end": [
0,
0,
1
]
},
"inputs": {
"start": {
"connections": [
{
"node": "b0c0c10ad0f0b376",
"output": "result",
"data": {}
}
]
},
"middle": {
"connections": [
{
"node": "b0f0ab88ce56530b",
"output": "result",
"data": {}
}
]
},
"end": {
"connections": [
{
"node": "eb556be1eebab3e1",
"output": "result",
"data": {}
}
]
}
},
"position": [
534.1448402109038,
379.3579836100596
]
},
"b0c0c10ad0f0b376": {
"id": "b0c0c10ad0f0b376",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 5,
"y": 0,
"z": 5
},
"inputs": {},
"position": [
94.57403303556532,
90.44351868458702
]
},
"b0f0ab88ce56530b": {
"id": "b0f0ab88ce56530b",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0,
"z": 3
},
"inputs": {},
"position": [
89.45148079042713,
428.0205711278293
]
},
"eb556be1eebab3e1": {
"id": "eb556be1eebab3e1",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -5,
"y": 0,
"z": 5
},
"inputs": {},
"position": [
96.3359847306213,
789.091745319537
]
},
"813ef50a24796266": {
"id": "813ef50a24796266",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 90
},
"inputs": {
"shape": {
"connections": [
{
"node": "d3eae5ce6dc65c7d",
"output": "result",
"data": {}
}
]
},
"axis": {
"connections": [
{
"node": "639ad3b9d7d8fb96",
"output": "result",
"data": {}
}
]
}
},
"position": [
979.2191844359841,
528.0582678468946
]
},
"639ad3b9d7d8fb96": {
"id": "639ad3b9d7d8fb96",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 1,
"z": 0
},
"inputs": {},
"position": [
544.652073196799,
1052.9517323029297
]
},
"83256d1d59d91e85": {
"id": "83256d1d59d91e85",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 90
},
"inputs": {
"shape": {
"connections": [
{
"node": "813ef50a24796266",
"output": "result",
"data": {}
}
]
},
"axis": {
"connections": [
{
"node": "639ad3b9d7d8fb96",
"output": "result",
"data": {}
}
]
}
},
"position": [
1396.0370000621306,
710.2873028136673
]
},
"46a4c9a430a67a38": {
"id": "46a4c9a430a67a38",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 90
},
"inputs": {
"shape": {
"connections": [
{
"node": "83256d1d59d91e85",
"output": "result",
"data": {}
}
]
},
"axis": {
"connections": [
{
"node": "639ad3b9d7d8fb96",
"output": "result",
"data": {}
}
]
}
},
"position": [
1779.8751584275665,
993.0350632431747
]
},
"d9118ec2955d5d74": {
"id": "d9118ec2955d5d74",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "d3eae5ce6dc65c7d",
"output": "result",
"data": {}
},
{
"node": "813ef50a24796266",
"output": "result",
"data": {}
},
{
"node": "83256d1d59d91e85",
"output": "result",
"data": {}
},
{
"node": "46a4c9a430a67a38",
"output": "result",
"data": {}
}
]
}
},
"position": [
2251.1631148261968,
392.62231116107625
]
},
"4aa103865a33f040": {
"id": "4aa103865a33f040",
"name": "bitbybit.occt.shapes.wire.combineEdgesAndWiresIntoAWire",
"customName": "combine edges and wires into a wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shapes": {
"connections": [
{
"node": "d9118ec2955d5d74",
"output": "list",
"data": {}
}
]
}
},
"position": [
2635.0126636293408,
351.4568381003743
]
}
}
}