Script: Fillet 3D Wire In Rete

Fillet 3D Wire In Rete picture
Type
Rete logo indicatorrete
Date Created
Mar 1, 2024, 8:30:13 AM
Last Edit Date
May 27, 2025, 8:32:11 PM

Project Information

In the latest v0.15.0 release we fixed and improved this algorithm. In this project we deomstrate how it works.

View Full Project

Script Code

{
  "id": "rete-v2-json",
  "nodes": {
    "236000e6be6ccf2b": {
      "id": "236000e6be6ccf2b",
      "name": "bitbybit.occt.shapes.wire.createStarWire",
      "customName": "star wire",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "center": [
          0,
          0,
          0
        ],
        "direction": [
          0,
          1,
          0
        ],
        "numRays": 7,
        "outerRadius": 10,
        "innerRadius": 4,
        "offsetOuterEdges": 4,
        "half": false
      },
      "inputs": {
        "numRays": {
          "connections": [
            {
              "node": "f3b639af0a8a6f50",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        -11.315676390459487,
        280.7958914765325
      ]
    },
    "7287627509e8630e": {
      "id": "7287627509e8630e",
      "name": "bitbybit.occt.fillets.fillet3DWire",
      "customName": "fillet 3d wire",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "radius": 0.1,
        "direction": [
          0,
          1,
          0
        ]
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "236000e6be6ccf2b",
              "output": "result",
              "data": {}
            }
          ]
        },
        "radiusList": {
          "connections": [
            {
              "node": "a7e05f6656a0212f",
              "output": "list",
              "data": {}
            }
          ]
        },
        "indexes": {
          "connections": [
            {
              "node": "70cc1486aae9f9d9",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1577.5711831165675,
        296.1831250873849
      ]
    },
    "f3b639af0a8a6f50": {
      "id": "f3b639af0a8a6f50",
      "name": "bitbybit.math.numberSlider",
      "customName": "number slider",
      "data": {
        "options": {
          "min": 5,
          "max": 10,
          "step": 1,
          "width": 350
        },
        "number": 7
      },
      "inputs": {},
      "position": [
        -1052.3470210619662,
        333.63761446923337
      ]
    },
    "70cc1486aae9f9d9": {
      "id": "70cc1486aae9f9d9",
      "name": "bitbybit.vector.span",
      "customName": "span",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "step": 1,
        "min": 1,
        "max": 1
      },
      "inputs": {
        "max": {
          "connections": [
            {
              "node": "c1feeb47a95c86e6",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        830.5434465316521,
        586.020483457695
      ]
    },
    "c1feeb47a95c86e6": {
      "id": "c1feeb47a95c86e6",
      "name": "bitbybit.math.twoNrOperation",
      "customName": "two nr operation",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "first": 1,
        "second": 2,
        "operation": "multiply"
      },
      "inputs": {
        "first": {
          "connections": [
            {
              "node": "f3b639af0a8a6f50",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        -18.310614644244822,
        866.0500018140378
      ]
    },
    "9f48e3e48cfbde1b": {
      "id": "9f48e3e48cfbde1b",
      "name": "bitbybit.math.numberSlider",
      "customName": "number slider",
      "data": {
        "options": {
          "min": 0.5,
          "max": 2,
          "step": 0.1,
          "width": 350
        },
        "number": 1.7
      },
      "inputs": {},
      "position": [
        -1050.1077294976728,
        -16.32890598511689
      ]
    },
    "b349fa782bf4a508": {
      "id": "b349fa782bf4a508",
      "name": "bitbybit.math.numberSlider",
      "customName": "number slider",
      "data": {
        "options": {
          "min": 0.5,
          "max": 1,
          "step": 0.1,
          "width": 350
        },
        "number": 0.6
      },
      "inputs": {},
      "position": [
        -1054.0906529622296,
        152.4521832719633
      ]
    },
    "ada8a94e9ae868d1": {
      "id": "ada8a94e9ae868d1",
      "name": "bitbybit.lists.createList",
      "customName": "create list",
      "data": {},
      "inputs": {
        "listElements": {
          "connections": [
            {
              "node": "9f48e3e48cfbde1b",
              "output": "result",
              "data": {}
            },
            {
              "node": "b349fa782bf4a508",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        -113.72439356073457,
        -167.01602134486205
      ]
    },
    "5ef5af7f0aafbcff": {
      "id": "5ef5af7f0aafbcff",
      "name": "bitbybit.lists.repeat",
      "customName": "repeat",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "times": 10
      },
      "inputs": {
        "item": {
          "connections": [
            {
              "node": "ada8a94e9ae868d1",
              "output": "list",
              "data": {}
            }
          ]
        },
        "times": {
          "connections": [
            {
              "node": "f3b639af0a8a6f50",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        307.58835103278113,
        -101.21360658941975
      ]
    },
    "6401897a43288e43": {
      "id": "6401897a43288e43",
      "name": "bitbybit.lists.flatten",
      "customName": "flatten",
      "data": {
        "nrLevels": 2
      },
      "inputs": {
        "list": {
          "connections": [
            {
              "node": "5ef5af7f0aafbcff",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        718.7790781989961,
        -125.32777378822661
      ]
    },
    "a7e05f6656a0212f": {
      "id": "a7e05f6656a0212f",
      "name": "bitbybit.lists.createList",
      "customName": "create list",
      "data": {},
      "inputs": {
        "listElements": {
          "connections": [
            {
              "node": "6401897a43288e43",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        1119.8671943851466,
        -119.98346408038245
      ]
    },
    "e916c48b1203c51f": {
      "id": "e916c48b1203c51f",
      "name": "bitbybit.occt.transforms.translate",
      "customName": "translate",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "translation": [
          0,
          0,
          0
        ]
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "7287627509e8630e",
              "output": "result",
              "data": {}
            }
          ]
        },
        "translation": {
          "connections": [
            {
              "node": "a4789489fb26b903",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2055.461339742562,
        439.8635001386789
      ]
    },
    "a4789489fb26b903": {
      "id": "a4789489fb26b903",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0,
        "y": 5,
        "z": 0
      },
      "inputs": {},
      "position": [
        1573.6676810146807,
        817.2653192641134
      ]
    },
    "50186ce95b274d19": {
      "id": "50186ce95b274d19",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector xyz",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0,
        "y": 6,
        "z": 0
      },
      "inputs": {},
      "position": [
        2052.6444596081433,
        723.0890796115883
      ]
    },
    "724598de3a71b4fd": {
      "id": "724598de3a71b4fd",
      "name": "bitbybit.occt.transforms.translate",
      "customName": "translate",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "translation": [
          0,
          0,
          0
        ]
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "e916c48b1203c51f",
              "output": "result",
              "data": {}
            }
          ]
        },
        "translation": {
          "connections": [
            {
              "node": "50186ce95b274d19",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        2652.08911051333,
        582.1960376964696
      ]
    },
    "bf2f337edb238436": {
      "id": "bf2f337edb238436",
      "name": "bitbybit.occt.shapes.face.createFaceFromWire",
      "customName": "face from wire",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "planar": false
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "724598de3a71b4fd",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        3139.2415194215505,
        503.6284458343018
      ]
    },
    "cee96b09ceb73b4b": {
      "id": "cee96b09ceb73b4b",
      "name": "bitbybit.occt.operations.makeThickSolidSimple",
      "customName": "make thick solid simple",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "offset": -1
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "bf2f337edb238436",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        3528.153271640637,
        503.28011127738876
      ]
    },
    "b2b7ec3b80b0df50": {
      "id": "b2b7ec3b80b0df50",
      "name": "bitbybit.occt.fillets.filletEdges",
      "customName": "fillet edges",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "radius": 0.3
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "cee96b09ceb73b4b",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        3937.7873364263783,
        500.45923439202704
      ]
    },
    "8bd8ed9fd890e5cb": {
      "id": "8bd8ed9fd890e5cb",
      "name": "bitbybit.babylon.scene.enableSkybox",
      "customName": "enable skybox",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "skybox": "clearSky",
        "size": 1000,
        "blur": 0.1,
        "environmentIntensity": 0.7
      },
      "inputs": {},
      "position": [
        -872.9310695464733,
        1325.8217652474093
      ]
    },
    "60bc0d7e14b90dec": {
      "id": "60bc0d7e14b90dec",
      "name": "bitbybit.draw.drawAnyAsync",
      "customName": "draw any async",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "entity": {
          "connections": [
            {
              "node": "b2b7ec3b80b0df50",
              "output": "result",
              "data": {}
            }
          ]
        },
        "options": {
          "connections": [
            {
              "node": "9ddd3ef16739bcaa",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        4590.697492451062,
        813.5693461000375
      ]
    },
    "9ddd3ef16739bcaa": {
      "id": "9ddd3ef16739bcaa",
      "name": "bitbybit.draw.optionsOcctShape",
      "customName": "options occt shape",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "faceOpacity": 1,
        "edgeOpacity": 1,
        "edgeColour": "#000000",
        "faceColour": "#0040ff",
        "vertexColour": "#ff00ff",
        "edgeWidth": 2,
        "vertexSize": 0.03,
        "drawEdges": true,
        "drawFaces": true,
        "drawVertices": false,
        "precision": 0.005,
        "drawEdgeIndexes": false,
        "edgeIndexHeight": 0.06,
        "edgeIndexColour": "#ff00ff",
        "drawFaceIndexes": false,
        "faceIndexHeight": 0.06,
        "faceIndexColour": "#0000ff"
      },
      "inputs": {},
      "position": [
        3983.486163294121,
        1202.4958710764429
      ]
    },
    "9be05dbe14e2af43": {
      "id": "9be05dbe14e2af43",
      "name": "bitbybit.draw.drawGridMesh",
      "customName": "draw grid mesh",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "width": 400,
        "height": 400,
        "subdivisions": 10,
        "majorUnitFrequency": 10,
        "minorUnitVisibility": 0.45,
        "gridRatio": 0.5,
        "opacity": 0.5,
        "backFaceCulling": false,
        "mainColor": "#ffffff",
        "secondaryColor": "#ffffff"
      },
      "inputs": {},
      "position": [
        -862.2779510804795,
        1721.8456582103267
      ]
    },
    "d63192372194865c": {
      "id": "d63192372194865c",
      "name": "bitbybit.draw.drawAnyAsync",
      "customName": "draw any async",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "entity": {
          "connections": [
            {
              "node": "236000e6be6ccf2b",
              "output": "result",
              "data": {}
            },
            {
              "node": "e916c48b1203c51f",
              "output": "result",
              "data": {}
            }
          ]
        },
        "options": {
          "connections": [
            {
              "node": "7458f3c6c195b724",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        4093.3009234789824,
        -419.951086411402
      ]
    },
    "7458f3c6c195b724": {
      "id": "7458f3c6c195b724",
      "name": "bitbybit.draw.optionsOcctShapeSimple",
      "customName": "options occt shape simple",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "precision": 0.01,
        "drawFaces": false,
        "faceColour": "#ff0000",
        "drawEdges": true,
        "edgeColour": "#ffffff",
        "edgeWidth": 15
      },
      "inputs": {},
      "position": [
        3603.530645172864,
        -11.344274431578413
      ]
    }
  }
}