You can get a type of entity faster by using grep. (See this thread: http://sketchucation.com/forums/viewtopic.php?f=180&t=48885 )
<span class="syntaxdefault"></span><span class="syntaxcomment"># Get an Array of all of the selected Edges<br /></span><span class="syntaxdefault">edges </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">selection</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">grep</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Edge</span><span class="syntaxkeyword">) </span><span class="syntaxdefault"></span>
Performance will suffer greatly if you add/remove/recreate geometry to organize your data instead of just sorting it. The more entities in a context the slower it will be.
@tafkab76 said:
And actually I just wanted to know how to reverse edges,
Why do you want to reverse edges?
@tafkab76 said:
That could quite easily be solved by an own "uniq"-method for Point3d-objects
Actually - no. #uniq will not compare Geom::Point3d against their positions - but rather if they are the same object instance.
Of course you´re right, I only browsed the Entity-Classes, not the Collection-classes, although I already created some faces using add_face...shame on me.
thx for your quick response!
Thank you for your detailed answer. I think I will go with the seperate View solution. although it might be a bit confusing to have a preview in a different window which might get lost behind other windows and stuff. But on the other hand it seems far more attractive than dealing with javascript behaviour on different browsers (versions). Maybe the model in the preview View is even natively zoom- and rotateable? That would certainly be a nice feature. I will catch up on that, thank you so far.