From a75ce094cc4c3572caa6a0fb846bb7527d682ac5 Mon Sep 17 00:00:00 2001 From: Jarkko Nieminen Date: Mon, 2 Feb 2026 15:51:04 +0200 Subject: [PATCH] Fixed issue #295 --- CADability/Make3D.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CADability/Make3D.cs b/CADability/Make3D.cs index b0fb9191a..1410c95dd 100644 --- a/CADability/Make3D.cs +++ b/CADability/Make3D.cs @@ -1008,7 +1008,11 @@ public static IGeoObject MakePipe(IGeoObject faceShellOrPath, Path along, Projec } if (pos >= 0.0) { // position the face at the beginning of the curve - GeoVector normal = (along.StartDirection ^ along.EndDirection).Normalized; + GeoVector normal; + if (along.StartDirection != along.EndDirection) + normal = (along.StartDirection ^ along.EndDirection).Normalized; + else + along.StartDirection.ArbitraryNormals(out normal, out _); GeoVector dir = along.DirectionAt(pos).Normalized; ModOp m = ModOp.Fit(along.PointAt(pos), new GeoVector[] { dir, normal, normal ^ dir }, along.StartPoint, new GeoVector[] { along.StartDirection.Normalized, normal, normal ^ along.StartDirection.Normalized });