<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Exporting road network splines in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/exporting-road-network-splines/m-p/664121#M8811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working on a traffic simulation that should run above a CityEngine scene. Therefore I need to rebuild the graph network in my application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until now, I've exported the graph network as SPH files. However, I can't recreate the road network correctly since the SPH file lacks intersection parameters and spline information (tangents at the vertices).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way of enriching the SPH export to include intersection and spline information or is there an entirely different exporter that is able to export more than just the connectivity information of the graph?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2018 11:57:43 GMT</pubDate>
    <dc:creator>BernhardRainer</dc:creator>
    <dc:date>2018-02-28T11:57:43Z</dc:date>
    <item>
      <title>Exporting road network splines</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/exporting-road-network-splines/m-p/664121#M8811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working on a traffic simulation that should run above a CityEngine scene. Therefore I need to rebuild the graph network in my application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until now, I've exported the graph network as SPH files. However, I can't recreate the road network correctly since the SPH file lacks intersection parameters and spline information (tangents at the vertices).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way of enriching the SPH export to include intersection and spline information or is there an entirely different exporter that is able to export more than just the connectivity information of the graph?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 11:57:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/exporting-road-network-splines/m-p/664121#M8811</guid>
      <dc:creator>BernhardRainer</dc:creator>
      <dc:date>2018-02-28T11:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting road network splines</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/exporting-road-network-splines/m-p/664122#M8812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SHP generally does not support curved segments.&lt;/P&gt;&lt;P&gt;However all values needed can be accessed from Python, exported as attributes and reconstructed later on. &lt;BR /&gt;To define curves, CityEngine uses &lt;A href="https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B%C3%A9zier_curves" rel="nofollow noopener noreferrer" target="_blank"&gt;Cubic Bézier curves&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/403914_pastedImage_1.png" style="width: 620px; height: 388px;" /&gt;&lt;/P&gt;&lt;P&gt;The position of the Points &lt;STRONG&gt;P1&lt;/STRONG&gt; and &lt;STRONG&gt;P2&lt;/STRONG&gt; can be accessed via Python and added as Object Attributes to the segment (&lt;A class="link-titled" href="http://cehelp.esri.com/help/topic/com.procedural.cityengine.help/html/manual/python/jscripting/jscripting.CE.html#CE-setAttribute" title="http://cehelp.esri.com/help/topic/com.procedural.cityengine.help/html/manual/python/jscripting/jscripting.CE.html#CE-setAttribute" rel="nofollow noopener noreferrer" target="_blank"&gt;Python Scripting - CE.setAttribute)&lt;/A&gt;.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# direction = P_1 / startNode = P_0&lt;/SPAN&gt;
directionStart &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getCurveHandle&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; segmentAB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; nodeStart &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# direction = P_2 / startNode = P_3‍‍&lt;/SPAN&gt;
directionEnd&amp;nbsp;&amp;nbsp; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getCurveHandle&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; segmentAB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; nodeEnd &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The intersection type can also be queried with Python:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getAttribute&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;node&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'/ce/crossing/type'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/exporting-road-network-splines/m-p/664122#M8812</guid>
      <dc:creator>ThomasFuchs</dc:creator>
      <dc:date>2021-12-12T04:04:29Z</dc:date>
    </item>
  </channel>
</rss>

