private void AddGeometry2Constraint(FEAConstraintBase constraintRep,
                                    MgaFCO geometryFCO,
                                    string tipContextPath, bool addcomputations)
        {
            GeometryTraversal traverser = new GeometryTraversal();
            traverser.TraverseGeometry(geometryFCO);

            CADGeometry geomRep = FillOutGeometryRep(geometryFCO,
                                                     tipContextPath);

            if (addcomputations)
            {
                foreach (var point in geomRep.GeometryFeatures)
                {
                    TBComputation tbcomputation = new TBComputation();
                    tbcomputation.ComputationType = TBComputation.Type.POINTCOORDINATES;
                    tbcomputation.MetricID = point.ComponentID + ":" + point.DatumName;
                    tbcomputation.RequestedValueType = "Vector";
                    tbcomputation.FeatureDatumName = point.DatumName;
                    tbcomputation.ComponentID = point.ComponentID;

                    StaticComputations.Add(tbcomputation);
                }
            }

            if (geomRep != null)
            {
                constraintRep.AddGeometry(geomRep);
                this.Constraints.Add(constraintRep);
            }
            
        }
        /*
        private void AddGeometry2Constraint(FEAConstraintBase constraintRep, 
                                            MgaFCO geometryFCO,
                                            string tipContextPath)
        {
            GeometryTraversal traverser = new GeometryTraversal();
            traverser.TraverseGeometry(geometryFCO);

            foreach (var geometryFound in traverser.geometryFound)
            {
                CyPhy.GeometryTypes geometryCyPhy = CyPhyClasses.GeometryTypes.Cast(geometryFound);
                if (Path.GetDirectoryName(geometryCyPhy.Path).Contains(tipContextPath))            // within context of TIP
                {
                    FEAGeometry geomRep = CreateGeometry(geometryCyPhy);
                    if (geomRep != null)
                    {
                        constraintRep.AddGeometry(geomRep);
                        this.Constraints.Add(constraintRep);
                    }
                }
            }
        }

        private void AddGeometry2Load(FEALoadBase loadRep,
                                      MgaFCO geometryFCO,
                                      string tipContextPath)
        {
            GeometryTraversal traverser = new GeometryTraversal();
            traverser.TraverseGeometry(geometryFCO);

            foreach (var geometryFound in traverser.geometryFound)
            {
                CyPhy.GeometryTypes geometryCyPhy = CyPhyClasses.GeometryTypes.Cast(geometryFound);
                if (Path.GetDirectoryName(geometryCyPhy.Path).Contains(tipContextPath))            // within context of TIP
                {
                    FEAGeometry geomRep = CreateGeometry(geometryCyPhy);
                    if (geomRep != null)
                    {
                        loadRep.AddGeometry(geomRep);
                        this.Loads.Add(loadRep);
                    }
                }
            }
        }
        */

        private void AddGeometry2Constraint(FEAConstraintBase constraintRep,
                                    MgaFCO geometryFCO,
                                    string tipContextPath)
        {
            GeometryTraversal traverser = new GeometryTraversal();
            traverser.TraverseGeometry(geometryFCO);

            CADGeometry geomRep = FillOutGeometryRep(geometryFCO,
                                                     tipContextPath);
            if (geomRep != null)
            {
                constraintRep.AddGeometry(geomRep);
                this.Constraints.Add(constraintRep);
            }           
            
        }