Select to view content in your preferred language

How to get Z-value of intersection point between 3D polyline and Multipatch using GeometryEngine?

272
3
Jump to solution
06-30-2025 07:23 PM
rdc_hirohara
Occasional Contributor

Hi all,

I'm trying to get the Z-value of the intersection point between a 3D polyline (i.e., a vertical ray) and a Multipatch feature using the ArcGIS Pro SDK (GeometryEngine.Instance.Intersection), but it seems I'm unable to get a valid result.

What I’ve tried:

  • I created a Multipatch feature using Layer 3D To Feature Class. The shape has varying Z values (e.g., west side at 10 meters, east side at 10,000 meters), confirmed via inspection.
  • I constructed a 3D polyline (ray) that vertically spans from Z = -10,000 to Z = +10,000 through a known XY coordinate within the Multipatch's extent.
  • I verified that GeometryEngine.Instance.Intersects(multipatch, ray) returns true.
  • However, calling GeometryEngine.Instance.Intersection(multipatch, ray, GeometryDimensionType.EsriGeometry0Dimension) returns an empty geometry.
  • I also tried EsriGeometry1Dimension and even the overload without specifying the dimension — in some cases I got a Polyline or Multipoint, but none of the returned geometries had valid Z values (Z = NaN).
  • Trying EsriGeometry3Dimension throws an exception: Value does not fall within the expected range.

My question:

  • Is it possible to obtain the correct Z-value of the intersection point between a 3D polyline and a Multipatch using only GeometryEngine in ArcGIS Pro SDK?
  • Or is the only reliable way to do this via the “Intersect 3D Line With Multipatch” geoprocessing tool (which requires the 3D Analyst extension)?
  • If anyone has an SDK-only workaround (e.g., ray-triangle intersection manually on the Multipatch), I’d be happy to hear it.

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
AnnetteLocke
Esri Contributor

Hi,

We will add a “Intersect 3D Line With Multipatch” method to Geometry Engine in a future release. Thanks for the suggestion.

Annette

View solution in original post

0 Kudos
3 Replies
rdc_hirohara
Occasional Contributor

Update:

I was able to get the expected Z-value using the “Intersect 3D Line With Multipatch” geoprocessing tool, which does require the 3D Analyst extension. It correctly returns POINT Z features at the intersection.

So the issue is technically resolved — but I'm still curious if anyone knows of a way to do this using only the ArcGIS Pro SDK (GeometryEngine or other SDK APIs), without relying on GP tools.

Would be helpful for writing fully self-contained Add-ins.

Thanks again!

0 Kudos
AnnetteLocke
Esri Contributor

Hi,

We will add a “Intersect 3D Line With Multipatch” method to Geometry Engine in a future release. Thanks for the suggestion.

Annette

0 Kudos
rdc_hirohara
Occasional Contributor

Thanks! Looking forward to that.

0 Kudos