Wire Projection on 3D Shape

Wire Projection on 3D Shape script details
Author
matas
Type
Rete logo image
rete
App Version
0.19.9
Visibility
public
Date Created
Nov 15, 2023, 10:02:31 AM
Last Edit Date
Mar 20, 2025, 5:58:39 PM

Script Details

The Code
{ "id": "rete-v2-json", "nodes": { "1": { "id": "1", "name": "bitbybit.occt.shapes.solid.createSphere", "customName": "sphere", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "radius": 2, "center": [ 0, 0, 0 ] }, "inputs": { "radius": { "connections": [ { "node": "9", "output": "result", "data": {} } ] } }, "position": [ 119.34221257691112, 561.0553681983995 ] }, "2": { "id": "2", "name": "bitbybit.occt.shapes.solid.createSphere", "customName": "sphere", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "radius": 1.6, "center": [ 0, 0, 0 ] }, "inputs": { "radius": { "connections": [ { "node": "10", "output": "result", "data": {} } ] } }, "position": [ 123.57054286129306, 965.0547506220355 ] }, "3": { "id": "3", "name": "bitbybit.occt.shapes.wire.createStarWire", "customName": "star", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "center": [ 0, 0, 0 ], "direction": [ 0, 1, 0 ], "numRays": 8, "outerRadius": 3.7, "innerRadius": 0.5, "offsetOuterEdges": 0, "half": false }, "inputs": { "center": { "connections": [ { "node": "4", "output": "result", "data": {} } ] }, "direction": { "connections": [ { "node": "16", "output": "result", "data": {} } ] } }, "position": [ 484.64454024224, 180.5406697804233 ] }, "4": { "id": "4", "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": 0 }, "inputs": {}, "position": [ 55.444548677462066, 23.18021565693465 ] }, "5": { "id": "5", "name": "bitbybit.occt.shapes.wire.project", "customName": "project", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "direction": [ 0, 1, 0 ] }, "inputs": { "wire": { "connections": [ { "node": "7", "output": "result", "data": {} } ] }, "shape": { "connections": [ { "node": "1", "output": "result", "data": {} } ] }, "direction": { "connections": [ { "node": "16", "output": "result", "data": {} } ] } }, "position": [ 1240.4776624892613, 418.07126216264595 ] }, "7": { "id": "7", "name": "bitbybit.occt.fillets.fillet2d", "customName": "fillet 2d wire or face", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "radius": 0.1 }, "inputs": { "shape": { "connections": [ { "node": "3", "output": "result", "data": {} } ] } }, "position": [ 870.9053009951144, 229.43013926000432 ] }, "9": { "id": "9", "name": "bitbybit.math.number", "customName": "number", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "number": 2 }, "inputs": {}, "position": [ -397.4503942213751, 502.2628349088084 ] }, "10": { "id": "10", "name": "bitbybit.math.twoNrOperation", "customName": "two numbers", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "first": 1, "second": 1, "operation": "subtract" }, "inputs": { "first": { "connections": [ { "node": "9", "output": "result", "data": {} } ] }, "second": { "connections": [ { "node": "c2643221436438e6", "output": "result", "data": {} } ] } }, "position": [ -249.02307693972574, 779.5951742757744 ] }, "11": { "id": "11", "name": "bitbybit.occt.operations.splitShapeWithShapes", "customName": "split", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "localFuzzyTolerance": 0.0001, "nonDestructive": true }, "inputs": { "shape": { "connections": [ { "node": "1", "output": "result", "data": {} } ] }, "shapes": { "connections": [ { "node": "84c1f7ce59fccea5", "output": "list", "data": {} } ] } }, "position": [ 1808.399079128558, 545.7569819947432 ] }, "13": { "id": "13", "name": "bitbybit.occt.shapes.face.getFaces", "customName": "faces", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false } }, "inputs": {}, "position": [ 2126.194049292414, 552.5948421447551 ] }, "14": { "id": "14", "name": "bitbybit.lists.getItem", "customName": "item by index", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "index": 7, "clone": true }, "inputs": { "list": { "connections": [ { "node": "13", "output": "result", "data": {} } ] } }, "position": [ 2439.568088717949, 615.973636969476 ] }, "16": { "id": "16", "name": "bitbybit.vector.vectorXYZ", "customName": "vector XYZ", "async": false, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "x": 1, "y": 0, "z": 0 }, "inputs": {}, "position": [ 90.33133194605325, 348.4030770770338 ] }, "17": { "id": "17", "name": "bitbybit.occt.operations.makeThickSolidSimple", "customName": "thicken", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "offset": -0.3 }, "inputs": { "shape": { "connections": [ { "node": "14", "output": "result", "data": {} } ] }, "offset": { "connections": [ { "node": "18", "output": "result", "data": {} } ] } }, "position": [ 3635.4567696250397, 893.9932252222508 ] }, "18": { "id": "18", "name": "bitbybit.math.oneNrOperation", "customName": "one number", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "number": 1, "operation": "negate" }, "inputs": { "number": { "connections": [ { "node": "c2643221436438e6", "output": "result", "data": {} } ] } }, "position": [ 2527.0367561163885, 905.5728747818416 ] }, "19": { "id": "19", "name": "bitbybit.occt.shapes.wire.createStarWire", "customName": "star", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "center": [ 0, 0, 0 ], "direction": [ 0, 1, 0 ], "numRays": 8, "outerRadius": 3, "innerRadius": 1, "offsetOuterEdges": 0, "half": false }, "inputs": { "center": { "connections": [ { "node": "4", "output": "result", "data": {} } ] }, "direction": { "connections": [ { "node": "16", "output": "result", "data": {} } ] } }, "position": [ 860.2070633473331, 1060.4580719625267 ] }, "20": { "id": "20", "name": "bitbybit.occt.fillets.fillet2d", "customName": "fillet 2d wire or face", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "radius": 0.1 }, "inputs": { "shape": { "connections": [ { "node": "19", "output": "result", "data": {} } ] } }, "position": [ 1365.9739808363615, 1074.6125738843714 ] }, "21": { "id": "21", "name": "bitbybit.occt.shapes.wire.project", "customName": "project", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "direction": [ 0, 1, 0 ] }, "inputs": { "wire": { "connections": [ { "node": "20", "output": "result", "data": {} } ] }, "shape": { "connections": [ { "node": "2", "output": "result", "data": {} } ] }, "direction": { "connections": [ { "node": "16", "output": "result", "data": {} } ] } }, "position": [ 1735.974895943832, 1083.6978324800975 ] }, "23": { "id": "23", "name": "bitbybit.occt.operations.splitShapeWithShapes", "customName": "split", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "localFuzzyTolerance": 0.0001, "nonDestructive": true }, "inputs": { "shape": { "connections": [ { "node": "2", "output": "result", "data": {} } ] }, "shapes": { "connections": [ { "node": "9558bd30443db4bd", "output": "list", "data": {} } ] } }, "position": [ 2473.8502988344517, 1200.1390557265142 ] }, "24": { "id": "24", "name": "bitbybit.lists.getItem", "customName": "item by index", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "index": 7, "clone": true }, "inputs": { "list": { "connections": [ { "node": "26", "output": "result", "data": {} } ] } }, "position": [ 3172.899778973188, 1197.8851323483807 ] }, "25": { "id": "25", "name": "bitbybit.occt.operations.makeThickSolidSimple", "customName": "thicken", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "offset": -0.2 }, "inputs": { "shape": { "connections": [ { "node": "24", "output": "result", "data": {} } ] } }, "position": [ 3617.1656638640247, 1171.3549593218222 ] }, "26": { "id": "26", "name": "bitbybit.occt.shapes.face.getFaces", "customName": "faces", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false } }, "inputs": {}, "position": [ 2775.149573390515, 1320.4126374075586 ] }, "30": { "id": "30", "name": "bitbybit.occt.shapes.compound.makeCompound", "customName": "make", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false } }, "inputs": { "shapes": { "connections": [ { "node": "cef4b9c743905f10", "output": "list", "data": {} } ] } }, "position": [ 4285.831024006871, 1024.3035049237035 ] }, "32": { "id": "32", "name": "bitbybit.draw.drawAnyAsync", "customName": "draw async", "async": true, "drawable": true, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false } }, "inputs": { "entity": { "connections": [ { "node": "30", "output": "result", "data": {} } ] }, "options": { "connections": [ { "node": "33", "output": "result", "data": {} } ] } }, "position": [ 4725.280119799183, 897.8617527443034 ] }, "33": { "id": "33", "name": "bitbybit.draw.optionsOcctShape", "customName": "occt shape", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "faceOpacity": 1, "edgeOpacity": 1, "edgeColour": "#a28fff", "faceColour": "#3700ff", "vertexColour": "#ff00ff", "edgeWidth": 0.5, "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": [ 4224.041345507986, 1330.2541134383978 ] }, "35": { "id": "35", "name": "bitbybit.babylon.scene.drawPointLight", "customName": "point light", "async": false, "drawable": false, "data": { "genericNodeData": { "hide": false, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "position": [ 0, 0, 0 ], "intensity": 1000, "diffuse": "#ffffff", "specular": "#ffffff", "radius": 0.1, "shadowGeneratorMapSize": 2056, "enableShadows": true, "shadowDarkness": 0, "shadowUsePercentageCloserFiltering": true, "shadowContactHardeningLightSizeUVRatio": 0.2, "shadowBias": 0.0001, "shadowNormalBias": 0.002, "shadowMaxZ": 1000, "shadowMinZ": 0 }, "inputs": { "position": { "connections": [ { "node": "36", "output": "result", "data": {} } ] } }, "position": [ 1819.1869736293306, 2418.556795416953 ] }, "36": { "id": "36", "name": "bitbybit.vector.vectorXYZ", "customName": "vector XYZ", "async": false, "drawable": true, "data": { "genericNodeData": { "hide": true, "oneOnOne": false, "flatten": 0, "forceExecution": false }, "x": -3, "y": 3, "z": 0 }, "inputs": {}, "position": [ 1347.759710541683, 2423.4696563878188 ] }, "c2643221436438e6": { "id": "c2643221436438e6", "name": "bitbybit.math.numberSlider", "customName": "number slider", "data": { "options": { "min": 0.1, "max": 1, "step": 0.0001, "width": 350 }, "number": 0.2519 }, "inputs": {}, "position": [ -848.5164712569745, 761.4251285755527 ] }, "84c1f7ce59fccea5": { "id": "84c1f7ce59fccea5", "name": "bitbybit.lists.createList", "customName": "list", "data": {}, "inputs": { "listElements": { "connections": [ { "node": "5", "output": "result", "data": {} } ] } }, "position": [ 1539.687582915636, 528.607110729851 ] }, "9558bd30443db4bd": { "id": "9558bd30443db4bd", "name": "bitbybit.lists.createList", "customName": "list", "data": {}, "inputs": { "listElements": { "connections": [ { "node": "21", "output": "result", "data": {} } ] } }, "position": [ 2148.545835114808, 1345.502721208489 ] }, "cef4b9c743905f10": { "id": "cef4b9c743905f10", "name": "bitbybit.lists.createList", "customName": "list", "data": {}, "inputs": { "listElements": { "connections": [ { "node": "17", "output": "result", "data": {} }, { "node": "25", "output": "result", "data": {} } ] } }, "position": [ 3938.1522129202644, 1039.3645163806952 ] } } }