Manuscript Offprint
arXiv:2610.19403Topology-Preserving Multi-Usage Pipe Centerline Refinement under Permanent Tubular Occupancy
Abstract
Discrete multi-group pipe routers place channels on a grid or coarse graph. The resulting centerlines are topologically feasible but typically contain many axis-aligned corners. For permanently occupied fluid tubes—as in additively manufactured hydraulic manifolds—those corners are undesirable: they degrade geometric fairness and, in practice, flow quality. This technical report studies the downstream geometric stage that starts from a fixed routing topology and a feasible coarse layout, and refines tubular centerlines under permanent clearance.
Unlike classical robotic path smoothing, which usually fair one temporary open trajectory, our setting is a branched manifold with declared terminal usages, finite tube radii, and static cross-group occupancy. We formalize the refinement problem, highlight the multi-usage junction conflict that a single shared branch point cannot resolve, and outline a hybrid trunk-share / junction-split parameterization with soft geometric costs and hard clearance acceptance. On a multi-group suite (8 groups × 8 terminals, r=2) with capsule clearance, the refine reaches full hard-accept success, , and about a 95% relative drop in the soft objective. Physics-based pressure-drop optimization is intentionally deferred to a later PDE stage; here the objective remains geometric.
Code. Reference implementation, instance loaders, and batch runners are in https://github.com/bladesaber/MAPF_Pipeline (branch branch_quan), under pipe_smooth/.
1 Introduction
Additive manufacturing (AM) allows compact hydraulic components whose internal channels follow free-form three-dimensional paths rather than intersecting drilled holes. A representative design case is multi-group channel layout in rotary direct-drive servo valves: terminals are partitioned into groups; pipes of different groups must remain geometrically separated for all poses of interest, while pipes within a group may share trunks and branch into tree-like manifolds. Once a channel is placed it permanently occupies volume, so later groups must clear earlier geometry.
Our companion work on discrete multi-group pipe routing under permanent geometric occupancy Deng [2025] addresses the combinatorial layout problem: given ports, obstacles, and group topologies, produce a conflict-free coarse embedding on a constructive 3D grid benchmark, evaluated by fixed-budget success of CBS, PBS, and priority planning. That paper explicitly leaves post-layout smoothing as orthogonal follow-on work. The layouts it returns are feasible but still grid-angular; the present report refines those centerlines.
Why robotic path smoothing is not enough. Trajectory fairing methods such as CHOMP, STOMP, TEB, and TrajOpt typically optimize a single open curve for a temporary agent under time-indexed or soft obstacle costs Zucker et al. [2013], Kalakrishnan et al. [2011], Rösmann et al.
[2012], Schulman et al. [2014]. Pipe refinement differs along several axes that we make precise in Sec. 2: permanent tubular occupancy, branched topology with degree- 3 junctions, costs driven by declared usages rather than one s-t path. The central geometric conflict is not “make one spline smoother,” but how several overlapping usages share a trunk while remaining fair at every declared terminal-to-terminal flow.
Scope of this report. We formalize topology-preserving, multi-usage geometric refinement under permanent tubular occupancy (Sec. 2), survey adjacent literatures (Sec. 3), and describe a hybrid trunk-share / junction-split Hermite parameterization (Sec. 4) with soft path and clearance costs (Sec. 5). Gradient-based experiments on synthetic instances with capsule clearance follow in later sections. We do not claim a new optimal continuous planner, commercial CAD parity, or CFD-validated hydraulic improvement; those belong to later CAD and fluid optimization, not to this geometric pass.
-
Method sketch. Hybrid trunk-share / junction-split variables with soft length/curvature and clearance costs, hard ports and topology by construction, and hard clearance at accept (detailed in later sections).
-
Empirical note. On hard multi-group synthetic cases, gradient refine with capsule clearance yields feasible designs with and large relative objective drop (Sec. 6).
2 Problem Formulation
2.1 Setting
The geometric refine starts after a discrete multi-group router has returned a feasible coarse layout. We treat the following as fixed:
• Domain : a bounded design region with static obstacles and already committed pipes of other groups (permanent clearance).
• Topology T: for each group, a connected graph (typically a tree), together with a feasible coarse polyline or grid embedding that initializes the refine.
• Usages : a set of directed terminal-terminal flows that must be considered when scoring fairness (e.g. , , ).
• Radii and ports: tube radii along the layout, fixed terminal positions, and optional end-tangent / line-axis clamps so that a port sits on a prescribed axis.
The decision variables X parameterize centerlines (and, implicitly, tubular solids of the given radii). The output must keep every terminal connected as in T: each declared usage remains a continuous path between its ends. Branches need not meet at a single geometric point; Sec. 2.4 explains when a local split near a junction is allowed.
2.2 Objective sketch
Given topology and a feasible coarse embedding, refine the geometric parameters so that a weighted soft cost over declared usages is minimized, subject to hard geometric constraints:
Table 1 summarizes the roles of the terms. Full discrete definitions appear in Sec. 5; here we only fix the semantics needed for the problem statement.
Table 1: Soft versus hard elements in the geometric refine.
| Symbol | Role | Soft / hard |
|---|---|---|
| Centerline parameters (shared trunk + private junction controls) | decision | |
| Chord energy (each shared piece once) + bend (segment interiors once; usage joints once) | soft | |
| Obstacle and cross-group tube separation | soft in loop; hard at accept | |
| Junction-bundle compactness | soft | |
| Keep sample gaps comparable under parameter sampling | soft | |
| Topology / ports / interface | Connectivity, fixed ends, clamps | hard (by construction) |
2.3 Difference from classical path smoothing
Table 2: Classical path smoothing versus the pipe refine studied here.
| Aspect | Normal path smoothing | This problem |
|---|---|---|
| Occupancy | Pass-and-release (time / moving agent) | Permanent tubes; clearance is static geometry |
| Structure | Single line | Tree / branched manifold; degree joins |
| Cost scope | One path's length / curvature | Usage-assembled paths over the branched manifold |
| Domain | Often open or mild | Tight may force large (soft ) |
| Ends | Fixed (pose optional) | Fixed ports plus line-axis alignment |
2.4 Junction conflict: shared node versus local split
Usages matter because shared trunk nodes couple directions. Optimizing only the shared polyline can make and smooth while remains a hairpin at the branch. The declared set therefore decides which end-to-end paths must stay fair, and where junctions need private degrees of freedom.
Consider a Y-junction with fixed topology and usages :
Shared junction. All three branches meet at one point . Fair geometry for and forces a sharp turn on at (Fig. 1a).
Locally split junction. Private junction degrees of freedom let take a dedicated arc while and keep a shared trunk (Fig. 1b). A void appears near the join; connectivity of is preserved, but the embedding need not keep a common junction point.

