DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
336 stars 187 forks source link

FaceAnalysisDisplay.ByViewFacePointsAndValues node only works on single surface #2304

Open Lexiko opened 8 years ago

Lexiko commented 8 years ago

Dynamo version

0.9.2

Operating system

Windows 7

What did you do?

Run FaceAnalysisDisplay.ByViewFacePointsAndValues and FaceAnalysisDisplay.ByViewSurfaceData

What did you expect to see?

Coloured surfaces in Revit relating to analysis results

What did you see instead?

Node outputs more than one Revit.Display and only one surface gets colorized in Revit I've also started a thread here: http://dynamobim.org/forums/topic/face-analysis-display-by-view-face-points-and-values-node-bug/ archilab

ikeough commented 8 years ago

@Lexiko Sorry for the delay in reply. I think this might be a limitation of the Revit API which Dynamo is doing of good job of un-masking :( I have to check the API documentation, but I believe only one analysis display object is allowed in the view at one time, and Dynamo is creating an analysis display object for each surface. I need to investigate.

Lexiko commented 8 years ago

Yeah, that’s what my gut is telling me too. @ksobon has a node in archi-lab which creates a colored surface view(it seems to work with two surfaces: http://archi-lab.net/colored-surface-analysis-display-with-mantis-shrimp-and-ladybug-continued/). He uses it with mantis shrimp to bring in surfaces from grasshopper but I presume it should work the same with geometry out of revit. I tried to use it in my graph (see image in original post) but I keep getting a “null” result. I’m afraid I don’t know any programming syntax to figure it out myself :P

dimven commented 8 years ago

Had a quick look at @ksobon 's implementation. The SpatialFieldManager allows for multiple surface references: 2016-04-22_11-23-40

2016-04-22_11-14-15

However Dynamo's implementation clears the "buffer" before adding each new surface:

https://github.com/ikeough/DynamoRevit/blob/Autogen/src/Libraries/RevitNodes/AnalysisDisplay/FaceAnalysisDisplay.cs#L45

Most likely it was done because it would be difficult to know if the newly added data is an update to an existing face reference or an entirely new instance?

ksobon commented 8 years ago

@dimven I can't believe you actually got my nodes to work. I thought they were just old and broken but at the same time I haven't used that particular node in a while. One issue I always had with these nodes was remapping of the UVs from Rhino UVs to Revit UVs as imported Rhino surfaces would get randomly flipped. Also, flat surfaces are a bit of a pickle for Revit when it comes to mapping UVs. For some reason it always kept the original domain of the surface rather then remapping it to 0-1 as it does with all other surfaces (nurbs). I am glad you got it working though.

ParametricMonkey commented 8 years ago

@ksobon This is a parallel topic. Any ideas of why this is failing and any suggestions on better workflows? https://github.com/ladybug-analysis-tools/ladybug-dynamo/issues/18#8 #

kronz commented 3 years ago

@ZiyunShang not sure how complicated it is, is this a matter of changing the Surface input in FaceAnalysisDisplay.ByViewFacePointsAndValues to accept a list instead of a single item? Having a conversation right now with a customer that is using this functionality

cesarecaoduro commented 3 years ago

@ZiyunShang following @kronz message above, we are trying to generate a set of heatmaps between different surfaces. Both the reference and the report should be a list of surfaces (if possible). The result should be similar to what a civil package would provide as a result 2020-11-25 12_31_13-Autodesk Civil 3D 2021 -  DeckAnalisys dwg

It would be also very nice to be able to setup:

ZiyunShang commented 3 years ago

Hi @kronz @cesarecaoduro , I just investigated this issue. As @dimven pointed out, that node will clear SpatialFieldManager every time, so only one surface has analysis display result. Do you want to generate Analysis Display for multiple faces at once, like this: 3FacesResults I think we can try to use ElementBinder to get the existing elements(such as point, surface and vector) avoid create analysis for all the selected elements everytime. I have logged a task for this - REVIT-171087

cesarecaoduro commented 3 years ago

Basically the idea is to have a base surface (or surfaces) and another set of surfaces and calculate di distance in between. Then use a surface display to report this distances in a view. One of the limitations can be also that we need to join surfaces before doing the real evaluation and because the joined surface is not available in the model, the display will not work. Maybe this can be solved using directshape to generate the surface right before displaying the results, but this is maybe a separate problem.

The images below are a very simple example of two surface to be reported against a single surface.

aaa 2020-11-25 14_59_35-Autodesk Revit 2020 2 -  Heatmap rvt - Section_ Section 1 Heatmap.zip

AmandaHuang66 commented 3 years ago

Hi, I'm wondering if anyone could help with the missing "Analysis Display Settings" under Graphics in the Revit UI after the "FaceAnalysisDisplay.ByFaceViewPointsAndValues" being successfully run in Dynamo? The "PointAnalysisDisplay.ByViewPointsAndValues" works fine. FaceAnalysisDisplay_dynamoTest FaceAnalysisDisplay_RevitUI PointAnalysisDisplay_dynamoTest PointAnalysisDisplay_RevitUI

Cheers, Amanda

andydandy74 commented 1 year ago

This looks fixed in Revit 2023.1, perhaps even 2023.0