Solved

Lack of precision with Arc Intersection Points: They Do Not Actually Intersect

  • 29 December 2023
  • 9 replies
  • 14 views

Badge +5

I am trying to generate a point coordinate at the midpoint of Arcs. These Arcs have a very large radius and a tiny sweep, so they look like lines, but they are parts of a larger Arc. Whether I try the arc.GetMidPoint() method, or use Intersector with a crossing line, the point is always off. When I run the features through the SpatialRelator, it returns 0 _related_suppliers.

 

It looks fine at first glance, but zooming in reveals that the intersection point really is NOT intersecting. My hunch is that this is due to the Point being calculated as a float. When using the Intersector or PointOnLineOverlayer, it actually changes the shape of the Arc!

 

Here are some pics to illustrate:

Midpoint of Arc at a distance

PointAtArc1 Intersection point at a distance.PointAtArc2"Intersected" Point from Intersector lines (purple), with actual Arc (grey) close up. It intersects with the Intersector-created Arc, but not with the input Arc:WorkspaceSnip_CloseHere is what I am running the features through to verify. Note: If I input both Intersector outputs into the SpatialRelator, it returns _related_suppliers as 'INTERSECTS' fine. But, the Arc coming out of the Intersector is not the same as what was input.

WorkspaceSnipJust the Arc and 'Intersection' Point:

ArcAndPointWhy do I need this precision? The intersecting points are where a Revit Mullion/Gridline element should be placed on a Curtain Wall location line. My script works fine when it is just regular lines, but always errors on the points intersecting with Arcs...because they don't actually intersect. You would think that an FME transformer or Geometry method, generating an intersecting node, would show up correctly in the SpatialRelator, but it does not.

 

Is there a workaround or better way to do this in FME?

Any insight is appreciated.

 

Thanks,

-L

icon

Best answer by DanAtSafe 3 January 2024, 21:31

View original

9 replies

Userlevel 2
Badge +11

Hi @larue​ Arcs are stroked for display in the Data Inspector. Could this be what you're seeing?

Badge +5

Hi @larue​ Arcs are stroked for display in the Data Inspector. Could this be what you're seeing?

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

Userlevel 2
Badge +11

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

@larue​ Can you share any sample data here? Or submit data with a case at https://community.safe.com/s/submit-case ? Thanks

Badge +5

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

Hi Dan, I have created a small Workspace and CAD file to illustrate what is going on. If you think it is worthy of escalating to a case, I will be happy to submit. Thanks for your time.

 

-L

Badge +5

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

And the CAD data...

Userlevel 2
Badge +11

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

Hi @larue​ Thanks for the workspace and data. There are two issues here:

  1. Yes, there's a change because of float calculations, but it's not as much as you think. If I use a NeighborFinder to compare the nodes from the Intersector with the original arcs, the greatest difference is only 1.8749713606747085e-12 units.
  2. The Data Inspector strokes arcs for display, the same as using an ArcStroker with the default of 0 Interpolated Edges. To get a more accurate rendering of the arcs, use an ArcStroker and Stroke By Maximum Deviation. e.g. If that Maximum Deviation is set to 1.8749713606747085e-12 then the longest arc from your REALDWG file will have 3716953 vertices!
Badge +5

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

Hi @danatsafe​ ,

Thanks for taking a look. Yes, I realize the difference is very very small between the points, but it is enough that the SpatialRelator does not recognize it as an intersect. That is the main issue. Are you saying that if I use Stroke By Max Deviation, the SpatialRelator will pick it up? Did you try this? I'll give it shot on my end. If it does not work, then at least I know what FME's limits are. BTW, I figured out a non-FME workaround (Revit API). I get it, Arcs are tough!

 

Best,

@larue​ 

Userlevel 2
Badge +11

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

I've added this question to FMEENGINE-16015 which is a request to add a Tolerance to the SpatialRelator like there is in the Intersector.

No, the SpatialRelator won't pick up the finely-stroked arcs. (I tried that.) I was testing the limitations of the Data Inspector for displaying arcs.

Badge +5

Hi Dan,

Stroked Arcs are lines, yes? What I am seeing in the Feature Inspector is a continuous Arc slightly off from the input Arc. That is what the grey (original) and purple(new) lines are in the 3rd screenshot.

 

Regardless, when input into the Spatial Relator, it does not recognize the point as intersecting (or touching, etc.) the Arc. But, if I were to connect the Intersector's 'Intersected' output to the SpatialRelator's 'Supplier' input (keeping the 'Node' input to Requestor), it will return several _related_suppliers. I'm wondering if it is not able to calculate precisely enough due to the large radius/small sweep size and alters the Arc to make it work? The radii are ~3200 inches with sweeps ~4 to 5 degrees.

Yeah, I found the same thing. Also, having a 500k-coordinate line is not fun to deal with!

If they used Decimal instead of Float precision, maybe it would be better? That would be my question. Thanks again, I think we have gone as far as we can.

Best,

@larue​ 

Reply