Geometry.DistanceTo_AS

Hi there,

I want to make a script to sort AS copy first, and then assign Serial Numbers based on Distance, to feed a 4Dphasing.

I have this up & Running in Revit, but “Geometry.DistanceTo” does not recognize the AS copy as geometry.

As the software is capable of calculating the center of gravity of assemblies, i guess there is something available to measure to, no?

What could a AS-Geometry.DistanceTo-Script adress, in order to get this running?

selecteren meten tellen.dyn (118.9 KB)

Kind regards,

Willem

The input data isn’t a Dynamo geometry yet, but an AS object. You need to pull the geometry from the AS object as a start.

Post the entire graph image with the output of the proceeding nodes expanded. Do so by following the instructions here: How to export a graph image [Correctly]

Please find the graph attached.

the complete structure is not there yet, I emphasized on getting the nodes handle AS copy first.

Eventually the groupings in green make up a cascade that builds the Hierarchy on which the serial numbers will be assigned.

Purple is troublesome, the AS copy not being recognized.

Red gives some nodes I tried.

The Centre of Gravity should be out there for each element…

Enjoy the weekend!
selecteren meten tellen.dyn (110.2 KB)

From the beams we need to pull the Dynamo geometry. Look for Object.Geometry and similar in the library, as well as Beam.Geometey and the like. When done you’ll need to do similar with the other objects.

Sadly I removed advance steel from my system to make room for other tools, and I won’t have time to reinstall it for awhile; you might want to pull a few screenshots of the AS relevant sections of the Dynamo library as the answer is in there somewhere.

Hi @jacob.small

I worked a bit on the script, and it works, I can attribute serial numbers to AS assemblies based on multiple criteria.

The crux was to address “Preliminary parts”, and have them assigned in a way that each Assembly has a unique preliminary part number.

Somebody made the suggestion to catch the geometry by reference plane (plate) or drawing a line between start & end (Beam) ,

The fact that you have to predict whether a Plate or Beam will come out as reference for measurement makes the script challenging.

I made a small model with different type of objects lined up.

With this standard AS model and graph, could you have a look using Dynamo / C#/ Python / Whatever on how to get geometry to measure from in a direct way?

In Lime green we measure from Plate for the reference and beams for the copy, ideally this can be used without consideration of the object type.

Schermafbeelding 2024-05-02 130523.png

Kind regards,

Willem

test different objects.dwg (636.1 KB)
selecteren meten tellen 06 preliminary test.dyn (394.4 KB)

1 Like