<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[A faster way to obtain shadow_info?]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I would like to obtain SunDirection vector a lot of times on a whole year.<br />
But the method below is too slow. Is there a fast form to find out SU shadow_info?</p>
<pre><code>
vec=[]
info=Sketchup.active_model.shadow_info
atime=Time.now

for i in 0..50000
  info["ShadowTime"]+=600
  vec&lt;&lt;info["SunDirection"]
end

</code></pre>
]]></description><link>https://community.sketchucation.com/topic/133595/a-faster-way-to-obtain-shadow_info</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 13:57:49 GMT</lastBuildDate><atom:link href="https://community.sketchucation.com/topic/133595.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Mar 2012 10:20:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to A faster way to obtain shadow_info? on Thu, 01 Mar 2012 12:04:31 GMT]]></title><description><![CDATA[<p dir="auto">It's not actually getting the info that's slow. It's setting it.</p>
<p dir="auto">When I ran the test it took ~11sec to run.</p>
<p dir="auto">When I removed <code> info["ShadowTime"]+=600</code> it took ~0.15sec to run.<br />
That's why I hoped using <code> start_operation</code> would help - but alas. But at least, when you do this, ensure that Shadows are not on in SketchUp.</p>
]]></description><link>https://community.sketchucation.com/post/1313624</link><guid isPermaLink="true">https://community.sketchucation.com/post/1313624</guid><dc:creator><![CDATA[thomthom]]></dc:creator><pubDate>Thu, 01 Mar 2012 12:04:31 GMT</pubDate></item><item><title><![CDATA[Reply to A faster way to obtain shadow_info? on Thu, 01 Mar 2012 11:59:52 GMT]]></title><description><![CDATA[<p dir="auto">Thanks thomthom, maybe could be added to wish list ruby access to SU Solar Position Algorithm in a fast way.</p>
]]></description><link>https://community.sketchucation.com/post/1313623</link><guid isPermaLink="true">https://community.sketchucation.com/post/1313623</guid><dc:creator><![CDATA[Juantxo]]></dc:creator><pubDate>Thu, 01 Mar 2012 11:59:52 GMT</pubDate></item><item><title><![CDATA[Reply to A faster way to obtain shadow_info? on Thu, 01 Mar 2012 11:32:00 GMT]]></title><description><![CDATA[<p dir="auto">hmm... I looked at it. But found no optimized way. I tried making constants of the string -in case the creation of the strings for every iteration had a cost - but no change.<br />
And you can't address the info with numeric indexes either...<br />
I also wrapped the whole block in a start_operation with the disable_ui argument to true - but still no performance difference.</p>
]]></description><link>https://community.sketchucation.com/post/1313619</link><guid isPermaLink="true">https://community.sketchucation.com/post/1313619</guid><dc:creator><![CDATA[thomthom]]></dc:creator><pubDate>Thu, 01 Mar 2012 11:32:00 GMT</pubDate></item></channel></rss>