Figure 1: Planar Y under the same usages (top view; gray disks = tube radius). (a) Forced shared connect point: the three usage centerlines meet at one node (orange); refine can fair and , but (green) stays sharp at . (b) Hybrid trunk-share / junction-split: can leave the fork while the trunk toward remains shared.
Table 3: Shared junction versus locally split junction.
| Shared junction | Locally split junction | |
|---|---|---|
| Geometry at join | one shared point | trunks + dedicated arc + void |
| arc + straight | same as shared case | |
| sharp at | dedicated arc; fair | |
| preserved | preserved (connectivity, not a common join point) |
The design implication is that the refine must allow private degrees of freedom near junctions (local split) while sharing trunk controls where usages truly share physical pipe. That hybrid structure—trunk-share + junction-split—is the method focus of this report. The core gap relative to single-curve fairing is therefore topology-preserving, multi-usage geometric refinement under permanent tubular occupancy, not merely denser spline fitting.
2.5 Place in the pipeline
A typical valve-channel workflow is discrete multi-group routing, then centerline refine, then CAD solids, then fluid PDE / shape polish. This report covers only the geometric refine.
That ordering matters for junctions. Downstream shape or adjoint PDE optimization usually deforms a fixed channel layout: it can move walls or a shared centerline, but it does not introduce a new split curve or triangular void at a Y-join the way a locally split junction does. That local split is therefore a decision of the geometric refine, not of later physics polish. We still preserve the connectivity of (no discrete rewiring); what changes is the geometric arrangement near degree- 3 nodes. Pressure drop and streamline quality remain for subsequent physics-based optimization, once the centerline graph—including any local splits—is fixed.
3 Related Work
Discrete pipe routing. Belov et al. Belov et al. [2020] adapt MAPF-style search to 3D pipe routing; surveys of plant-scale automatic routing emphasize sequential CAD and MIP/sampling pipelines Blokland et al. [2023]. Our companion report Deng [2025] treats multi-group routing under permanent occupancy and supplies the coarse layouts we refine. That work stops at discrete embeddings; continuous centerline cleanup is left open.
Robotic path smoothing. CHOMP, STOMP, TEB, and TrajOpt Zucker et al. [2013], Kalakrishnan et al. [2011], Rösmann et al. [2012], Schulman et al. [2014] refine a single temporary trajectory under smoothness and collision costs. We inherit the gradient-centric idea, but a one-path objective does not encode shared trunks, permanent cross-group tubes, or the multi-usage junction conflict of Sec. 2.4.
Fairing, CAD, and physics polish. Elastic-rod / curve fairing Moreton and Séquin [1992], Bergou et al. [2008] and clothoid primitives Fraichard and Scheuer [2004] motivate soft bend energies on one open curve; sparse circular-arc encodings are a poor fit for dense grid-routed manifolds. Parametric Hermite / NURBS centerlines are standard in CAD Piegl and Tiller [1997], yet manual fillets do not resolve multi-usage joins under hard clearance. Adjoint CFD / shape optimization sits downstream: it typically deforms a fixed channel layout and does not create a locally split junction (Sec. 2.5). Our contribution is the combination—branched, usage-coupled refine under permanent tubular occupancy—not any single fairing or collision ingredient.
4 Method
This section fixes the parameterization and the optimize loop; cost formulas are in Sec. 5.
4.1 Pipeline overview
For each group independently (cross-group coupling enters only through clearance):
-
Tree. Deduplicate the coarse grid / polyline embedding into an undirected tree (or forest): nodes are terminals and branch points; edges carry the coarse polylines and radii.
-
Junction partition. Grow junction complexes around degree- 3 nodes; label remaining edges as trunks (Sec. 4.2).
-
Hermite graph. Instantiate cubic Hermite segments on labeled edges. Trunk knots are shared; junction knots are private per labeled junction edge; ports and trunk-junction interfaces are clamped for by construction (Sec. 4.3).
-
Assemble & optimize. Sample usages, minimize soft by gradient steps, accept under hard clearance (Alg. 1).
Groups couple only through and the final accept test. Topology and are never rewritten.
4.2 Junction partition: where DOF are private
The hybrid rule is: share controls wherever usages share physical pipe; add private controls only where multi-usage curvature conflicts.
Grow complexes. Seed every tree node of degree . Grow a zone around each seed by tree-path length with threshold . After the zone grow, any connected trunk component whose total length is shorter than a threshold is absorbed into junction (so nearby seeds separated by a short trunk become one complex ). Edges inside are labeled junction; edges outside all complexes are trunk.
Variable layout. Table 4 summarizes roles after the label pass. When building the Hermite graph we apply one privatization rule: ports and complex interfaces keep a single global knot; every other sample on a labeled edge is private to that edge, so two junction edges that meet at the same coarse branch point do not share interior . Usages do not each own a full duplicate spline; they inherit geometry by walking the labeled edges on their tree path. Junction chains stay short, so new freedom appears only near the conflict in Fig. 1.
Table 4: Region roles after junction partition.
| Region | Geometry | Variables | Continuity |
|---|---|---|---|
| Trunk | Edges outside all complexes | Shared Hermite knots | Intrinsic (one curve) |
| Junction | Interior of complex | Private knots per labeled junction edge | Meets trunk at interface |
| Interface | Complex boundary | Shared endpoints (+ clamped tangents) | Hard ; hard by construction |
| Ports | Group terminals | Fixed position / axis tangent | Hard clamps |
Y example (how a local split appears). On with and , the coarse embedding places all three branches at one point . After partition, each usage is a short alternating chain of shared trunks and private junction edges:
Here , , and are shared Hermite geometry (every usage that enters that arm reads the same knots). The three junction edges , , and are independent: each has its own interior , even though they all start at the same coarse coordinates near . Thus and couple through , while can fair through without forcing a hairpin at a single shared point. Initialization copies the shared-junction layout, so the private junction knots begin coincident; during optimization they may separate and open the void in Fig. 1b—a continuous motion of already-private DOF, not a discrete mode switch.
4.3 Cubic Hermite representation
Each labeled edge is a chain of cubic Hermite segments. A segment with ends and is, for ,
with the standard Hermite basis
Thus , , , . Shared nodes enforce hard and : every incident segment reads the same .
Clamps. Port nodes fix p and align v with the prescribed unit vector. Interface nodes between trunk and junction share p (and, by construction, compatible v) so that usage walks stay across the complex boundary. Only movable trunk knots and private junction knots enter the decision vector x.
4.4 Assemble and optimize
Alg. 1 minimizes the soft objective of Sec. 5 by first-order steps on and accepts a design only under hard obstacle / cross-group clearance. Cost formulas are in Sec. 5; which first-order variant we use in practice is an implementation detail reported with the experiments.
Algorithm 1 Usage assembly and gradient refine (per multi-group instance)
Require: Hermite graphs , usages , weights, steps , refresh period
1: concatenate free node positions and tangents across groups
2: for do
3: write into the Hermite graphs
4: if or then
5: find candidate colliding pairs by proximity (broadphase): : tube samples vs obstacle primitives : tube samples of group vs group : nearby junction samples within a complex
6: end if
7: for each usage do
8: follow 's path on (shared trunks + private junctions)
9: sample Hermite segments along that path
10: end for
11: length / curvature on
12: spacing penalty on chord gaps
13: soft gaps on pairs in
14: soft compactness on pairs in
15:
16: differentiate w.r.t. through the sampling map (reverse-mode AD)
17: gradient-based update using
18: end for
19: write back; hard-check obstacle / cross-group clearance (no soft margin)
20: accept iff hard hit count = 0; else reject / raise clearance weights
Ensure: accepted Hermite graphs, or failure
5 Cost Functions
Alg. 1 minimizes a scalar soft objective
Terms below are evaluated on Hermite samples (and proximity pairs from Alg. 1).
5.1 Path costs
We set
Let be the set of Hermite segments (trunk and junction) and the set of unordered segment-segment joints discovered by walking usages.
Aggregation (not a naive usage sum). Chord energy charges each physical segment once,
(5) so a shared trunk is not multiplied by how many usages traverse it. Curvature sums segment interiors once and every distinct usage joint once,
Walking U is still required for K: the hairpin at a shared Y lives at which segments meet, even when trunk interiors were already scored. A naive (or over full usage polylines) would over-count shared material and over-pull trunks.
Chord energy. On a sample chain , we use squared chords rather than :
(with optional sample weights ). Squaring penalizes uneven gap distributions more strongly than raw chord length (one long chord costs more than several short ones of equal total length).
Radius-aware bend. The same centerline turn is worse for a fatter tube, so we penalize a dimensionless bend related to , not bare . With unit chords and turning angle
(preferred over arccos(t_{i-1} \cdot t_{i}), which is ill-behaved as ), the bend energy on a chain is
with chord lengths and . The same kernel is applied on segment interiors ( ) and on three-point windows at usage joints ( ).
5.2 Clearance
For two capsule / ball witnesses with centers a, b and radii , let and
where is a softplus hinge. Then
with summing over tube-obstacle pairs in and summing over cross-group pairs in (Alg. 1). Weights and scale the two sums.
Hard accept. After the loop we recompute residuals on obstacle / cross-group pairs without the soft margin used inside and accept only if the hard hit count is zero (Alg. 1). Capsule proxies are incomplete relative to exact swept solids, but sufficient for the geometric refine before CAD.
5.3 Junction union
Private junction patches are under-determined by and alone. Inside each complex , let be the samples of usage on junction edges of , and let be the usages that enter . For a point with radius and a curve with nearest-sample radius , set and
with cutoff factor . The pairwise Chamfer
then defines
While usages remain within about one radius sum, pulls them into a compact bundle; once they separate beyond the cutoff (local split, Fig. 1b), the force releases. Radius normalization keeps comparable across tube sizes.
5.4 Spacing regularizer
Hermite segments are sampled in the parameter , not in arc length. Without a spacing term, the optimizer can stretch so that large gaps open between samples: soft clearance and bend then see only a sparse, biased subset of the curve. We therefore use
where is the mean chord on the chain, to keep sample gaps comparable and reduce this parameterization artifact.
6 Experiments
We evaluate the hybrid refine on a synthetic multi-group suite with capsule clearance. The goal is to check that the method is usable at scale: hard clearance accept, dimensionless bend , and a clearly decreasing soft objective.
6.1 Setup
Instances. We use N=50 instances from hard_r2: each is a grid layout from the companion discrete router Deng [2025] (PLANESLICE corridors + PILLARFIELD obstacles), with 8 groups, 8 terminals per group, and uniform tube radius r=2. Coarse paths and declared usages are fixed inputs; the refine does not replan topology.
Protocol. All runs use capsule clearance, Chamfer junction union, and the costs of Sec. 5. Free Hermite DOF are updated for a budget of 1500 first-order steps (Alg. 1) with step size 0.01, soft clearance margin 0.15, and proximity-pair refresh every 10 steps. Weights are , , , , , .
Metrics.
- Success: fraction of instances with hard hit count (obstacle and cross-group; no soft margin).
- Path: aggregate true polyline length , max dimensionless bend , and voxel tube volume (accepted runs).
- Solve: wall time, final soft objective , and relative drop .
6.2 Results
Table 5 reports the batch. All 50 instances are accepted. Mean stays below one, and the soft objective drops by about 95% on average (). Mean wall time is about 160s per instance under this protocol.
Table 5: Hard_r2 refine with capsule clearance (). Means over all runs (all accepted).
| Success | Time (s) | Rel. drop | ||||
|---|---|---|---|---|---|---|
| 50/50 | 160 | 360 | 0.95 | 4298 | 0.97 |
Fig. 2 shows the full multi-group packing of instance 0 before and after refine (colors mark groups; obstacles omitted for clarity). Fig. 3 isolates one group so that grid corners vs. fair Hermite tubes are easier to read. Fig. 4 plots the soft objective for that run; drops sharply in the first few hundred steps and then plateaus.

