{"id":596,"date":"2020-03-03T19:07:27","date_gmt":"2020-03-03T19:07:27","guid":{"rendered":"https:\/\/www.parametriczoo.com\/?p=596"},"modified":"2020-03-03T19:07:44","modified_gmt":"2020-03-03T19:07:44","slug":"coincident-planes","status":"publish","type":"post","link":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/","title":{"rendered":"Coincident planes"},"content":{"rendered":"\n[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;3.22.7&#8243; custom_padding=&#8221;25px|||||&#8221;][et_pb_row _builder_version=&#8221;3.22.7&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.22.7&#8243;][et_pb_text _builder_version=&#8221;3.22.7&#8243;]<p>Further to my previous post about <a href=\"https:\/\/www.parametriczoo.com\/index.php\/2020\/02\/29\/signed-distance-of-a-point-from-a-plane\/\">signed distance to plane<\/a> , Here I would like to share another insight to plane geometry in Revit API. Two planes are geometrically the same (they are coincident) if all points are one plane lies on other plane too. At first you may think you can simply test if they are equal by calling the <a href=\"https:\/\/www.revitapidocs.com\/2015\/4cf2ea2c-2907-adb4-9481-b716a4291df1.htm\">Equal()<\/a> method. Although the equal planes are certainly coincident , but there are coincident planes that are not equal by formulation. Let&#8217;s look at the mathematical definition of the plane:<span style=\"font-size: 14px;\">\u00a0<\/span><\/p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/image001.png&#8221; align=&#8221;center&#8221; _builder_version=&#8221;3.22.7&#8243; width=&#8221;18%&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;3.22.7&#8243;]<p>Where <strong><em>n<\/em> <\/strong>is a unit normal vector to the plane, <em><strong>p<\/strong> <\/em>is a position vector of a point of the plane and <em><strong>D<\/strong> <\/em>the signed distance of the plane from the origin. This definition is\u00a0<span>known as the\u00a0<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Hesse_normal_form\" title=\"Hesse normal form\">Hesse normal form<\/a><span>\u00a0relies on the parameter\u00a0<\/span><strong><i>D<\/i><\/strong><span>. Now let us say two planes <strong><em>P\u2081<\/em><\/strong> and <em><strong>P\u2082<\/strong><\/em> are coincide, this means equations\u00a0for both planes must be satisfied regardless of the position vector <em><strong>p<\/strong><\/em> . In the other words if point <em><strong>p<\/strong><\/em> satisfies\u00a0the first equation then it should also satisfies\u00a0the second one :<\/span><\/p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/image003.png&#8221; align=&#8221;center&#8221; _builder_version=&#8221;3.22.7&#8243; width=&#8221;67%&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;3.22.7&#8243; custom_margin=&#8221;-7px|||||&#8221;]<p>There are two sets of trivial solutions in which both equatios are statisfied:\u00a0\u00a0<\/p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/image006.png&#8221; align=&#8221;center&#8221; _builder_version=&#8221;3.22.7&#8243; width=&#8221;81%&#8221; custom_margin=&#8221;||12px|||&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;3.22.7&#8243; custom_padding=&#8221;0px|||||&#8221;]<p>In case <em><strong>(1)<\/strong><\/em>\u00a0 the normal vectors of two planes are identical and the planes are having the same distance from the origin. In case <strong><em>(2)<\/em><\/strong> the normal of <span><em><strong>P\u2082<\/strong><\/em><\/span> is the reverse of the normal of <span><strong><em>P\u2081<\/em><\/strong><\/span> and the signed distance of <span><strong><em>P\u2081<\/em><\/strong><\/span> is the negative of the signed distance of the <span><em><strong>P\u2082<\/strong><\/em><\/span>. Now let us implement above conditions in Revit API by looking at <a href=\"https:\/\/www.revitapidocs.com\/2020\/6a6ee978-f114-558d-3c69-00d289aa855f.htm\">Plane class<\/a>. There are two essential properties of the plane that we need to compare. First, the <a href=\"https:\/\/www.revitapidocs.com\/2020\/480fe97b-26fd-6376-ab66-bb204862572b.htm\">normal<\/a> vector which must be in unique length. Considering both cases <em><strong>(1)<\/strong><\/em> and <strong><em>(2)<\/em><\/strong> we compare the normal vectors in both direct and reverse direction:\u00a0<\/p>[\/et_pb_text][et_pb_text _builder_version=&#8221;3.22.7&#8243; background_color=&#8221;#f2f2f2&#8243; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d3d3d3&#8243; custom_margin=&#8221;-2px|||||&#8221; custom_padding=&#8221;11px|15px|0px|15px|false|true&#8221; saved_tabs=&#8221;all&#8221;]<pre style=\"font-family: Consolas; font-size: 13px; color: black;\"><span class=\"keyword - control\" style=\"color: #8f08c4;\">if<\/span> <span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">IsAlmostEqualTo<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">)<\/span> <span class=\"operator\">||<\/span> <span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">IsAlmostEqualTo<\/span><span class=\"punctuation\">(<\/span><span class=\"operator - operator - overloaded - (TRANSIENT)\" style=\"color: #74531f;\">-<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">))<\/span><br \/><span class=\"punctuation\">{<\/span><br \/>       <span class=\"comment\" style=\"color: green;\">\/\/if above condition is satisfied then planes are parallel   <\/span><br \/><span class=\"punctuation\">}<\/span><\/pre>[\/et_pb_text][et_pb_text _builder_version=&#8221;3.22.7&#8243;]<p>Note that vectors are compared using <a href=\"https:\/\/www.revitapidocs.com\/2015\/72feac6d-3f77-10ea-8ba8-087ab43e76b2.htm\">IsAlmostEqualtTo<\/a> not the Equality method. If above conditions are statisfied then it means the planes are parallel, The next step is to compare the parameter <strong><em>D<\/em><\/strong> or the signed distance from the origin. This is not implemented in Revit API but it can be easily retrieved from the dot product of the normal plane and the a point on the plane. looking at the plane equation again we can write :<\/p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/image008.png&#8221; align=&#8221;center&#8221; _builder_version=&#8221;3.22.7&#8243; width=&#8221;53%&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;3.22.7&#8243;]<p>For the point <strong><em>p<\/em><\/strong> on the plane we can choose the <a href=\"https:\/\/www.revitapidocs.com\/2020\/65f19b4f-d73c-25ef-0c88-ce2ebade5bcf.htm\">Origin<\/a>\u00a0and to cover the both cases <em><strong>(1)<\/strong><\/em> and <em><strong>(2)<\/strong><\/em>\u00a0we only compare the absolute value of parameter<em><strong> D<\/strong><\/em>. Similar to vector comparison, we need to take into account that numbers could be very close but still not equal, therefore it is wised to consider a tolerance value. Here we use an arbitrary tolerance which must be sufficiently small :\u00a0<\/p>[\/et_pb_text][et_pb_text _builder_version=&#8221;3.22.7&#8243; background_color=&#8221;#f2f2f2&#8243; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d3d3d3&#8243; custom_margin=&#8221;-2px|||||&#8221; custom_padding=&#8221;11px|15px|0px|15px|false|true&#8221; saved_tabs=&#8221;all&#8221;]<pre style=\"font-family: Consolas; font-size: 13px; color: black;\"><span class=\"comment\" style=\"color: green;\">\/\/ if both planes are parallel then check if they have the same distance to the origin.<\/span><br \/><span class=\"keyword\" style=\"color: blue;\">double<\/span> <span class=\"local name\" style=\"color: #1f377f;\">d1<\/span> <span class=\"operator\">=<\/span> <span class=\"class name - identifier - static symbol - (TRANSIENT)\" style=\"color: #2b91af;\">Math<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">Abs<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Origin<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">DotProduct<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">));<\/span><br \/><span class=\"keyword\" style=\"color: blue;\">double<\/span> <span class=\"local name\" style=\"color: #1f377f;\">d2<\/span> <span class=\"operator\">=<\/span> <span class=\"class name - identifier - static symbol - (TRANSIENT)\" style=\"color: #2b91af;\">Math<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">Abs<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Origin<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">DotProduct<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">));<\/span><br \/><span class=\"keyword - control\" style=\"color: #8f08c4;\">return<\/span> <span class=\"punctuation - unnecessary code - (TRANSIENT)\">(<\/span><span class=\"class name - identifier - static symbol - (TRANSIENT)\" style=\"color: #2b91af;\">Math<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">Abs<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - local name - (TRANSIENT)\" style=\"color: #1f377f;\">d1<\/span> <span class=\"operator\">-<\/span> <span class=\"identifier - local name - (TRANSIENT)\" style=\"color: #1f377f;\">d2<\/span><span class=\"punctuation\">)<\/span> <span class=\"operator\">&lt;<\/span> <span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">tolerance<\/span><span class=\"punctuation - unnecessary code - (TRANSIENT)\">)<\/span><span class=\"punctuation\">;<\/span><\/pre>[\/et_pb_text][et_pb_text _builder_version=&#8221;3.22.7&#8243;]<p>Choosing the tolerance value is quite relative. In our implementation the tolerance is actually the maximum distance between two parallel planes which must be considered coincident. To be consistent with the method IsAlmostEqualTo() , a good choice could be (10e-9) . Here is the full implemenation :\u00a0 \u00a0<\/p>[\/et_pb_text][et_pb_text _builder_version=&#8221;3.22.7&#8243; background_color=&#8221;#f2f2f2&#8243; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d3d3d3&#8243; custom_margin=&#8221;-2px|||||&#8221; custom_padding=&#8221;11px|15px|0px|15px|false|true&#8221; saved_tabs=&#8221;all&#8221;]<pre style=\"font-family: Consolas; font-size: 13px; color: black;\"><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> <\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">summary<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> Returns true if the plane p2 lies on this plane (p1). <\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> <\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;\/<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">summary<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> <\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">param<\/span><span class=\"xml doc comment - attribute name\" style=\"color: gray;\"> name<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">=<\/span><span class=\"xml doc comment - attribute quotes\" style=\"color: gray;\">\"<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"xml doc comment - attribute quotes\" style=\"color: gray;\">\"<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;&lt;\/<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">param<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> <\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">param<\/span><span class=\"xml doc comment - attribute name\" style=\"color: gray;\"> name<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">=<\/span><span class=\"xml doc comment - attribute quotes\" style=\"color: gray;\">\"<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"xml doc comment - attribute quotes\" style=\"color: gray;\">\"<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;&lt;\/<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">param<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> <\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">param<\/span><span class=\"xml doc comment - attribute name\" style=\"color: gray;\"> name<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">=<\/span><span class=\"xml doc comment - attribute quotes\" style=\"color: gray;\">\"<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">tolerance<\/span><span class=\"xml doc comment - attribute quotes\" style=\"color: gray;\">\"<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><span class=\"xml doc comment - text\" style=\"color: green;\">if distance between two parallel planes is less than <\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> this threshold then they are considered as Coincide planes<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;\/<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">param<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><br \/><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">\/\/\/<\/span><span class=\"xml doc comment - text\" style=\"color: green;\"> <\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&lt;<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">returns<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;&lt;\/<\/span><span class=\"xml doc comment - name\" style=\"color: gray;\">returns<\/span><span class=\"xml doc comment - delimiter\" style=\"color: gray;\">&gt;<\/span><br \/><span class=\"keyword\" style=\"color: blue;\">public<\/span> <span class=\"keyword\" style=\"color: blue;\">static<\/span> <span class=\"keyword\" style=\"color: blue;\">bool<\/span> <span class=\"extension method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">IsCoincident<\/span><span class=\"punctuation\">(<\/span><span class=\"keyword\" style=\"color: blue;\">this<\/span> <span class=\"class name - identifier - (TRANSIENT)\" style=\"color: #2b91af;\">Plane<\/span> <span class=\"parameter name\" style=\"color: #1f377f;\">p1<\/span> <span class=\"punctuation\">,<\/span> <span class=\"class name - identifier - (TRANSIENT)\" style=\"color: #2b91af;\">Plane<\/span> <span class=\"parameter name\" style=\"color: #1f377f;\">p2<\/span><span class=\"punctuation\">, <\/span><span class=\"keyword\" style=\"color: blue;\">double<\/span> <span class=\"parameter name\" style=\"color: #1f377f;\">tolerance<\/span><span class=\"punctuation\">)<\/span><br \/><span class=\"punctuation\">{<\/span>        <br \/>    <span class=\"comment\" style=\"color: green;\">\/\/ check if the normal of this plane is equal (or reverse ) to the normal of the other Plane<\/span><br \/>    <span class=\"keyword - control\" style=\"color: #8f08c4;\">if<\/span> <span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">IsAlmostEqualTo<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">)<\/span> <span class=\"operator\">||<\/span> <span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">IsAlmostEqualTo<\/span><span class=\"punctuation\">(<\/span><span class=\"operator - operator - overloaded - (TRANSIENT)\" style=\"color: #74531f;\">-<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">))<\/span><br \/>    <span class=\"punctuation\">{<\/span><br \/>        <span class=\"comment\" style=\"color: green;\">\/\/ if both planes are parallel then check if they have the same distance to the origin.<\/span><br \/>        <span class=\"keyword\" style=\"color: blue;\">double<\/span> <span class=\"local name\" style=\"color: #1f377f;\">d1<\/span> <span class=\"operator\">=<\/span> <span class=\"class name - identifier - static symbol - (TRANSIENT)\" style=\"color: #2b91af;\">Math<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">Abs<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Origin<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">DotProduct<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p1<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">));<\/span><br \/>        <span class=\"keyword\" style=\"color: blue;\">double<\/span> <span class=\"local name\" style=\"color: #1f377f;\">d2<\/span> <span class=\"operator\">=<\/span> <span class=\"class name - identifier - static symbol - (TRANSIENT)\" style=\"color: #2b91af;\">Math<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">Abs<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Origin<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - (TRANSIENT)\" style=\"color: #74531f;\">DotProduct<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">p2<\/span><span class=\"operator\">.<\/span><span class=\"identifier - property name - (TRANSIENT)\">Normal<\/span><span class=\"punctuation\">));<br \/><span class=\"comment\">        \/\/ the difference between d1 and d2 must be within given tolerance<\/span><\/span><br \/>        <span class=\"keyword - control\" style=\"color: #8f08c4;\">return<\/span> <span class=\"punctuation - unnecessary code - (TRANSIENT)\">(<\/span><span class=\"class name - identifier - static symbol - (TRANSIENT)\" style=\"color: #2b91af;\">Math<\/span><span class=\"operator\">.<\/span><span class=\"identifier - method name - static symbol - (TRANSIENT)\" style=\"color: #74531f;\">Abs<\/span><span class=\"punctuation\">(<\/span><span class=\"identifier - local name - (TRANSIENT)\" style=\"color: #1f377f;\">d1<\/span> <span class=\"operator\">-<\/span> <span class=\"identifier - local name - (TRANSIENT)\" style=\"color: #1f377f;\">d2<\/span><span class=\"punctuation\">)<\/span> <span class=\"operator\">&lt;<\/span> <span class=\"identifier - parameter name - (TRANSIENT)\" style=\"color: #1f377f;\">tolerance<\/span><span class=\"punctuation - unnecessary code - (TRANSIENT)\">)<\/span><span class=\"punctuation\">;<\/span><br \/>    <span class=\"punctuation\">}<\/span><br \/>    <span class=\"keyword - control\" style=\"color: #8f08c4;\">else<\/span><br \/>    <span class=\"punctuation\">{<\/span><br \/>        <span class=\"keyword - control\" style=\"color: #8f08c4;\">return<\/span> <span class=\"keyword\" style=\"color: blue;\">false<\/span><span class=\"punctuation\">;<\/span> <span class=\"comment\" style=\"color: green;\">\/\/ if planes are not parallel then they cannot be coincide <\/span><br \/>    <span class=\"punctuation\">}<\/span>            <br \/><span class=\"punctuation\">}<\/span><\/pre>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]\n","protected":false},"excerpt":{"rendered":"<p>Insight to Plane Geometry in Revit API : Coincident planes<\/p>\n","protected":false},"author":1,"featured_media":637,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":""},"categories":[45],"tags":[47,48],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Coincident planes - Parametric Zoo<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Coincident planes - Parametric Zoo\" \/>\n<meta property=\"og:description\" content=\"Insight to Plane Geometry in Revit API : Coincident planes\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/\" \/>\n<meta property=\"og:site_name\" content=\"Parametric Zoo\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-03T19:07:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-03T19:07:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1769\" \/>\n\t<meta property=\"og:image:height\" content=\"1170\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"PARA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"PARA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.parametriczoo.com\/#website\",\"url\":\"https:\/\/www.parametriczoo.com\/\",\"name\":\"Parametric Zoo\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.parametriczoo.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#primaryimage\",\"url\":\"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg\",\"contentUrl\":\"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg\",\"width\":1769,\"height\":1170,\"caption\":\"Coincident planes\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/\",\"url\":\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/\",\"name\":\"Coincident planes - Parametric Zoo\",\"isPartOf\":{\"@id\":\"https:\/\/www.parametriczoo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#primaryimage\"},\"datePublished\":\"2020-03-03T19:07:27+00:00\",\"dateModified\":\"2020-03-03T19:07:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.parametriczoo.com\/#\/schema\/person\/0368c6eb8bfe3a003504793be2a2e0e3\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.parametriczoo.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coincident planes\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.parametriczoo.com\/#\/schema\/person\/0368c6eb8bfe3a003504793be2a2e0e3\",\"name\":\"PARA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.parametriczoo.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2b2ff0ff40493545df12d0b31a504675?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2b2ff0ff40493545df12d0b31a504675?s=96&d=mm&r=g\",\"caption\":\"PARA\"},\"url\":\"https:\/\/www.parametriczoo.com\/index.php\/author\/para\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Coincident planes - Parametric Zoo","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/","og_locale":"en_US","og_type":"article","og_title":"Coincident planes - Parametric Zoo","og_description":"Insight to Plane Geometry in Revit API : Coincident planes","og_url":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/","og_site_name":"Parametric Zoo","article_published_time":"2020-03-03T19:07:27+00:00","article_modified_time":"2020-03-03T19:07:44+00:00","og_image":[{"width":1769,"height":1170,"url":"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg","type":"image\/jpeg"}],"author":"PARA","twitter_card":"summary_large_image","twitter_misc":{"Written by":"PARA","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.parametriczoo.com\/#website","url":"https:\/\/www.parametriczoo.com\/","name":"Parametric Zoo","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.parametriczoo.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#primaryimage","url":"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg","contentUrl":"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg","width":1769,"height":1170,"caption":"Coincident planes"},{"@type":"WebPage","@id":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/","url":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/","name":"Coincident planes - Parametric Zoo","isPartOf":{"@id":"https:\/\/www.parametriczoo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#primaryimage"},"datePublished":"2020-03-03T19:07:27+00:00","dateModified":"2020-03-03T19:07:44+00:00","author":{"@id":"https:\/\/www.parametriczoo.com\/#\/schema\/person\/0368c6eb8bfe3a003504793be2a2e0e3"},"breadcrumb":{"@id":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.parametriczoo.com\/index.php\/2020\/03\/03\/coincident-planes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.parametriczoo.com\/"},{"@type":"ListItem","position":2,"name":"Coincident planes"}]},{"@type":"Person","@id":"https:\/\/www.parametriczoo.com\/#\/schema\/person\/0368c6eb8bfe3a003504793be2a2e0e3","name":"PARA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.parametriczoo.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2b2ff0ff40493545df12d0b31a504675?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2b2ff0ff40493545df12d0b31a504675?s=96&d=mm&r=g","caption":"PARA"},"url":"https:\/\/www.parametriczoo.com\/index.php\/author\/para\/"}]}},"jetpack_featured_media_url":"https:\/\/www.parametriczoo.com\/wp-content\/uploads\/2020\/03\/coincident-planes.jpg","_links":{"self":[{"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/posts\/596"}],"collection":[{"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/comments?post=596"}],"version-history":[{"count":0,"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/posts\/596\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/media\/637"}],"wp:attachment":[{"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/media?parent=596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/categories?post=596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.parametriczoo.com\/index.php\/wp-json\/wp\/v2\/tags?post=596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}