{"id":743,"date":"2017-02-09T10:00:00","date_gmt":"2017-02-09T08:00:00","guid":{"rendered":"https:\/\/blogs.autodesk.com\/villagebim\/2017\/02\/exemple-dynamo-chemin-d-evacuation-incendie.html"},"modified":"2017-02-09T10:00:00","modified_gmt":"2017-02-09T08:00:00","slug":"exemple-dynamo-chemin-d-evacuation-incendie","status":"publish","type":"post","link":"https:\/\/blogs.autodesk.com\/villagebim\/2017\/02\/exemple-dynamo-chemin-d-evacuation-incendie.html","title":{"rendered":"Exemple Dynamo : Chemin d\u2019\u00e9vacuation incendie"},"content":{"rendered":"<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a290970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"240\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a294970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Encore un tr\u00e8s bon exemple Dynamo for Revit du blog <a href=\"https:\/\/revitbeyondbim.wordpress.com\/\">Revit beyond BIM<\/a>, \u201c<a href=\"https:\/\/revitbeyondbim.wordpress.com\/2017\/01\/03\/fire-exit-risk-assessment-with-revit-and-dynamo\/\">Fire Exit Risk Assessment with Revit and Dynamo<\/a>\u201d.<\/p>\n<p style=\"text-align: justify\">L\u2019auteur,&#160;<a href=\"https:\/\/revitbeyondbim.wordpress.com\/author\/dietervermeulen\/\">Dieter Vermeulen<\/a>, nous propose d\u2019afficher les chemins les plus courts reliant les portes int\u00e9rieures de l\u2019 (ou des) issue de secours et cela dans une vue en plan dans Revit.<\/p>\n<p style=\"text-align: justify\">Vous trouvez dans <a href=\"https:\/\/revitbeyondbim.wordpress.com\/2017\/01\/03\/fire-exit-risk-assessment-with-revit-and-dynamo\/\">son article<\/a> toutes les explications n\u00e9cessaires \u00e0 la compr\u00e9hension du code.<\/p>\n<p style=\"text-align: justify\">J\u2019ai repris donc cet exemple pour afficher en rouge les pi\u00e8ces qui jouxtent &#160;la porte la plus \u00e9loign\u00e9e de l\u2019issue de secours.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b365970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"79\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b36f970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">Voici donc l\u2019explication de mes ajouts :<\/p>\n<p style=\"text-align: justify\"><strong><u>1- Analyse des longueurs des chemins:<\/u><\/strong><\/p>\n<p style=\"text-align: justify\">&#160;&#160;&#160;&#160;Il faut d\u2019abord trouver dans le script de Dieter, l\u2019endroit o\u00f9 se cachent les chemins calcul\u00e9s.<\/p>\n<p style=\"text-align: justify\">En fait, ils se trouvent dans&#160; le groupe appel\u00e9 \u201c<em>Resolve jaggy path to smooth<\/em>\u201d et plus sp\u00e9cialement le n\u0153ud \u201c<em>NurbsCurve.ByControlPoints<\/em>\u201d.<\/p>\n<p style=\"text-align: left\"><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce67ed970b-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"323\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a29f970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"304\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Pour connaitre la longueur de chaque trajet, je vais relier le n\u0153ud pr\u00e9c\u00e9dent \u00e0 un n\u0153ud appel\u00e9 \u201c<em>Curve.Length<\/em>\u201d<\/p>\n<p style=\"text-align: left\"><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b38d970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"493\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a2a4970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Pour d\u00e9terminer le chemin qui correspond \u00e0 la longueur maximale, j\u2019utilise le n\u0153ud \u201c<em>List.MaximumItem<\/em>\u201d.<\/p>\n<p style=\"text-align: justify\">Le n\u0153ud \u201c<em>List.FirstIndexOf<\/em>\u201d me retournera le rang du chemin le plus long.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b39a970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"212\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce67f8970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Enfin, pour connaitre le nom de la porte qui correspond au chemin le plus \u00e9loign\u00e9, je vais utiliser le n\u0153ud \u201c<em>List.FirstIndexOf<\/em>\u201d.<\/p>\n<ul>\n<li>Entr\u00e9e \u201c<em>List<\/em>\u201d : connect\u00e9e \u00e0 la liste des portes situ\u00e9es dans le groupe \u201c<em>Escape Route Initialization<\/em>\u201d,<\/li>\n<li>Entr\u00e9e \u201c <em>Index<\/em>\u201d : li\u00e9e \u00e0 l\u2019index trouv\u00e9 \u00e0 l\u2019\u00e9tape pr\u00e9c\u00e9dente,<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3a9970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"88\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a2ac970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\"><strong><u>2- D\u00e9tection des pi\u00e8ces communes \u00e0 la porte la plus \u00e9loign\u00e9e:<\/u><\/strong><\/p>\n<p style=\"text-align: justify\">Nous allons s\u00e9lectionner toutes les pi\u00e8ces puis nous allons les transformer en volume solide Dynamo (m\u00eame op\u00e9ration pour la porte la plus \u00e9loign\u00e9e).<\/p>\n<p style=\"text-align: justify\">Pour les pi\u00e8ces, j\u2019utilise les n\u0153uds suivants:<\/p>\n<ul>\n<li>\u201c<em>Categories<\/em>\u201d : s\u00e9lectionne les \u00e9l\u00e9ments de la cat\u00e9gorie mentionn\u00e9e (ici \u201c<em>Rooms<\/em>\u201d),<\/li>\n<li>\u201c<em>All Elements of Category<\/em>\u201d : s\u00e9lectionne tous les \u00e9l\u00e9ments Revit de la cat\u00e9gorie indiqu\u00e9e,<\/li>\n<li>\u201c<em>Element.Solids<\/em>\u201d : transforme les objets Revit en Solide Dynamo,<\/li>\n<\/ul>\n<p style=\"text-align: justify\">Pour la porte la plus \u00e9loign\u00e9e :<\/p>\n<ul>\n<li>\u201c<em>Element.Solids<\/em>\u201d : transforme les objets Revit en Solide Dynamo,<\/li>\n<li>\u201c<em>Solid.ByUnion<\/em>\u201d : fusionne tous les solides composant la porte en un seul solide,<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3b3970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"212\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a2b0970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Pour savoir si le solide \u201cPorte\u201d appartient \u00e0 l&#039;un des solides (pi\u00e8ces), je vais utiliser le n\u0153ud \u201c<em>Geometry.DoesIntersect<\/em>\u201d. Ce n\u0153ud retourne un bool\u00e9en (Vrai ou Faux) indiquant la pr\u00e9sence ou non de la porte pour chacune&#160;des pi\u00e8ces inspect\u00e9es.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3c3970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"167\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0971a2b5970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\"><strong><u>3- Affichage dans Revit des pi\u00e8ces concern\u00e9es par la porte la plus \u00e9loign\u00e9e :<\/u><\/strong><\/p>\n<p style=\"text-align: justify\">Afin d\u2019afficher les pi\u00e8ces concern\u00e9es par la porte la plus \u00e9loign\u00e9e, j\u2019ai cr\u00e9\u00e9 :<\/p>\n<p style=\"text-align: justify\">&#8211; une vue \u201c<em>Analysis<\/em>\u201d ,<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3ce970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"244\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce6804970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"219\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p style=\"text-align: justify\">&#8211; un param\u00e8tre projet \u201c<em>Occupant<\/em>\u201d pour les pi\u00e8ces,<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3d8970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"533\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce680b970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"254\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p style=\"text-align: justify\">-&#160; une l\u00e9gende de couleur sur le param\u00e8tre \u201c<em>Occupant<\/em>\u201d constitu\u00e9e de deux variables :<\/p>\n<ul>\n<li>\u201c<em>Yes<\/em>\u201d : couleur rouge,<\/li>\n<li>\u201c<em>Non<\/em>\u201d couleur \u201cvert\u201d.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3f0970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"113\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce680f970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;margin: 0px auto;padding-right: 0px;border: 0px\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p style=\"text-align: justify\">Ensuite dans le script Dynamo, je vais utiliser un n\u0153ud :<\/p>\n<p style=\"text-align: justify\">&#8211; \u201cIf\u201d li\u00e9 \u00e0 deux string \u201c<em>Yes<\/em>\u201d et \u201c<em>No<\/em>\u201d (si la porte est d\u00e9tect\u00e9e dans pi\u00e8ce, le \u201c<em>if<\/em>\u201d retourne \u201c<em>Yes<\/em>\u201d sinon \u201c<em>No<\/em>\u201d.<\/p>\n<p style=\"text-align: justify\">&#8211; \u201c<em>Element.SetParameterByName<\/em>\u201d pour affecter les valeurs \u201c<em>Yes<\/em>\u201d ou \u201c<em>No<\/em>\u201d dans le param\u00e8tre projet \u201c<em>Occupant<\/em>\u201d.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b3fe970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"193\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b407970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\"><strong><u>4- R\u00e9sultats:<\/u><\/strong><\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce6819970b-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"242\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b429970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">En changeant de place l\u2019issue de secours \u201c<em>Exit<\/em>\u201d:<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8ce6824970b-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"233\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d258b446970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p><strong>Nota important : Utiliser un Revit en langue Anglaise car des packages sont utilis\u00e9s (voir notre billet <a href=\"http:\/\/villagebim.typepad.com\/villagebim\/2015\/07\/revit-2016-changer-de-langue.html\">ici<\/a>).<\/strong><\/p>\n<p>Voici la vid\u00e9o d&#039;explication :<\/p>\n<p>&#160;<\/p>\n<p class=\"asset-video\" style=\"text-align: center\">\n<p>Voici les fichiers :&#160; <span class=\"asset  asset-generic at-xid-6a015391e15a28970b01b7c8ce71b7970b img-responsive\"><a href=\"http:\/\/villagebim.typepad.com\/files\/dynamo-fire.rar\">T\u00e9l\u00e9chargement Dynamo Fire<\/a><\/span><\/p>\n<p><span class=\"asset  asset-generic at-xid-6a015391e15a28970b01b7c8ce71b7970b img-responsive\">Et encore merci Dieter pour cet exemple DYnamo For Revit !<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#160; Encore un tr\u00e8s bon exemple Dynamo for Revit du blog Revit beyond BIM, \u201cFire Exit Risk Assessment with Revit and Dynamo\u201d. L\u2019auteur,&#160;Dieter Vermeulen, nous propose d\u2019afficher les chemins les plus courts reliant les portes int\u00e9rieures de l\u2019 (ou des) issue de secours et cela dans une vue en plan dans Revit. Vous trouvez dans [&hellip;]<\/p>\n","protected":false},"author":13092,"featured_media":2472,"menu_order":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[15,26,17,6],"tags":[],"class_list":["post-743","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-autodesk-revit","category-conception","category-nouveautes","category-trucs-et-astuces","dhig-theme--light"],"acf":[],"_links":{"self":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/posts\/743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/users\/13092"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/comments?post=743"}],"version-history":[{"count":0,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/posts\/743\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/media\/2472"}],"wp:attachment":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/media?parent=743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/categories?post=743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/tags?post=743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}