IFC 4.4.0.0 build 20261005 (IFC4X4_DEV_20260525) ⚠ buildingSMART Working Draft. All content is under development.

  • Help suggest improvements
  • Get user or developer support

8.9.6.15 IfcNormalise

8.9.6.15.1 Semantic definition

{ .extDef}

8.9.6.15.2 Formal representation

FUNCTION IfcNormalise
(Arg : IfcVectorOrDirection)
: IfcVectorOrDirection;
LOCAL
Ndim : INTEGER;
V : IfcDirection
:= IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.,0.]);
Vec : IfcVector
:= IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector (
IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.,0.]), 1.);
Mag : REAL;
Result : IfcVectorOrDirection
:= V;
END_LOCAL;
IF NOT EXISTS (Arg) THEN
RETURN (?);
ELSE
IF 'IFC4X4_DEV_20260525.IFCVECTOR' IN TYPEOF(Arg) THEN
BEGIN
Ndim := Arg\IfcVector.Dim;
V.DirectionRatios := Arg\IfcVector.Orientation.DirectionRatios;
Vec.Magnitude := Arg\IfcVector.Magnitude;
Vec.Orientation := V;
IF Arg\IfcVector.Magnitude = 0.0 THEN
RETURN(?);
ELSE
Vec.Magnitude := 1.0;
END_IF;
END;
ELSE
BEGIN
Ndim := Arg\IfcDirection.Dim;
V.DirectionRatios := Arg\IfcDirection.DirectionRatios;
END;
END_IF;
Mag := 0.0;
REPEAT i := 1 TO Ndim;
Mag := Mag + V.DirectionRatios[i]*V.DirectionRatios[i];
END_REPEAT;
IF Mag > 0.0 THEN
Mag := SQRT(Mag);
REPEAT i := 1 TO Ndim;
V.DirectionRatios[i] := V.DirectionRatios[i]/Mag;
END_REPEAT;
IF 'IFC4X4_DEV_20260525.IFCVECTOR' IN TYPEOF(Arg) THEN
Vec.Orientation := V;
Result := Vec;
ELSE
Result := V;
END_IF;
ELSE
RETURN(?);
END_IF;
END_IF;
RETURN (Result);
END_FUNCTION;

8.9.6.15.3 References

Edit on Github

3 contributor(s): ArturTomczakDion MoultbSI-Bot
Last change: Improve definition split (#876) * bring back headers headers were previously removed by mistake, now bringing them back * add new lines and rename the tag add the word 'short' in it * unify newlines make exactly one newline before and two after the tag * resolving typos Because bringing back headers required to go back in time to previous version, I'm now re-resolving the issues: #861, #860, #856 by ArturTomczak on 2024-07-16T16:07:28+02:00

Is this page difficult to understand? Let us know!

8.9.6.15.4 Changelog

8.9.6.15.4.1 IFC4

  • ,