also check with entity.valid? before doing stuff on an entity like this:
all_ent = []
Sketchup.active_model.entities.each do |ent|
all_ent.push ent
end
all_ent.each {|ent| x.erase! if ent.valid?}
also check with entity.valid? before doing stuff on an entity like this:
all_ent = []
Sketchup.active_model.entities.each do |ent|
all_ent.push ent
end
all_ent.each {|ent| x.erase! if ent.valid?}
because the internal function length is done in C world and those 3 scalar multiplies in Ruby world (which of course is slower)
why this testcase doesnt work ? I am missing something ?
later edit: duh, vtmp = v.clone otherwise it will change the original vector
from my tests scale2 is like 26-30% speed increase
def scale(v,s)
Geom;;Vector3d.new(v.x * s,v.y * s, v.z * s)
end
def scale2(v,s)
vtmp = v;
vtmp.length = vtmp.length * s
vtmp
end
v1 = Geom;;Vector3d.new(5,1,5)
n1 = 10
t1 = Time.now
begin
50000.times do |x|
scale2(v1,n1)
end
rescue => err
p err
end
p Time.now - t1
Viktor: I proposed to Adam a collaboration but it seems it doesn't fit the roadmap
Biebel: Q1, Q3 - yes. regarding Q2, I dont know as I didnt saw any textures in the videos, only color. doing multitexturing (texture + lightmap) only in ruby will be slower
unfortunately it will not be free (unless someone will sponsor the development)
also it is Windows only due the tricks involved.
it is a plugin and can be activated/deactivated (even if the impact on frame per rate is minimal)
it needs some finetuning, but this all depends on the user feedback - higher feedback, higher priority
... and it is not SketchUp 7
http://www.youtube.com/watch?v=rfr8cLZNvWg
I used 2 .avi files - they can be rotated, scaled as normal textures on a face.
enjoy
how about loading a complex model (with textures, transparent materials, sun activated, ...) and typing in Ruby Console Test.time_display
but if you flip red and rotate blue 180 it is not the same as doing a flip on green ?
t = transformation.to_a
p t[0] < 0 # flipped on red?
p t[5] < 0 # flipped on green?
p t[9] < 0 # flipped on blue?
unfortunately I dont have time right now to implement it, but you are free to add it. hope that you will share the modifications so I can add it to drop.rb.
thanks for the suggestion
excellent ! can you provide more info about it ?
LE: a4chitect beat me with the questions
pros:
cons:
conclusion: uninstall
I tested it some time ago - first impression - bleah (some things didnt worked, ...)
2nd chance now - one minus, it wants to be installed only on drive.
you need win32ole.so for that example.
... but you still need another file to access process identification (win32ole or win32api)
here is one quick way
require "win32ole"
procs = WIN32OLE.connect("winmgmts;\\\\.")
all_proc = []
procs.InstancesOf("win32_process").each do |proc|
all_proc.push proc.name.to_s.downcase
end
p all_proc.include?("indigo.exe")
just add an index.htm in the images dir that redirect to your main page