ifcpatch.recipes.SetFalseOrigin

Module Contents

class ifcpatch.recipes.SetFalseOrigin.Patcher(file, logger, name: str = 'EPSG:1234', x: str | float = '0', y: str | float = '0', z: str | float = '0', e: str | float = '0', n: str | float = '0', h: str | float = '0', gn_angle: str | float = '0', rotate_angle: str | float = '0')

Sets local coordinates XYZ as a (false) origin that correlates to map coordinates ENH

The recommended workflow is to specify a projected CRS name (e.g. EPSG:1234). The local XYZ coordinate will become the new local origin in IFC (we call this the false origin). A map conversion will be added that correlates that origin to eastings, northings, and orthogonal height.

On IFC2X3 models, a EPset_MapConversion is used.

If the map projected CRS name is left blank, it merely transforms the model such that the current point XYZ now becomes the point ENH (still in local coordinates). The Grid North angle is ignored. Any existing georeferencing is purged. This workflow not recommended, but may be is relevant for BIM software that does not properly support map coordinates.

Parameters:
  • x – The local X coordinate in project units which will become the new false origin.

  • y – The local Y coordinate in project units which will become the new false origin.

  • z – The local Z coordinate in project units which will become the new false origin.

  • e – The easting in project units which the false origin correlates to.

  • n – The northing in project units which the false origin correlates to.

  • h – The height in project units which the false origin correlates to.

  • gn_angle – The anticlockwise angle to grid north.

  • rotate_angle – An anticlockwise angle to rotate the model by if necessary (pivoted by the false origin).

Example:

# Set the current origin 0,0,0 to correlate to map coordinates 1000,1000,0 and a grid north of 15.
ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "SetFalseOrigin", "arguments": ["EPSG:1234", 0, 0, 0, 1000, 1000, 0, 15, 0]})
patch()
e
file
gn_angle
h
logger
n
name = 'EPSG:1234'
rotate_angle
x
y
z