DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
332 stars 184 forks source link

Surface.CoordinateSystemAtParameter ignores surface normals #2308

Open ThomasMahon opened 5 years ago

ThomasMahon commented 5 years ago

Dynamo version

1.3.3

Operating system

Win 10

What did you do?

used Surface.CoordinateSystemAtParameter on surfaces extracted from a Revit roof element

What did you expect to see?

The coordinate systems orientated relative to the surface normals.

What did you see instead?

Inconsistent results; it treats all surfaces with an 'up' direction determined from the global coordinate system, meaning the cs's are effectively located on the back face of the surface.

Z axis of coordinate system should be orientated like this (i.e. use the surface normal): image

Instead, it does this (in the example, the underside 'downward' facing surfaces have cs's effectively placed on their backface): image

AndyDu1985 commented 4 years ago

With node, Element.Geometry, the direction are expected, the direction for down faces are point to down side. But with Topology.Faces or Geometry.Explode, the direction for down faces are point to up. The information is lost. I think this is related to geometry algorithm of Dynamo Core. Do you have any ideas? @QilongTang @mjkkirschner

ThomasMahon commented 4 years ago

Hi @AndyDu1985 it cant be caused by geometry explode for the following reasons:

  1. The surfaces are derived from Element.Faces (not unless explode is embedded in this method?)
  2. Using Surface.NormalAtParameter yields the correct result - using the same surfaces with Surface.CoordinateSystemAtParameter does not, and that's the problem.

image

Images in the OP explain the rest of the story.

AndyDu1985 commented 4 years ago

@ThomasMahon , thank you for your explaination. So it is only related to Surface.CoordinateSystemAtParameter.

ThomasMahon commented 4 years ago

Based on the empirical evidence, yes!