🚨 Skimp | 25% Off until March 30 Buy Now

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Ruby system call

    6
    0 Szavazatok
    6 Hozzászólások
    798 Megtekintések
    S
    Yes, that works. Thanks Jim.
  • [Code] Real UV from UVHelper data

    3
    0 Szavazatok
    3 Hozzászólások
    2k Megtekintések
    thomthomT
    I believe so... I was having problems with my UV mirror plugin where I could not properly transfer distorted textures from one side to another. Scaled and skewed worked fine, as the Q value then returns 1.0 from the UVHelper - but distorted textures returned values with a Q value other than 1.0 - and that didn't play well when passing back to .position_material. This is what jeff99 said about this trials: @unknownuser said: I also think the q values is unused. The matrix is to transform from a 3D (xyz) point in model space, to a 2D (uv) point in image space. They just put the data in a Point3d because they didn’t have a Point 2D. If they are using homogeneous coordinates, the q value you are seeing may be the "H" value, and they should have divided the u and v values by H. (Do a Google search on homogeneous coordinates). I do however think that the U and V values are wrong. In our GeoSketch application we map areal images to faces. We calculate the UV coordinates in our code, and use position_material to map them to the face. The textures map to the faces correctly, and we see properly textured faces in the SketchUp model. After building the model, we have a tool to export to OpenFlight. We tried using the UVHelper to get the UV coordinates back, but when we applied them in OpenFlight, the textures didn’t map properly. Bummer. We then started storing our calculated UV coordinates as attributes on the face (the ones we used with position_material). Then we wrote these UV values to OpenFlight, and they worked perfectly. @thomthom said: H value? hm... this is new to me. I had another look at the values returned. Comparing the regular texture with the non-regular it seems that the UV values are multiplied by the Q value. Could it be that they multiplied instead of divided? If it is an H value, then I should be able to use that to restore the regular UV values? @unknownuser said: That would be very interesting. Let me know what you find. It would actually mean that they didn’t divide or multiply. For homogeneous transformations you are always supposed to divide by H. However, for some transformations, H comes out to be 1.0, so dividing doesn’t change the values. Your observation may mean that they didn’t divide by H. But we don’t even know for certain that they are using homogeneous coordinates. We need more information. @unknownuser said: Well Tom, I just changed my code on our theory that they did a homogeneous transformation, and the q value is actually the H value that they should have divided by. When I divided the u and v by q, and wrote those new values out, the textures mapped correctly. Your observation that the q value was not 1.0 for skewed projections was key. When H is 1.0, you get away with not doing the division. Thanks Tom, your diligence on this matter paid off. We can now compensate for it in our code. We just need to get Google to promise to tell us if they ever choose to fix this, and do the division by H. Let us know how your results are Dale.
  • OnPageChange event

    4
    0 Szavazatok
    4 Hozzászólások
    338 Megtekintések
    chrisglasierC
    @chrisglasier said: And in Google SketchUp Ruby API what's the difference between PagesObserver.onContentsModified and PagesObserver.onElementAdded ... Now I have got to the point where I am checking what happens when the scene machine is plugged in to a model with no scenes. It is sensible to add one or more scenes to get started. But when I do that onContentModified sets off the JavaScript function for a scene selected from an existing set and throws an error. I suppose I will find a way round, but it does not seem right when there is " onElementAdded." There again I could have missed something fundamental. Either way I would appreciate some clarification. Thanks Chris
  • How to launch a ruby script with OnClick?

    8
    0 Szavazatok
    8 Hozzászólások
    2k Megtekintések
    chrisglasierC
    @martinrinehart said: The message could also be actual Ruby code to execute, but there's a 2KB length restriction. I am sorry but I think this is misleading and my mother tongue is English. Is this what you are talking about? http://code.google.com/apis/sketchup/docs/ourdoc/webdialog.html @unknownuser said: Note that you're sending data down to Ruby as a single string that's passed via the window.location bar. In Internet Explorer on PC, there is a length limit of 2038 characters for this bar, so if you're needing to pass large data down you might consider using get_element_value to pull in a longer string from a hidden input field in the HTML.
  • Attributes object skectchup in a char variable in Ruby?

    3
    0 Szavazatok
    3 Hozzászólások
    283 Megtekintések
    P
    Y i want create a script who can put in a ruby variables some attribute of my dynamic object when i click on him, but i don't know how to do this... I know c, c++, java, php 5 but sketchup and ruby is new for me . If you can help me, it's nice. thx
  • How to batch export (and reduce in size) multiple textures??

    6
    0 Szavazatok
    6 Hozzászólások
    422 Megtekintések
    ArcA
    Didier Bur's plugin: [Plugin] Very fast texture writer http://forums.sketchucation.com/viewtopic.php?f=180&t=6386&p=156132&hilit=Very+fast+texture+writer#p40025
  • Triangulating points

    5
    0 Szavazatok
    5 Hozzászólások
    504 Megtekintések
    A
    I use clouds.rb for generating terrain meshes and I am wonder if there is anything which will smooth the result ... ! Right now I think the GPS I am using is not very precise or maybe all GPS are creating some wrong points... and that's why a circular (aprox) path I am tracking is it than(after translating to 3d points) shown as a iregular path... any hint ?
  • Lights in su2pov3

    3
    0 Szavazatok
    3 Hozzászólások
    589 Megtekintések
    A
    This download helped me too Didier ! Merci... With kind regards Petronel
  • WebDialogs - tabs sample !

    6
    0 Szavazatok
    6 Hozzászólások
    449 Megtekintések
    J
    Great example. It's usable as it is, or can be built on if needed. Thanks.
  • Transformations

    23
    0 Szavazatok
    23 Hozzászólások
    17k Megtekintések
    J
    One of the reasons I asked was that I wrote this LDraw importer. But the LDraw axes system does not match SketchUps, and I really want the importer to correct this on import. You can see the import works, but I haven't been able to figure out how to trasnform the geometry during the import so it uses a SketchUp axes that people are familiar with using. [image: l2Tt_019.jpg]
  • WebDialog - how to make tabs?

    7
    0 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    D
    I found a page. That has some very interesting things in html. http://www.dhtmlgoodies.com/index.html?page=dhtml-suite greetings
  • Developer Forum Sticky Links

    2
    0 Szavazatok
    2 Hozzászólások
    4k Megtekintések
    P
    thx!
  • Output Text ?

    8
    0 Szavazatok
    8 Hozzászólások
    536 Megtekintések
    J
    @tpoz said: is there anything fancy i can do with entity info if i label everything? On the serious side, you could do a shade analysis to see if the plants are goig to gt enough Sun. How about blending the color of the tomatoes from green to red as time passes? http://code.google.com/apis/sketchup/docs/ourdoc/color.html#blend Or (making the plants "grow" (scaling the plant size) as the growing season progresses? Sounds like a fun application of SketchUp!
  • Make PDF-s with RUBY

    4
    0 Szavazatok
    4 Hozzászólások
    401 Megtekintések
    Chris FullmerC
    I think it looks very interesting. I don't currently have a need to make pdf's, but now that I know it might be possible, I might try to find reasons Chris
  • Ruby's global nightmare!

    26
    0 Szavazatok
    26 Hozzászólások
    2k Megtekintések
    M
    jessejames, @jessejames said: Am i moving to quickly for ya? Having written code in Python, Ruby, C#, Java, JavaScript, various dialects of Basic, and C++, probably not. Also, having a CompSci prof in the late '70's always wax on about the elegance of Pascal conditioned me to the large distinction between 'elegant' when finished, vs easy to reach 'finished.' The Python features you’re referring to would be considered simple syntax conventions by most programmers, and, hence, trivial. I'll respond anyway. Namespaces – Lets say I'm working on a real project, and production code will be a minimal set of files. As the code is being created, it's often helpful to have the code being worked on by itself, in a separate IDE container. Once complete, it's moved into another container that has finished code. Often, that IDE container is a file. I don't want the namespace changing if I move code between them. End vs indent – I've written code where there may be a lot of end statements, one after the other. Also, indenting is commonplace today. Hence, it would seem that Python's removal of statements like 'end' would be helpful, even though almost all other languages use them. Conversely, when writing code, I often leave test/debug statements on the left margin as a marker that I can delete them when the code works. I can't do that in Python. I might suggest that you read a few books like 'Design Patterns' by the 'Gang of Four' to get an idea of what the real distinctions are in programming languages. Real distinctions affect whether a framework can be moved/ported to another language, as opposed to simple syntax conventions. I might also suggest that there's plenty of others forums for your concerns. This one is for Ruby used in SketchUp. BTW, I'm ignoring the flame, otherwise we might get into that layman concept... Greg
  • Core ruby policies

    12
    0 Szavazatok
    12 Hozzászólások
    794 Megtekintések
    C
    @chris fullmer said: There is a good chance they are part of the Dynamic Components. yeah. they are part of dcutils.rbs
  • Find the ObjectID for an array?

    4
    0 Szavazatok
    4 Hozzászólások
    8k Megtekintések
    Chris FullmerC
    @jim said: 100 references to the same Array, but not 100 arrays. I know, I'm being pedantic. Its ok, its good for me. And is there a difference between .object_id and .id and .id ? And I saw a hint at :name - what is that? I couldn't get it to work. And in your example, what does ||= do? I'm guessing it creates an empty array at [index] if there is not an array there already? Thanks Jim. Chris
  • MIRROR 2d - plugins idea

    10
    0 Szavazatok
    10 Hozzászólások
    836 Megtekintések
    D
    thanks for your reply
  • Clear the ruby window

    11
    0 Szavazatok
    11 Hozzászólások
    716 Megtekintések
    Chris FullmerC
    Anyone want to configure Jim's plugin for 64bit? Chris
  • Unit plugin not work in SU 7.1 ?

    17
    0 Szavazatok
    17 Hozzászólások
    2k Megtekintések
    CadFatherC
    got it Jim, it was something to do with the path to the icons - the ruby console is great but not when you forget its existence, Thanks!

Advertisement