Title: Proposal: 3D Orthogonal Pathfinder for MEP Routing in BlenderBIM · Issue #6521 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Proposal: 3D Orthogonal Pathfinder for MEP Routing in BlenderBIM · Issue #6521 · IfcOpenShell/IfcOpenShell
X Title: Proposal: 3D Orthogonal Pathfinder for MEP Routing in BlenderBIM · Issue #6521 · IfcOpenShell/IfcOpenShell
Description: Overview: This proposal suggests implementing a simple 3D pathfinding system for MEP elements (pipes, ducts, conduits) in BlenderBIM, restricted to orthogonal 90° turns along X, Y, and Z axes — suitable for real-world HVAC, plumbing, and...
Open Graph Description: Overview: This proposal suggests implementing a simple 3D pathfinding system for MEP elements (pipes, ducts, conduits) in BlenderBIM, restricted to orthogonal 90° turns along X, Y, and Z axes — sui...
X Description: Overview: This proposal suggests implementing a simple 3D pathfinding system for MEP elements (pipes, ducts, conduits) in BlenderBIM, restricted to orthogonal 90° turns along X, Y, and Z axes — sui...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/6521
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: 3D Orthogonal Pathfinder for MEP Routing in BlenderBIM","articleBody":"Overview:\n\nThis proposal suggests implementing a simple 3D pathfinding system for MEP elements (pipes, ducts, conduits) in BlenderBIM, restricted to orthogonal 90° turns along X, Y, and Z axes — suitable for real-world HVAC, plumbing, and electrical routing.\n\nThe algorithm would generate a sequence of segments using IfcPipeSegment, IfcDuctSegment, IfcElbow, and eventually IfcPipeFitting (e.g. T-joints), avoiding obstacles within a defined 3D grid.\n\n⸻\n\nCore Features:\n\t•\tOrthogonal A* Pathfinding:\nMovement restricted to 6 directions: X+, X−, Y+, Y−, Z+, Z− (no diagonals).\n\t•\t3D Grid Environment:\nRouting takes place in a virtual voxel grid aligned with building geometry.\n\t•\tObstacle Avoidance:\nAvoids walls, slabs, beams, or other solid objects represented as Blender meshes.\n\t•\tOutput:\nAutomatically generates:\n\t•\tIfcPipeSegment or IfcDuctSegment for each straight segment\n\t•\tIfcElbow for each 90° turn\n\t•\t(Future) IfcPipeFitting T-joints when segments split\n\n⸻\n\nBenefits:\n\t•\tAligns with real-world MEP design practices\n\t•\tEnables semi-automated system layout in openBIM workflows\n\t•\tAccelerates design iteration for technical users (no more manual tracing)\n\t•\tPrepares base for future rule-based routing (e.g., slope, distance limits, pressure drop)\n\n⸻\n\nImplementation Suggestion (MVP):\n\t•\tStart with a simple function:\n```Python \n\nimport bpy\nimport math\nfrom mathutils import Vector\n\nGRID_STEP = 1.0 # 1 meter\nPIPE_RADIUS = 0.05 # 5 cm pipe\n\ndef grid_snap(v):\n return Vector((\n round(v.x / GRID_STEP) * GRID_STEP,\n round(v.y / GRID_STEP) * GRID_STEP,\n round(v.z / GRID_STEP) * GRID_STEP,\n ))\n\ndef route_pipe(start, end):\n path = [start.copy()]\n current = start.copy()\n\n # X axis\n while abs(current.x - end.x) > GRID_STEP * 0.1:\n current.x += GRID_STEP if end.x > current.x else -GRID_STEP\n path.append(current.copy())\n\n # Y axis\n while abs(current.y - end.y) > GRID_STEP * 0.1:\n current.y += GRID_STEP if end.y > current.y else -GRID_STEP\n path.append(current.copy())\n\n # Z axis\n while abs(current.z - end.z) > GRID_STEP * 0.1:\n current.z += GRID_STEP if end.z > current.z else -GRID_STEP\n path.append(current.copy())\n\n return path\n\ndef create_cylinder(p1, p2):\n direction = p2 - p1\n length = direction.length\n mid = p1 + direction * 0.5\n\n bpy.ops.mesh.primitive_cylinder_add(radius=PIPE_RADIUS, depth=length, location=mid)\n obj = bpy.context.active_object\n obj.name = \"PipeSegment\"\n obj.rotation_mode = 'QUATERNION'\n obj.rotation_quaternion = direction.to_track_quat('Z', 'Y')\n\n if \"bim_assign_class\" in dir(bpy.ops.bim):\n bpy.ops.bim.bim_assign_class(class_name='IfcPipeSegment')\n\ndef create_elbow(location):\n bpy.ops.mesh.primitive_uv_sphere_add(radius=PIPE_RADIUS * 1.5, location=location)\n obj = bpy.context.active_object\n obj.name = \"PipeElbow\"\n\n if \"bim_assign_class\" in dir(bpy.ops.bim):\n bpy.ops.bim.bim_assign_class(class_name='IfcElbow')\n\ndef run_pipe_routing():\n sel = [obj for obj in bpy.context.selected_objects if obj.type == 'EMPTY']\n if len(sel) != 2:\n print(\"Select exactly 2 empties!\")\n return\n\n start = grid_snap(sel[0].location)\n end = grid_snap(sel[1].location)\n\n path = route_pipe(start, end)\n\n for i in range(1, len(path)):\n p_prev = path[i - 1]\n p_curr = path[i]\n create_cylinder(p_prev, p_curr)\n\n # If there's a turn after this segment, place an elbow\n if i \u003c len(path) - 1:\n dir1 = (p_curr - p_prev).normalized()\n dir2 = (path[i + 1] - p_curr).normalized()\n if not dir1 == dir2:\n create_elbow(p_curr)\n\n# Run this script in Blender\nrun_pipe_routing()\n```\n\t•\tBlender operator:\nSelect start and end empty → Press “Route Pipe” → Path appears → IFC segments generated.\n\n⸻\n\nOptional UI:\n\t•\tGrid resolution input (e.g., 10 cm / voxel)\n\t•\tPipe diameter, system type (hot water, cold air, etc.)\n\t•\tCheckbox: “Auto-insert elbows”\n\n⸻\n\nFuture Extensions:\n\t•\tT-junction recognition with automatic IfcPipeFitting\n\t•\tMulti-terminal routing (1-to-many)\n\t•\tIntegration with BCF for clash checking\n\t•\tIFC parameter inheritance (e.g., flow capacity)\n\n⸻\n\n","author":{"url":"https://github.com/Isaina","@type":"Person","name":"Isaina"},"datePublished":"2025-04-09T16:12:15Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/6521"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9fc5d0ec-a7b2-91a6-2dc9-1481899b4ffa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D128:377538:109E37:160CFD:6B04B0D8 |
| html-safe-nonce | 21f5610f1016bfcc5552e16e8a1fd85210cd4be36fd01a7701ac5cd187d7929e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTI4OjM3NzUzODoxMDlFMzc6MTYwQ0ZEOjZCMDRCMEQ4IiwidmlzaXRvcl9pZCI6Ijg3NTM1NzY3MzA0MjM1MDUxMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d94f6a462b79623cefc956c9bdccf4e54416b554403afda0aa62e01a677e526f |
| hovercard-subject-tag | issue:2983286176 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/6521/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9320b6bc88f5d6526cf82a54d118ad9eae2951fd45ca9823cbc0ac960355245f/IfcOpenShell/IfcOpenShell/issues/6521 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9320b6bc88f5d6526cf82a54d118ad9eae2951fd45ca9823cbc0ac960355245f/IfcOpenShell/IfcOpenShell/issues/6521 |
| og:image:alt | Overview: This proposal suggests implementing a simple 3D pathfinding system for MEP elements (pipes, ducts, conduits) in BlenderBIM, restricted to orthogonal 90° turns along X, Y, and Z axes — sui... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Isaina |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width