yes and no. The force is a vector multiplied by a weight multiplier. I wanted to store the user set multiplier with the vector so that i could manipulate the multiplier later
Posts
-
RE: Inherit from Sketchup Classes
-
RE: [Plugin] Sketchup Ivy
@tig said:
The Tool class
activate
doesn't have arguments (initialize
can)def activate(view) > puts view > end
line#88 et al is superfluous and could be omitted in its entirety ? Why give it 'view' simply to print to the Console?
It could be
def activate > puts Sketchup.active_model.active_view > end
with little use??
Thank you!!! I couldnt for the love of anything find out whats wrong! I guess the activate method is fired on initialization. stupid me. Top Post attachment updated
-
RE: Inherit from Sketchup Classes
@TIG: In this case a vector is to be considered a force in my Ivy plugin. Early in de development I did some experimenting with changing the and updating the ivy after it was actualy created (by selecting the ivy group and changing multipliers, or selecting a branch in the ivy and changing multipliers on just that one). I therefor needed to store the individual vectors and its multiplier. This became very complex very fast, very overkill and i guess its not even nessecary to store the multiplier anyway. But the problem regarding inheritance stuck and is still bugging me (even its not a problem at the moment).
-
RE: [Plugin] Sketchup Ivy
@robert111 said:
andre51
how to make leaves with this plugin plzzzzzzzzzzzi like you ivy very nice
can you make tutu for your ivy setting plz
Thats from the original standalone plugin foud here
Leaves will soon be available in this plugin too, but isnt at the moment
-
RE: [Plugin] Sketchup Ivy
Sorry Guys! The file i updated 10 minutes ago was actually a downdate Sorry for the inconvenience. The new one should work.
-
RE: [Plugin] Sketchup Ivy
@Dave: Uploaded a new version in the Top post. Try that one
-
Inherit from Sketchup Classes
I tried to make a custom Vector class inheriting from GEOM::Vector3D. The inheritance in it self was no problem, no error messages, no warnings or anything.
class MyClass < Geom;;Vector3d end
This works fine
Then i modified my custom MyClass initialize method to accept 4 instead of 3 arguments.
class MyClass < Geom;;Vector3d def initialize(x,y,z,weight) @weight = weight super(x,y,z) end end myvector = MyClass.new(1,2,3,0.3)
This will throw an error message saying i have to many arguments (4 for 3). It seems like MyClass doesnt overwrite the Vector3d.initialize method. If im changing my initialize method back to 3 arguments:
class MyClass < Geom;;Vector3d def initialize(x,y,z) puts "Im here" @weight = weight super(x,y,z) end end myvector = MyClass.new(1,2,3,0.3)
Doesn't write anything to the console. It like my custom initialize method is never accessed. But myvector.class == MyClass???
Anyone? Is this because Vector3d is a reflection of a c++ / c class? (is it?). Are Sketchup denying me my rights as a rubyist to do whatever i want? Is it in ruby possible to lock the arrity of a method? Am i forgetting something?
Regards
Pierre -
RE: [Plugin] Sketchup Ivy
@thomthom said:
@alan fraser said:
Some great improvements there...and pretty easy to customise (I doubled the float length). One issue I have on my system is that when the progress meter hits 100% I still can't see the red latent growth path. It's only visible from certain very specific angles, so I have to keep constantly orbiting to a new position to see where it's up to. I have the latest graphic drivers. It's no biggee, but I thought I'd mention it.
That's probably because the tool doesn't implement the
Tool.get_extent
method: http://code.google.com/apis/sketchup/docs/ourdoc/tool.html#getExtents@Pierreden: Beware that adding methods into the base classes risk running into conflicts with other plugins. It's the same as adding methods to the root namespace - everything is shared. Method names such as
.to_v
,.to_p
,.all_faces
could potentially be used by other plugins authors.
Even though it looks nicer to extend the base classes there always is a risk of clashes. I always advice people to void it just to be on the safe side.Yeah. Im aware of this but do this mostly because my experiments and tests never leave my computer/Sketchup. Will do something about this soon.
-
RE: [Plugin] Sketchup Ivy
@lobster said:
Hi Tig,
Thanks for the clarification. My path is correct. I have the Sketchupivy folder and the .rb file in the plug ins folder.
Regards
Sam
I have little experience with mac, but try to replace the tool.rb in the "SketchupIvy" folder with the attached one. Might work
-
RE: [Plugin] Sketchup Ivy
@didier bur said:
Hi,
Very interesting. Two remarks/questions: lots of branches have their faces reversed. Do you think this will be fixed in a future release ?
Do I have to play with the parameters to make it 'grow', as it seems to 'fall' more than to climb ?
Regards,I think both off these issues have been fixed in the v.0.1 release
@Oxer:
I can take a look at it. If you could PM me the error output in the ruby console it would be of great help! ("windows" > "Ruby console" inside sketchup and then try to make a new Ivy with this window open and copy the error message) -
RE: [Plugin] Sketchup Ivy
@thomthom said:
@pierreden said:
@Gaieus: Of course. But is it possible to attach a rar file directly to the post?
Yes - under the textbox when you write a post there is an "Upload attachment" tab where you can upload files.
Hehe, sorry about that. Latskap.
-
RE: [Plugin] Sketchup Ivy
Wow. Thanks for all the replies!
@Gaieus: Of course. But is it possible to attach a rar file directly to the post?
@Alan: Yes. That seems brilliant! (one day It really seems like this Ivy algorithm has a lot of potential (way beyond ivy). And in regards to what you said about gui, this is what i have in mind.It is scene-aware and quite easy to customize. Last night I rewrote a chunk of it , added an external force (wind, comming from the sun) and tried to make it a bit more aware of the scene. After some tweaking it realy looks like a good Fur plugin - (screenshots below). I guess it wouldnt be too hard to make it in to a tree growing algorithm og even combine these into a powerpack of branching awesomeness.
Regards
Pierre -
RE: [Plugin] Sketchup Ivy
@rombout said:
hi,
im working on a mac, the plugin doesnt seem to work at all in niether Su 6,7 nor 8
Thats not good. I would really appreciate it if you could PM me the error message you get in the ruby console (Window - Ruby Console)
Regards
-
RE: [Plugin] Sketchup Ivy
@solo said:
Download link sends my virus software into a tizzy, anyway to host it elsewhere?
Try this one
-
RE: [Plugin] Sketchup Ivy
@mike lucey said:
Thanks Pierre, Could this be the new 'Fur'?
I havent realy seen the connections before now, but i guess this algorithm is sort of like "fur branching of furs". I believe tha changes needed for this to behave as fur is minimal! brb
-
[Plugin] Sketchup Ivy
After playing with "An Ivy Generator"(found here) I thhought about how awesome it would be to be able to play with something like this directly in Sketchup. I therefore started to port the ivy generator to ruby and Sketchup. As i now have working code with regards to the main parts of the algorithm, collition detection, adhesion and the growing of the ivy branches, i decided to post a proof of concept.
Usage
-Select "Sketchup Ivy..." in the Plugins sub-menu
-Adjust Parameters in Menu
-Every time you click your left mouse button, the ivy will grow
-CTRL-Click for leafs (repeat as many times you want)
-When you're happy with the ivy Shift-click to make it into actual volumes.Please get the latest version's RBZ from the PluginStorehttp://sketchucation.com/pluginstore?pln=SketchupIvy Now suitable for all OSs and SketchUp versions from v8 through to v2015...
VERSION 0.6
UPDATE 12.05.2011
-Tooltip
-Minor bug fixes
-Additional parameters.VERSION 0.5
UPDATE 09.05.2011- Will now use components with "ivyleaf" in the name as leafs. 3 included by default.
- Hopefully better mac support
- Small algorithm changes
- ALT+click to make ivy grow towards pointer
- Thea users: uncheck 'export as components' before exporting. (Thanks Solo)
Fix 0.5.2 - Tool startup fix (maybe?)
VERSION 0.3
UPDATE 05.05.2011- Simple gui. (More parameters to come)
- Leaves
- Speed and reliability
- I know theres some issues with mac. As i haven't had the opportunity to debug on a mac, im not sure if its working now. Mac users with issues are very welcome to PM me or write here. (Guess this goes for everyone with issues, im sure there is lots ).
VERSION 0.1.5
UPDATE 28.04.2011
[Uploaded buggy file !! Sorry]- Added Wind (comming from the position of the sun atm)
-Bug fixes
VERSION 0.1
UPDATE 27.04.2011- Faster Preview
- Better Ivy "Resolution"
- Faster and more reliable volume generation (less buggsplats?)
- Face normals should now be oriented correctly
- More reliable collision detection
- A few bugs in the force algorithms fixed.
- Works as before. Edit the values in Plugins/SketchupIvy/setup.rb
TO COME
- Leaves as Components
- More Parameters and grow patterns.
- Other Plugins. Fur, Cloth and Tree.
Notes
- Never shift-click when there is more than 150 branches (information in the ruby console). This will often cause a bugsplat (seems like sketchup realy, realy, realy doesn't like programmaticaly adding of entities or seemingly infinit loops )
- For the adhesion to work, you have to be in the same scope (i made this to clearify (face.classify_point seems buggy)
- This script has only been tested in SU8. As far as i know this script might cause bugsplat infernos and generally fuck shit up in other versions
- If you find any bugs or problems please PM me If you're extra awesome attach the error description from the ruby console.
Any suggesions, comments or crits are very much welcome!
Peace
Pierre -
RE: Detecting Ctrl-[Move || Rotate]
Awesome, thats exactly what i needed!
Have a great sunday!
-
Detecting Ctrl-[Move || Rotate]
Yo! Im trying to detect new entities added using the move or rotate tool while pressing Ctrl.
Using the Meta Observer i can see that the ToolObserver, SelectionObserver and some Transaction Callbacks are triggered, but I just cant figure out how to detect the new geometry (for some reason the EntitiesObserver doesn't trigger when Ctrl-move or rotate )
Can someone point me in the right direction?
Peace out
Pierre -
MiniTest Testing Framework for SU
For those interested, heres what you need to be able to use Ruby 1.9 new unit testing framework in SU.
-
Download and unpack into su plugin folder
-
require "minitest/autorun" at the beginning of the script you want to be testing
-
load /require all modules/classes and testing files in you script
-
Run MiniTest::Unit.new.run at the end
-
Unit testing magic!
It should look something like this:
require 'minitest/autorun.rb' class A def say_hi return "Hi!" end end class AClassTests < MiniTest;;Unit;;TestCase def setup @a = A.new end def test_say_hi assert_equal @a.say_hi, "Hi!" end end MiniTest;;Unit.new.run
And Output something like this in the console:
Run options; --seed 27422 # Running tests; init . Finished tests in 0.047000s, 21.2766 tests/s, 21.2766 assertions/s. 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
To run it again, just run load "yourloadfile.rb" in the ruby console.
Im not able to get the MiniTest::Unit::autorun feature to work, and this script will run ALL tests loaded into SU, but its seems more than good enough for most.
Regards
Pierre -
-
VRayLumen - Light Controlpanel for VfS
Hi!
Dont know where to post this or if this is interesting for anyone else (I suppose it might), but i post it here anyway Β
I've spent the last few days writing a script / plugin which makes tweaking vray light attributes a bit easier.** This Script is currently highly unstabel and its behaviour is unpredictable. It should be considered "proof-of-concept" and early alpha version. I have only tested it on Sketchup v. 8.0.3117 and the latest VfS (I think)**
VRayLumen
The plugin makes it possible to send commands to lights in the scene through command line. The Gui in itself is very simple. One list listing all the lights in the scene.
It shows some basic information about each light and each light accepts a range of commands throug the input field.
Intensity
-"50 w", "12 s", "1500 l": Sets the intensity to 50 watt, 12 scalar or 1500 lumen respectively
-"100w 3e": Sets intensity to 3 Watt. 100 watt (bulb) at 3% efficiency
-"x2", "x0.3", "x11.25": Increase the intensity by a multiplierColor
-"254, 233, 211" : Sets light color to 254,233,211
-"3500 k": Set light color to match 3500 Kelvin. Between 1000 and 10000 kelvin is possibleLight
-"32#", "900=": Change subdivs to 32 subdivs for rectangular light or 900 photon subdivs for Omni or spot
-"e": Enable or disable the light
-"i": Toggles rectangular light visibility
-"edit": Opens ASGVIS native edit window
-"-Leftside Uplight": Renames the light to "Leftside Uplight"
-"z": Zoom to the light in model
-"s": Select the light in model
-"h": Hides the light in model** All commands are without the quotes **
Thats pretty much it. If you add or delete a light in the model, it will be removed/added from/to the list when the VRayLumen window gains focus / are clicked. My intention is to make it possible to group lights so that changes to a master light will make the same change to all lights that are bound to it , but im unsure when and if this will be ready/testable.
DOWNLOAD
http://www.mediafire.com/?821ee6dxldfgidvAgain. This script is unstable. Expect something to go wrong. If nothing happends, close and open the VRayLumen window. If you find out why nothing happends, you're very welcome to PM me or post here.
All comments, crits and suggestions are very much welcome!
Regards
Pierre