We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a Polyline3D and a Point2D (which belongs to it, in a 2D - XY view), find the corresponding Z coordinate.
Polyline3D
Point2D
Same for a Polygon3D.
Polygon3D
something like this
Func<G.Polyline3D, G.Point2D, double> GetZ = (G.Polyline3D _polyline, G.Point2D _p_2d) => { var _vertical_intersection = _polyline.Intersection(G.Line3D.FromDirection(new G.Point3D(_p_2d.U, _p_2d.V, 0), G.Vector3D.AxisZ), decimal_precision); if (_vertical_intersection.ValueType == typeof(G.Point3D)) { return ((G.Point3D)_vertical_intersection.Value).Z; } if (_vertical_intersection.ValueType == typeof(G.PointSet3D)) { return ((G.PointSet3D)_vertical_intersection.Value).First().Z; } throw new Exception("failed to find z-coordinate for point (2D) on polyline (3D)"); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given a
Polyline3D
and aPoint2D
(which belongs to it, in a 2D - XY view), find the corresponding Z coordinate.Same for a
Polygon3D
.something like this
The text was updated successfully, but these errors were encountered: