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 IfcGridSystemInheritance
Inherited Members
Constructors
IfcGridSystem()
public IfcGridSystem()IfcGridSystem(string)
public IfcGridSystem(string name)Parameters
namestring
Properties
Axes
public List<IfcGridAxis> Axes { get; }Property Value
Name
public string Name { get; set; }Property Value
Methods
AddAxis(IfcGridAxis)
Adds a grid axis to the system.
public IfcGridAxis AddAxis(IfcGridAxis axis)Parameters
axisIfcGridAxis
Returns
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
tagstringstartIfcVector3endIfcVector3elevationdoublegridNamestring?
Returns
AssignGridLocations(IfcClashReport)
Assigns grid locations to all clash results in an IfcIO.Clash.IfcClashReport.
public int AssignGridLocations(IfcClashReport report)Parameters
reportIfcClashReport
Returns
AssignGridLocations(IfcModel)
Assigns grid locations across elements in an IfcIO.IfcModel.
public int AssignGridLocations(IfcModel model)Parameters
modelIfcModel
Returns
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
modelIfcModel
Returns
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
pointIfcVector3distancedoublesegmentOnlybool
Returns
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
pointIfcVector3distancedouble
Returns
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
pointIfcVector3snapTolerancedouble
Returns
GetIntersections()
Calculates all 2D/3D intersection points between crossing grid axes.
public IReadOnlyList<IfcGridIntersection> GetIntersections()Returns
LoadXml(string)
Loads a grid system from an XML file.
public static IfcGridSystem LoadXml(string path)Parameters
pathstring
Returns
ReadXml(Stream)
Loads a grid system from an XML stream.
public static IfcGridSystem ReadXml(Stream stream)Parameters
streamStream
Returns
SaveXml(string)
Saves the grid system to an XML file.
public void SaveXml(string path)Parameters
pathstring
SaveXml(Stream)
Saves the grid system to an XML stream.
public void SaveXml(Stream stream)Parameters
streamStream