Table of Contents

Class IfcGridSystem

Namespace
IfcIO.Grids
Assembly
IfcIO.dll

Spatial grid system containing reference axes and lines (e.g. A, B, C / 1, 2, 3), capable of computing intersections, locating 3D coordinates relative to grids, and populating clash grid location tags.

public sealed class IfcGridSystem

Inheritance

Inherited Members

Constructors

IfcGridSystem()

public IfcGridSystem()

IfcGridSystem(string)

public IfcGridSystem(string name)

Parameters

name string

Properties

Axes

public List<IfcGridAxis> Axes { get; }

Property Value

List<IfcGridAxis>

Name

public string Name { get; set; }

Property Value

string

Methods

AddAxis(IfcGridAxis)

Adds a grid axis to the system.

public IfcGridAxis AddAxis(IfcGridAxis axis)

Parameters

axis IfcGridAxis

Returns

IfcGridAxis

AddAxis(string, IfcVector3, IfcVector3, double, string?)

Adds a grid axis by tag and endpoints.

public IfcGridAxis AddAxis(string tag, IfcVector3 start, IfcVector3 end, double elevation = 0, string? gridName = null)

Parameters

tag string
start IfcVector3
end IfcVector3
elevation double
gridName string?

Returns

IfcGridAxis

AssignGridLocations(IfcClashReport)

Assigns grid locations to all clash results in an IfcIO.Clash.IfcClashReport.

public int AssignGridLocations(IfcClashReport report)

Parameters

report IfcClashReport

Returns

int

AssignGridLocations(IfcModel)

Assigns grid locations across elements in an IfcIO.IfcModel.

public int AssignGridLocations(IfcModel model)

Parameters

model IfcModel

Returns

int

ExtractFromModel(IfcModel)

Extracts grid axes from an IFC model by scanning for IFCGRID entities or grid proxy elements.

public static IfcGridSystem ExtractFromModel(IfcModel model)

Parameters

model IfcModel

Returns

IfcGridSystem

FindNearestAxis(IfcVector3, out double, bool)

Finds the nearest grid axis to the specified 3D point.

public IfcGridAxis? FindNearestAxis(IfcVector3 point, out double distance, bool segmentOnly = false)

Parameters

point IfcVector3
distance double
segmentOnly bool

Returns

IfcGridAxis?

FindNearestIntersection(IfcVector3, out double)

Finds the nearest grid intersection (e.g. "A / 1") to the specified 3D point.

public IfcGridIntersection? FindNearestIntersection(IfcVector3 point, out double distance)

Parameters

point IfcVector3
distance double

Returns

IfcGridIntersection?

FormatLocation(IfcVector3, double)

Formats a human-readable grid location descriptor for a 3D coordinate (e.g. "A / 1", "A (+1.20m) / 2 (-0.50m)").

public string FormatLocation(IfcVector3 point, double snapTolerance = 0.05)

Parameters

point IfcVector3
snapTolerance double

Returns

string

GetIntersections()

Calculates all 2D/3D intersection points between crossing grid axes.

public IReadOnlyList<IfcGridIntersection> GetIntersections()

Returns

IReadOnlyList<IfcGridIntersection>

LoadXml(string)

Loads a grid system from an XML file.

public static IfcGridSystem LoadXml(string path)

Parameters

path string

Returns

IfcGridSystem

ReadXml(Stream)

Loads a grid system from an XML stream.

public static IfcGridSystem ReadXml(Stream stream)

Parameters

stream Stream

Returns

IfcGridSystem

SaveXml(string)

Saves the grid system to an XML file.

public void SaveXml(string path)

Parameters

path string

SaveXml(Stream)

Saves the grid system to an XML stream.

public void SaveXml(Stream stream)

Parameters

stream Stream