Points on surface

Hi,
I`m trying to get a group of points on a trimmed surface.
I used the attached script. It works but on my dynamo screen I still see the points outside of the surface.
It must be very simple to solve. Can anyone help?
Wouter

Dynamo doesn’t discard construction geometry as you go. Points created by node 1 which are filtered out by node two still show in the geometry preview as a result unless you disable the preview of node 1. As such it is usually a best practice to disable previews as you go.

Right click on the nodes which produce points and hide the geometry preview, or select all nodes and right click on the background and select disable all preview. Then add an object.identity node to the end of the graph an’d wire the in output from the List.FilterByBoolMask node into the input. The resulting preview will be just the ‘included’ points.

Thanks for your quick reply!

Hi,
Ive made a small script to put points on a surface. When selecting Surfaces from Revit, Dynamo seems to put the part of a surface which is being cut by a void in a separate list (see highlighted surface in the attached file). Im using this separate list to exclude points so that Im left with only the points on the actual surface. This is working but for some reason a couple of rows of points remain inside the void cutting surface`.
Has anyone an idea of how to solve this?

My guess is that this is a function of the list levels - try flattening the point list before you intersect anything.

If that doesn’t work, reduce the number of points (say step by 0.1 instead of 0.05), hide all geometry except for the non-intersected points at the end and the interior surface, and expand the previews along the way. Then re-arrange your nodes so all previews, nodes and wires are legible and use an image export after zooming in so the nodes and the data preview are legible. Post that image and a screenshot (as you have been posting) so we can see the geometry preview as well.

Your selected face has 2 surfaces, which as you say one must be the void.
Since you are only selecting the first surface (index zero), I’d expect your graph to get points which intersect with this surface, which it is doing.
I think the preview is not accurate and that the surface is obscuring some points.

To help others to help you, it is best to post a sample model and also the Dynamo graph itself, to save reworking what you’ve done and to reproduce the same results.

My simple test is an solid extrusion and a void extrusion, which appears as one surface. I’d start with whatever object you are selecting to work out why it is coming up as 2 surfaces, not one

My simplified version of your graph does work- although I did find the node Geometry.DoesIntersect produced unexpected results. Geometry.Intersect seems to work ok

Andrew

20200102 points on surface.dyn (12 KB)

20200102 points on surface.rfa (356 KB)

3 Likes

Thanks for your reply, the script works now. The problem was that I mixed two diferent lists for filtering.

1 Like

Hi.

Thanks for your help.

The problem is solved now.

When I use select face I automatically get two Surfaces. Maybe because in Revit I`m using a void in a family to cut the surface.

The problem was that I mixed up different lists to exclude the points on the void surface.

Wouter

Hi @Andrew_Hannell , for the same question. i was thinking if you can help with some other idea.
basically i have areas plans with rooms/ so suite (with area plan), and the washrooms and bedrooms in (rooms or spaces). i want to make a script to judge on current view if all the room lines are in the areas, if so, they change their room number to the area plan name. do you think its possible?
i am thinking of using the following:

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

dataEnteringNode = IN

list1=IN[0] #surfaces list (get all rooms on current view and converted to surfaces in dynamo)
list2=IN[1] #surfaces list (get all areas on current view, and converted to surfaces)
roomResult=[]

for sfRooms in list1:
   result=[]
   for sfAreas in list2: #i dont know what API i should use for intersecting
      if FaceIntersectionFaceResult Intersect (sfAreas, sfRooms) = True:
         result=list2.index(sfAreas)
   roomResult.append(result)
OUT=roomResult

this should return a list of all area index of the intersected area for each room.
then get the list with all index number to get the number of area on area list which matches the structure of rooms. write into their room number parameter.
done.

However, i stuck at the middle part for the intersecting API logic :frowning:

Hi @j8tian23

Sorry, I haven’t done any Revit/Dynamo work for ages (and no longer have a Revit licence- too expensive) I think what you are attempting should be possible.
It’s probably best to post this as a new question- this is a great forum & you’ll probably get an answer.

Andrew

1 Like

thanks a lot @Andrew_Hannell will post it