# Square peg in a round hole

**URL:** <https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318>\
**Category:** Modeling Questions\
**Created:** [December 12, 2023, 3:19pm UTC](https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318 "2023-12-12T15:19:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flux\_capacitor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/flux_capacitor/32/18222_2.png) [@flux\_capacitor](https://discourse.shapr3d.com/u/flux_capacitor)\
**Post date:** [December 12, 2023, 3:19pm UTC](https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318/1 "2023-12-12T15:19:53Z")

</div>

I have two ducts : one with a square section, the other being a round pipe.  
The square duct has an inner section 1×1 = 1 m²  
The round pipe has an I.D. of 1128.38 mm giving the exact same cross section (π × r² = 1 m²)  
Their thickness and outer diameter is rather irrelevant to the problem here, but their walls are 10 mm thick. The two ducts are located 1 meter apart and are aligned on a common axis.

 ![ducts](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/d/b/db52df848a0321412f1586d70335c1f28a31d90c.jpeg)

How can I connect or join in Shapr3D the two ducts with **a coupler of gradually changing geometry keeping the same constant cross-section**? Of course the coupler needs to be tangent to either duct in each connection point.

In SketchUp for example, there is the “From Contrours” tool that draws a surface between two distant contours (lines or curves) like a stretched sheet. It’s quite perfectible but in a mesh 3D software one can always modify manually the triangles afterward.

In Shapr3D, I do not see any equivalent tool. I tried to move the base of a cylinder away from the face of a (bigger) cube but it acts in a way that the resulting coupler (see the yellow part in the second picture below) has walls that are not tangent to the walls of the square duct. It looks a bit like the mountain in _Close Encounters of the Third Kind_ 👽

 ![wrong coupler](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/2/5/25051d73fb7195dcabae4591565b831734836ab0.jpeg)

Project attached.

Any clue?

[Square peg in a round hole.shapr](https://discourse.shapr3d.com/uploads/short-url/uPyfHmN7H0EdmCFImDrccj69npN.shapr) (9.1 KB)

---

<div class="post-metadata">

**Author:** ![McD](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/mcd/32/15504_2.png) [@McD](https://discourse.shapr3d.com/u/McD)\
**Post date:** [December 12, 2023, 3:41pm UTC](https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318/2 "2023-12-12T15:41:39Z")

</div>

Have you tried the Loft command? Select the facing surface of each other, then try Loft.

---

<div class="post-metadata">

**Author:** ![Bob3DPO](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@Bob3DPO](https://discourse.shapr3d.com/u/Bob3DPO)\
**Post date:** [December 12, 2023, 3:51pm UTC](https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318/3 "2023-12-12T15:51:21Z")

</div>

Hi @flux_capacitor ,

You need to make your objects solid (without a hole). **Offset** faces inwards until no hole. Then **Loft** the faces of the two parts. Then **Union** the 3 pieces together and finally **Shell** to get the thickness. That will give you this:

 ![IMG_0438](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/f/5/f5555c97be0c004c9d4adbed6044b9a103ebab67.jpeg)  
[Square peg in a round hole 2.shapr](https://discourse.shapr3d.com/uploads/short-url/1z1nfkXwjRrSo6SdpVKLfkuFSkt.shapr) (27.4 KB)

---

<div class="post-metadata">

**Author:** ![Peter\_Gy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/peter_gy/32/9251_2.png) [@Peter\_Gy](https://discourse.shapr3d.com/u/Peter_Gy)\
**Post date:** [December 12, 2023, 3:55pm UTC](https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318/4 "2023-12-12T15:55:23Z")

</div>

Yes, indeed Loft will be your solution here.

A few caveats:

- if you want the ends to be tangent, you’d need the [Parametric Beta](https://www.shapr3d.com/download/beta) version. In that you are able to open the history step created for the Loft and can change the continuity level at the start end the end (we’ll create a better UX for this soon, but that’s the only option right now)  
 ![Screenshot 2023-12-12 at 16.47.34](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/a/7/a79fc0a51437a4ad908ac26352eebe7b486bca3e.jpeg)
- for the Loft to work, you’d need both sides to have convex faces (they should be a cube and a cylinder) or if that’s impractical, you could create sketches dedicated for this to which you project the body edges and use the outer ones
- you can then Union the bodies together and use Shell (selecting both end faces) to make the end result hollow again

Is this something like what you’d want to achieve?

---

<div class="post-metadata">

**Author:** ![flux\_capacitor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/flux_capacitor/32/18222_2.png) [@flux\_capacitor](https://discourse.shapr3d.com/u/flux_capacitor)\
**Post date:** [December 12, 2023, 4:09pm UTC](https://discourse.shapr3d.com/t/square-peg-in-a-round-hole/29318/5 "2023-12-12T16:09:44Z")

</div>

LOFT. Then hollow with SHELL. Of course! Thank you very much guys 🙂  
The use of the parametric function is also very interesting, thank you also for this 2nd advice 👌
