private void removeExistingFromShapeRep(List<IfcGridAxis> axis)
{
if (axis == null || axis.Count == 0)
return;
IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape;
if (pds != null)
{
foreach (IfcShapeModel sm in pds.Representations)
{
IfcShapeRepresentation sr = sm as IfcShapeRepresentation;
if (sr != null)
{
foreach (IfcRepresentationItem gri in sr.Items)
{
IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet;
if (curveSet != null)
curveSet.removeElements(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve));
}
}
}
}
}