Reservations on a wall (with angle) at the passage of networks

Reservations on a wall (with angle) at the passage of networks

Hello,
I am trying to create reservations (family) on a wall when passing networks.
I use the demonstration is the Cesare Caoduro code and the Dynamo4MEP node (translated into French).
I use a report file on REVIT interference for clash.
The main problem is the calculation of the length of the reservation with the walls having an angle other than 90 ° or 180 °.
I made a correction for the walls at 45 ° on the calculation of the length of the reservation.
But the problem persists with the other angles (example 30 °)
I would like to calculate the parallel length (see sketch) to the wall corresponding to the width of the network. I would avoid going through a family setting.

See the red frame for my method (code)
********* French
Réservations sur un mur (avec angle) au passage des réseaux

Bonjour,
Je cherche à créer des réservations (famille) sur un mur au passage des réseaux.
J’utilise la démonstration est le code de Cesare Caoduro et le nœud Dynamo4MEP (traduit en français).
J’utilise un fichier rapport sur les interférences de REVIT pour les clash.
Le principal problème est sur le calcul de la longueur de la réservation avec les murs ayant un angle autre que 90° ou 180°.
J’ai apporté une correction pour les murs à 45° sur le calcul de la longueur de la réservation.
Mais le problème persiste avec les autres angles (exemple 30°)
Je voudrais calculer la longueur parallèle (voir croquis) au mur correspondante à la largeur du réseau. Je voudrais éviter passer par un paramètre de la famille. Voir le cadre rouge pour ma méthode

I may be misunderstanding some of this, but to get the length of the family you are after you might consider something like this:

  1. Select the wall and associated duct by element ID.
  2. Get the geometry of the duct.
  3. Get the location of the wall (result is a line or endpoints - we will want to use the endpoints)
  4. Translate one endpoint on the z axis by one unit.
  5. Create a plane with the endpoints and the translated point.
  6. Get the faces of the duct geometry.
  7. Sort the faces by the lowest y value.
  8. Intersect the first item in the list with the plane created in step 5.
  9. The length of the resulting line is the length of your family.
1 Like

Hello,
I found a solution by modifying the formulas in Block code