Xyz points from lines or vectors hitting geometry

I’m sure that this has been delt with, but can’t find the posts regarding this. I got as far as the screenshots show, spraying lines from point in spherical directions from top hemisphere. but cannot find the intersection points.

I need to:

From several points; shoot Dynamo Lines, determine where they hit Revit geometry of all Categories, get their xyz coordinates-at-point, export it as a csv file. (this is part of me trying to dissolve all Revit geometry into Points.ByCoordinates with a mean spherical angle, for creating a point cloud of same geometry, to compare it to a recorded point cloud; in another software, “CloudCompare”)

The part of spraying out lines or vectors, what node is appropriate, and what node to determine collision/clash and convert it to a point?

Appreciate your answers, as always.

T

Does you Mobile phone have LIDAR?

Don’t know if there are Nodes to process LIDAR data or the building exist

Hi,

Is this the sort of thing you want to do?

shapely

Hi Marcel
Let’s stick to the topic, no phones are involved.

Hi Durmus

i am trying to avoid Packages and Python Scripts. Can this be solved without?

I don’t know exactly what’s on your screen. That’s why it’s very difficult for me to give you a definite answer to your question.

However, if you want to continue with native nodes, “RayBounce” would be a good starting point.

That said, I would like to explain the above example to you.It sends thousands of rays from the target point and takes the shortest ray that touches the surrounding geometries.

I’m not sure I would trust data generated here as you’re going to have a LOT of items to compare to. Multiple scans of the same location would likely be better if you can swing it. However if you are going to try it then you should just parse the points from one of the raybounce nodes.

i have the same thought. i’m guessing there are smarter ways to extract points from geometry, but Surface.PointAtParameter only worksright if NURBS-like surface, and i would like to replicate the way a point cloud scanner works. since that’s what i want to compare my model up against. (Therefore i’m thinking “spray lines from points, look at where they hit.”)

I will look up RayBounce, will let you know.

You probably don’t need to do this from first principles- there are packages/nodes that may do all or part of it. Suggestions:

> search for ‘isovist’- I think package such as Lunchbox have isovist nodes

> look at the VASA package- I believe it has isovist & point sampling nodes e.g https://www.youtube.com/watch?v=cmlV-tdEkGA

A point sampling method (VASA or otherwise) is probably what you want, since spraying out rays from central points will produce results that are inherently uneven i.e more denser near the centre

The problem even with this method has a few issues. Construction tolerances, structural movement due to forces on the building and thermal expansion, scanner accuracy over time at variable atmospheric conditions, and more. The number of things which can cause deviation in a scan is similar to the number of grains of sand on the beach.

As a result it is important to remember that all scans are ‘reality approximated’ while your BIM data is an abstraction for design intent. One is accurate to ‘the conditions in the moment’ while the other is accurate to ‘what the design team intended’.

That doesn’t mean the method of populating points on the surfaces of the design intent doesn’t have value for you - just that the outcomes between this data and a real scan won’t necessarily align. As such if you can get a real scan it’s best to start there.

As far as generating points on the design, I would go about things a bit differently. My concern isn’t so much the speed of projecting one point, or even 1000 points. But you’re working with something more like 51,000,000 points to replicate a point cloud and those are scary big numbers for anything optimized to deal with that type of data. Instead I’d consider something like this:

  1. Extract all surfaces from the model
  2. Use a visibility study in VASA (not quite an isovist as @Andrew_Hannell noted, but conceptually it’s close enough) to reduce to just the number of surfaces you can see.
  3. For each surface, get the area and divide the area by a given point density - this is the number of points you’ll want.
  4. Use a randomized UV value and intersection testing in an imperative coding method (design script, Python, or C#) to get points on the surface until you have as many as you need.
  5. Write the points into your PTS file directly; don’t even expose them into the Dynamo environment.

A C# environment will help immensely here as you could readily manage partial file info.

I’m currently teaching surveyors Revit modeling. One of their tasks is to link a point cloud into Revit, and model over it. And i would like to compare their models to the point cloud, because it is obvious that a pristine Revit wall is differing from the woolly point cloud of reality . Comparison can be done not necessarily in Revit, but in the software they usually use for comparing point clouds. This software already have a MeshIO plugin on GitHub that will convert an IFC to points, but i’d rather just be able to export values to an *.xyz file directly from Dynamo. Because i like Dynamo and the versatility.

i will look into VASA.

-for UV values, it seems that a non orthogonal wall top face has UV grid starting outside of the face. will upload image to show you.

Oh this makes a LOT more sense.

Take the extracted geometry (all of it not juat what is seen) from the elements which can be scanned. Then break that geometry into surfaces, tessellate the geometry (the Dynamo unfold repository has a good example of how to do that and it can be ported to Python) and then you can sprinkle additional points onto the triangles in a meaningful grid density, and finally write those out to a .XYZ or .PTS or whatever. The benefit to this method is you can do the extraction for a selected element, not forcing Dynamo to move all elements at once, and the resulting extraction can also inform the object type in the point cloud viewer by way of naming the file.

thank you so much, there’s a way in :wink:
to eliminate surfaces hidden from outside view (think the outside of a window frame, pressed against the inside of a wall opening ), would it make sense to do a boolean union of all solid geometry before converting to surfaces? or else just eliminate surfaces under certain dimensions.

That might make sense, yes. You could also intersect the poi by against the the room geometry to clean out back sides of walls, window frames, etc..

It might be easier to keep the model as a model (albeit in a different format) by using something like the cloud-mesh distance tool in Cloudcompare. To do this, you’d need to export relevant elements from Revit to a suitable format like OBJ or FBX

It’s probably doable in Dynamo- but the sampled or ray-cast points representing your model surfaces might lie in the same plane as the pointcloud points, but be a distance away depending on the model point spacing or sampling method.

i.e you really need to calculate minimum distance from pointcloud points to the normal of the surfaces- this is what CC does

Thanks for your insight into CC. I’m not a surveyor, just a stupid architect, this is why i would like to keep my hands off CC and let the surveyor students deal with that.
Also i would like to stress the importance of delivering IFC’s; for cooperation in the construction industry.
So, if everything else fails, i will force them to use MeshIO on IFC geometry. This Dynamo thing is just me being a nerd, i guess you know the type :rofl:.

2 Likes

Hi,

The Revit API provides methods for working with cloud point instances.

Here is a simple example that analyzes the distances between a point cloud and the faces of walls.

1 Like

Thanks, I’m always interested in ways to do stuff in dynamo.

But for this particular problem, I’m more interested in “delivering" a point cloud as a data extraction of Revit geometry. Not so much the comparing part.

Since I’m teaching surveyors, they have much stronger tools for comparing two point clouds. Great statistics and visualization too!

2 Likes

The big advantage to what @c.poupin posted is that the people who you are training in ‘generating BIM content from point clouds’ can use it as they work to review how much their work differs from the points which they are using to define it.

Certainly doesn’t solve the problem and it’s a bit off the topic but I can see them making significant use after modeling a wall based on a partial view of the points and then wanting to see if the cut plane was way outside the average.

1 Like