IFC 4.3.2.20241204 (IFC4X3_ADD2) under development

8.9.6.19 IfcSameCartesianPoint

8.9.6.19.1 Semantic definition

The function compares two IfcCartesianPoint's and ensures that they are the same (with an epsilon precision factor).

8.9.6.19.2 Formal representation

FUNCTION IfcSameCartesianPoint
 (cp1, cp2 : IfcCartesianPoint; Epsilon : REAL)
 : LOGICAL;
  
  LOCAL
    cp1x : REAL := cp1.Coordinates[1];
    cp1y : REAL := cp1.Coordinates[2];
    cp1z : REAL := 0;
    cp2x : REAL := cp2.Coordinates[1];
    cp2y : REAL := cp2.Coordinates[2];
    cp2z : REAL := 0;
  END_LOCAL;

  IF (SIZEOF(cp1.Coordinates) > 2) THEN
    cp1z := cp1.Coordinates[3];
  END_IF;

  IF (SIZEOF(cp2.Coordinates) > 2) THEN
    cp2z := cp2.Coordinates[3];
  END_IF;

  RETURN (IfcSameValue(cp1x,cp2x,Epsilon) AND
          IfcSameValue(cp1y,cp2y,Epsilon) AND
          IfcSameValue(cp1z,cp2z,Epsilon));

END_FUNCTION;

8.9.6.19.3 References

Edit on Github


Is this page difficult to understand? Let us know!