Celtic Knotwork self-intersections and intersections

Hi @Baris

This line
public class PolyPrism : SpaceMorph
means that the PolyPrism class I create inherits from SpaceMorph
which is a class in RhinoCommon that can be helpful when creating tools for deforming multiple types of geometry.
(SpaceMorph Class)
I provide a recipe* for deforming any single given Point3d by writing an override for the abstract method MorphPoint. What SpaceMorph does is apply that recipe to any geometry given as input when I call the Morph method.
For things like polylines, pts and meshes this could all be achieved with a method to move the control points directly without using SpaceMorph, but the neat thing about SpaceMorph is that it will also work on things like Breps and trimmed surfaces, even changing the control point structure if necessary. It’s the same Universal Deformation Technology (UDT) used in the deformer tools like Bend.

*in this case the specific point deformation recipe I use is a modification of Mean Value Coordinates which is a way to map smoothly from one polygon to another, similar to what I showed here.

Here’s another example showing the ‘PreserveStructure’ setting for SpaceMorphs. When it is true, you get just a simple morphing of the control points, but when false, you can see it is actually adding new control points in order to give a better mapping:
SpaceMorph_MVC_structure_example.gh (11.8 KB)