Oh and then there are construction points and test points? I understand test points but what are construction points? Thank you / gxl
Posts
-
RE: [Plugin] Chronolux for Sketchup
-
RE: [Plugin] Chronolux for Sketchup
Ok this is really interesting and the user interface is just great.
I do understand that it calculates the shading from a specific test point but could you elaborate a little bit on the difference between short rays and long rays and what exactly they do?
Thank you so much / gxl
-
RE: [Plugin] Chronolux for Sketchup
This is incredible. This is unbelievable awesome. I was amazed by simple rays but now years after. And working with Revit all the time. This is incredible.
-
RE: Sketchup 8 + Windows 7 = plugins don't show up?
@unknownuser said:
Hi,
@georglorenz: try the script I have attached and see if it works better.
RegardsThat worked! Thank you Didier!
Here is what I understand you did to the syntax:
model.start_operation "randomflipc"
changed to:
model.start_operation("randomflipc")results = UI.inputbox prompts, defaults, "Random Scale Parameters"
changed to:
results = UI.inputbox(prompts, defaults, "Random Scale Parameters")UI.menu("Plugins").add_item("gxl random flip"){gxl_randomflipc}
changed to:
UI.menu("Plugins").add_item("gxl random flip"){ gxl_randomflipc }Is there a general guide or forum discussion for sketchup 8 syntax that would help me avoid these pitfalls in the future?
Thank you again /g
-
RE: Sketchup 8 + Windows 7 = plugins don't show up?
@unknownuser said:
My guess you have not went to window, preferences, extensions and selected the boxes so they show
Thank you for the reply. Unfortunately they do not show up as extensions. In fact most of the missing plugins are as simple as the attached example. So as I put them in the Plugins folder and restarted Sketchup I expected them to appear in the Plugins Menu. But they don't.
Is there a way to manually load a plugin from within Sketchup?
thank you /g
-
Sketchup 8 + Windows 7 = plugins don't show up?
I switched to a new computer and for whatever reason some of my plugins do not show up in the Plugins menu anymore. I am using Sketchup 8 pro and Windows 7. Did anyone ever have a similar experience?
Could it be a Windows rights issue? I don't have admin rights on this machine but the plugins folder has been made accessible to me. Or am I missing something else completely?
Please find one of my homemade plugins that have this issue below.
Thank you much / g
-
RE: [REQUEST] fog control
@thomthom said:
Btw, the API docs are lying:
I knew it. I knew it! No of course I didn't. Thank you much.
You are right it will do the same thing as the slider, but I am hoping for more fine-control inserting the values. The slider is really akward to control especially when you are doing elevation drawings and want to fade out the background.
Thanks again. You are the man thomthom.
G
-
[REQUEST] fog control
Hi. I am trying to write a small plugin that would provide some numerical control to the fog settings (FogDensity, FogEnd, FogStart and FogType (what is FogType btw?)), via a simple dialog box. Unfortunately I failed in the very early stages. Trying to read the current values resulted in nothing more than an empty messagebox.
Why is that? Or does such a plugin exist already?
Thank you. G
below is the code that gave me the empty messagebox
model = Sketchup.active_model renderingoptions = model.rendering_options value = renderingoptions["FogStart"] UI.messagebox value
-
RE: Simple reflection
@al hart said:
This idea would work.
Another idea one our our clients used to get a reflective floor was to mirror all the geometry through the floor, and make the floor itself partially transparent.
That's right! A mirror is a projection of the object through the plane of the reflecting surface! That could work with any surface not just the floor is what you are saying. Very clever. So the script could also
- mirror the complete geometry of the model around the selected face
- make a section cut through the plane of the selected face
- saving the resulting image
- projecting it on the selected face
- and then undo the translations.
Now that sounds like an evening program for the next half year. Thank you for your answers. G
-
Simple reflection
I have a crazy idea on how to maybe add simple reflectivity to a material. Unfortunately I am not a ruby expert at all, but maybe someone else would want to take on this little project. The script would do something like this:
- Save the current viewpoint
- Get a face from the user selection
- set the viewpoint in the center of the face, looking at the reflected angle to the original view
- render this view
- apply the rendering as the material to the selected face
- return to the original viewpoint
I guess it will never be photo-realistic but maybe the effect is interesting.
What do you think? G
-
RE: [Plugin] Heightmap from model
Slightly off topic here: Is there a plugin that does the exact opposite of this one? That is creating a terrain from an greyscale image (.jpg or anything else)? Thank you. G
-
RE: [req] help with simple plugin
TIG: Thank you. It works. Don't ask me why. Your and my code are identical with the exception of a couple of blank lines. I checked that twice and then again. And side by side. And then again. And I have no idea. But it its working.
I added input for xyz coordinates as you can see on the image. The crinkled surface was distorted only along the z axis, the top plane of the cube was distorted in three dimensions.
This is just for fun. Please use at your own risk and save before using. It crashed on me a couple of times already.
Thank you much for all your time. G
-
RE: [req] help with simple plugin
@tig said:
Changed every
GL_distort
to lowercase ?
Works fine for me...yes. both of them. thank you. I guess it has something to do with the "for v in e.vertices loop". If I take it out completely it parses fine. Can it be that something would not work in Sketchup 6? I am still running v6 on a mac. Strange thing is: it runs fine in the webconsole. Any idea how to resolve this?
Thanks for your time. G
-
RE: [req] help with simple plugin
@tig said:
Change from
GL_distort
togl_distort
a def must start with a lowercase letter...still the same error...
-
RE: [req] help with simple plugin
Ok. Thank you guys. Almost there. The main method works fine in the webconsole, but when I save it as a script it tells me: "distort.rb:42: parse error, expecting `kEND'", which I guess means that end end is missing in line 42 (before the menu).
I seriously have no Idea why. Please help me!# gl_distort require 'sketchup.rb' def GL_distort model = Sketchup.active_model entities = model.entities selection = model.selection prompts = ['Random Distortion Distance'] defaults = [0.to_l] results = UI.inputbox prompts, defaults, 'Distance for random distortion;' distance = results [0] model.start_operation "Distort" selection.each do |e| if (e.is_a? Sketchup;;Face) for v in e.vertices xrand=(-distance/2)+distance*rand yrand=(-distance/2)+distance*rand zrand=(-distance/2)+distance*rand # puts(xrand, yrand, zrand) vector = Geom;;Vector3d.new xrand,yrand,zrand tr = Geom;;Transformation.translation vector Sketchup.active_model.entities.transform_entities(tr, v) end #for end #if end #do model.commit_operation end #main ### Menu ### if not file_loaded?(__FILE__) UI.menu("Plugins").add_item("Distort"){GL_distort} end #if file_loaded(__FILE__)
-
[req] help with simple plugin
Hi, I am new to ruby scripting and amazed by the possibilities. I am trying to write a simple script that distorts the geometry of all selected faces by a random amount.
I first triangulate all selected faces with TIGs triangulateFaces that I call from within the script which works fine. Then I want to transform each vertices of every face by a random x,y,and z amount.
with my limited programming experience I am so far unable to get it going. Here is what I thought:
for f in faces
for v in f.vertices
v.position = v.position + [xrand,yrand,zrand]
end #for
end #forBut that (and 23 other options I tried) does not work. Can anyone help me here?