Hi Lee, I do not fully understand the question, but I know one way to create constraints in SOFA, using the Compliant plugin.
Basically, you use a Mapping to compute a value that you want to keep null. In your case, you need a Mapping class (or MultiMapping for lines belonging to different objects) that computes the distance between the two lines.