Before (coarse)

After (refined)
Figure 2: All groups of instance 0 from hard_r2: coarse discrete paths (left) vs. refined Hermite tubes (right). Colors mark groups; obstacles omitted.

Before (coarse)

After (refined)
Figure 3: Single group of the same instance, obstacles omitted: coarse discrete paths (left) vs. refined Hermite tubes (right).
instance_0: objective

Figure 4: Soft objective J vs. iteration for instance 0 (hard_r2_w1 / Adam / capsule).
7 Conclusion
We formalized topology-preserving, multi-usage pipe centerline refinement under permanent tubular occupancy, and instantiated it with hybrid trunk-share / junction-split Hermite variables, soft path / clearance / union / spacing costs, and hard clearance at accept. On 50 hard multi-group synthetic instances with capsule clearance, the refine reaches full hard-accept success, , and about a 95% relative drop in the soft objective.
The objective here is geometric: K is a bend proxy, not pressure drop, and capsule clearance is a fast narrowphase rather than exact CAD interference. Fluid PDE polish and automatic weight schedules are left to later work; this report only claims a usable geometric stage between discrete multi-group routing and subsequent solid / physics optimization.
References
Gleb Belov, Wenbo Du, Maria Garcia de la Banda, Daniel Harabor, Sven Koenig, and Xin Wei. From multi-agent pathfinding to 3D pipe routing. In Proc. AAAI, pages 10257–10265, 2020.
Miklós Bergou, Max Wardetzky, Stephen Robinson, Basile Audoly, and Eitan Grinspun. Discrete elastic rods. ACM Transactions on Graphics, 27(3):63:1–63:12, 2008.
M. Blokland, R. D. van der Mei, J. F. J. Pruyn, and J. Berkhout. Literature survey on automatic pipe routing. Operations Research Forum, 4(35), 2023.
Deng. Multi-group pipe routing under permanent geometric occupancy: Problem, benchmark, and classical baselines, 2025. Companion technical report / manuscript.
Thierry Fraichard and Alexis Scheuer. From Reeds and Shepp's to continuous-curvature paths. IEEE Transactions on Robotics, 20(6):1025–1035, 2004.
Mrinal Kalakrishnan, Sachin Chitta, Evangelos Theodorou, Peter Pastor, and Stefan Schaal. STOMP: Stochastic trajectory optimization for motion planning. In Proc. IEEE International Conference on Robotics and Automation (ICRA), pages 4569–4574, 2011.
Henry P. Moreton and Carlo H. Séquin. Functional optimization for fair surface design. ACM SIGGRAPH Computer Graphics, 26(2):167–176, 1992.
Les Piegl and Wayne Tiller. The NURBS Book. Springer, 2 edition, 1997.
Christoph Rösmann, Wendelin Feiten, Till Wösch, Frank Hoffmann, and Torsten Bertram. Trajectory modification considering dynamic constraints of autonomous robots. In Proc. German Conference on Robotics (ROBOTIK), 2012. TEB local planner line of work.
John Schulman, Yan Duan, Jonathan Ho, Alex Lee, Ibrahim Awwal, Henry Bradlow, Jia Pan, Sachin Patil, Ken Goldberg, and Pieter Abbeel. Motion planning with sequential convex optimization and convex collision checking. In Proc. Robotics: Science and Systems (RSS), 2014.
Matt Zucker, Nathan Ratliff, Anca D. Dragan, Mihail Pivtoraiko, Matthew Klingensmith, Christopher M. Dellin, J. Andrew Bagnell, and Siddhartha S. Srinivasa. CHOMP: Covariant Hamiltonian optimization for motion planning. The International Journal of Robotics Research, 32(9):1164–1193, 2013.