Class NwcGridSystem
- Namespace
- NwcIO.Model.Grids
- Assembly
- NwcIO.dll
A 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 NwcGridSystemInheritance
Inherited Members
Constructors
NwcGridSystem()
public NwcGridSystem()NwcGridSystem(string)
public NwcGridSystem(string name)Parameters
namestring
Properties
Lines
public List<NwcGridLine> Lines { get; }Property Value
Name
public string Name { get; set; }Property Value
Methods
AddLine(NwcGridLine)
Adds a grid line to the system.
public NwcGridLine AddLine(NwcGridLine line)Parameters
lineNwcGridLine
Returns
AddLine(string, Vector3d, Vector3d, double, string?)
Adds a grid line to the system by name and endpoints.
public NwcGridLine AddLine(string name, Vector3d start, Vector3d end, double elevation = 0, string? systemName = null)Parameters
Returns
AssignGridLocations(NwcClashTest)
Automatically populates NwcIO.Model.Clash.NwcClashResult.GridLocation for all clash results in a test.
public int AssignGridLocations(NwcClashTest test)Parameters
testNwcClashTest
Returns
AssignGridLocations(NwcDocument)
Populates NwcIO.Model.Clash.NwcClashResult.GridLocation across all clash tests in a document.
public int AssignGridLocations(NwcDocument doc)Parameters
docNwcDocument
Returns
ExtractFromDocument(NwcDocument)
Automatically extracts grid lines from scene graph nodes if present.
public static NwcGridSystem ExtractFromDocument(NwcDocument doc)Parameters
docNwcDocument
Returns
FindNearestGrid(Vector3d, out double, bool)
Finds the nearest grid line to the specified 3D point.
public NwcGridLine? FindNearestGrid(Vector3d point, out double distance, bool segmentOnly = false)Parameters
Returns
FindNearestIntersection(Vector3d, out double)
Finds the nearest grid intersection (e.g. "A / 1") to the specified 3D point.
public NwcGridIntersection? FindNearestIntersection(Vector3d point, out double distance)Parameters
Returns
FormatLocation(Vector3d, 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(Vector3d point, double snapTolerance = 0.05)Parameters
Returns
GetIntersections()
Calculates all 2D/3D intersection points between crossing grid lines in this system.
public IReadOnlyList<NwcGridIntersection> GetIntersections()Returns
LoadXml(string)
Loads a grid system from an XML file.
public static NwcGridSystem LoadXml(string path)Parameters
pathstring
Returns
ReadXml(Stream)
Loads a grid system from an XML stream.
public static NwcGridSystem 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