lol, wow,
definitively can see how my model will have some, cough, deficiencies, compared to some of these I've seen.
All i have left to model is the cutting teeth on the grater and maybe the knife. Hopefully by tonight II can post it.
going to try and give Jeff's method a shot. seems like it would work best for the approach I've been doing.
Posts
-
RE: Model this: Enrico bamboo cheese grater
-
RE: In over my head?
Yeah i noticed a few of those, as well as some other problems
Was having alot of issues trying to get it even to run a few parts of it the other night. Been reading the programming Ruby book found on the ruby-doc.org website. going to have to go through the code and tear it apart piece by piece over the course of this week, and hopefully have something workable by this weekend.
Hopefully. -
RE: In over my head?
Thanks runner, I'll give some of those a shot,
not sure how to implement the puts, though and seeing as how all the message boxes are for error, i dont think it'll bother me to much. At least i'll know my code was doing something...lolI'm working on going through, and cleaning up/commenting the code, and will give it a shot and post it later this eve.
also, i'm not entirely sure this line is correct
IO.readlines(file).each do |line|
mostly i get the feeling that the 'IO." is the wrong prefix. is that a correct assumption?thanks again everyone. Oh, and runner.. If I ever manage to get this thing built and flying, I'll deffinitly give you a ride
-
RE: In over my head?
Thanks again Jim,
here is a quick and dirty tryout of the script.
I seriously doubt in its current form it would work (especially my attempt at creating a group)
but here goes anywaysUI.menu('Plugins').add_item('Plot Data File') do file = UI.openpanel("Select Data File") if file.is_a? String object_set=[] point_set = [] line_count = 0 IO.readlines(file).each do |line| line_count += 1 line.chomp! next if line.empty? if line='$$$' object_set.push(point_set) next end #defines the point_set elements array = line.split(/[;|,|\s]+/).map!{|e| e.to_f} if array.length == 2 array.push(0) end if ary.length != 3 raise UI.messagebox("Couldn't parse data file line;#{line_count}") end begin point = Geom;;Point3d.new(array) rescue => e raise UI.messagebox("Couldn't create point from;#{array.inspect}\ndata file line;#{line_count}\nerror;#{e}") end point_set.push(point) Sketchup.status_text = "Reading line; #{line_count}" end end if object_set.length < 1 rasie UI.messagebox("No data points found.") end #build object object_count=object_set.length object_set.each_with_index do |point_set,i1| start_point= point_set.shift group=sketchup.active_model.entities.add_group if (group) UI.messagebox group else UI.messagebox "Failure" end point_count=point_set.length point_set.each_with_index do |point, i2| Sketchup.status_text = "Plotting point #{i2} of #{point_count} in Point_set #{i1}" group.add_line(start_point, point) start_point = point end end end end
I know i need to do better at commenting the code
but that will deffinitly be in the 'final' version. but lemme know what you think.
BIG thanks to Jim, whose code comprises the core of this script.
Mike
-
RE: In over my head?
sweet, thank you Jim, that plugin was a great help to get me started.
runnign it a couple times, I see that it is actually a great starting point for the script that I'd like to write (if you don't mind me using it).
Going through the code I'm pretty sure I understand how it works. However I do have a couple questions.
what exactly does "rescue =>e" do?and how does
@unknownuser said:
pts.each_with_index do |pt, i|
Sketchup.status_text = "Plotting point #{i} of #{point_count}"
Sketchup.active_model.entities.add_line(first_pt, pt)
first_pt = pt
endpull the next point out of the array pts and store it as pt? I figured out how First_pt was generated, though the second part eludes me a bit.
thanks again for your help everyone
Mike
-
RE: In over my head?
yeah all my data points are in .csv format, that's been the easy part,lol I even have a cheesy little C++ program to generate them for me. I'd planned on using that format, though wasn't sure if there was a way to distinguish between different sets of points within a single file. (one set for a cube, one set for a sphere for example)
That's good to hear that the concept is doable.lol the trick now is to learn Ruby enough to accomplish it.
If you want I can upload an example data point sheet this evening. (don't have it on this computer)
thanks,
Mike -
In over my head?
Ok, so before I try to dive into things, I figured I'd try to run this script idea by people far more knowledgeable than I.
Say i have a set of data points, and want to import them into sketchup (like Cloudv6).
however instead of attempting to triangulate the points to make a sheet, is it possible to instead connect the points sequentially with lines.
Also, would there be a way to separate sets of data points within the file such that a script would know to begin a new set of lines?What I am hoping to get to is to say, have 3 sets of data points on a single file defining 3 different shapes. Import one set of data points, use them to draw a set of lines,turn it into a group, then import the next set, draw the lines...etc, etc. automatically.
My motivation for trying to build this script is I've been working on an aircraft wing design, and pretty much have all the shapes defined mathematically (ribs, spars, etc.. I'd like to be able to model the points, to see what the math is coming out to, and be able to change and remodel quicker than it's been taking me to do it so far.
lol its a little late, so I apologize for rambling on a bit. I hope I got my idea across clear enough, and look forward to your thoughts.
Thanks,
Mike -
RE: Triangulating points
aaaaahhhhhh ok.
that makes alot more sense now and explains the results I had been getting.Thanks Chris!
-
Triangulating points
Ok... I seem to be doing something wrong here
just as a test (of Cloudv6 and some other triangulation plugins) i created a .csv of 8 points that are the apex of a box. Cloudv6 loaded the points correctly, yet neither seemed to "work" properly.
Now it may be that i am not understanding the triangulation bit correctly,but I really dont know at this point.I would appreciate any and all help
thanks in advance,
Mike -
RE: Modelling by equation
lol wow, that is awesome,
yeah i was goign to try something like that with Kerky, though I might just have to give twilight a shot.
I've not had too much lick with rendering in the past. so I am sure i'll be back with plenty of questions(and on the twilight forum)I'll have to toy around with Cloud to see if i can get it to do the surfaces I want.
Tried to model a sinusoidal cam a few weeks ago, ended up having to join all the points by hand. lol was quite tedious to say the least.thanks again Pilou
-
RE: Modelling by equation
yeah i have that plug, lol used it a few times.
have not been successful at getting it to create faces very well. usually it gives up after only a few. and this is for a simple shape...lol. any suggestions on that?
I was hoping to avoid going by that route as it would take quite a doing to get a decent shape, but if that is the route, then that is the route...lol
thanks
-
Modelling by equation
Hello everyone!
Ok, here's the deal, I have an equation for a curve that i want to model within sketchup and I am wondering if this is possible, and if so, how would i go about doing it.
The background behind this, I am designing a solar concentrator that uses two mirrors and I was hoping to be able to model it and do a ray trace on them just to see how they worked.
any other suggestions would be helpful.
Thanks !
Mike
-
RE: Starting from a three view
@dcauldwell: lol well, as for how I've failed, its probably that I am a bit of a perfectionist when it comes to these things. More likely than not I am making it more complicated that i need to. It probably doesnt help that most of the images I find of 3-View are not of the best resolution.
I'm trying that wintopo program as we speak, I'll let you know how that goes.
oh, and thanks for the link to that thread massimo, I'll try and check those out as soon as i can.
-
RE: Starting from a three view
@massimo said:
@unknownuser said:
is there a way to convert a JPG to a vector drawing or something that could be manipulated within sketchup?
You can do that with Photoshop+Illustrator (or Coreldraw for example). Open the JPG file in PS and select a shape. Make a path of the selection then export the path as Illustrator file. Open it with Illustrator and export the file as DWG(DXF). Open SU and import the DWG(DXF) file.
Take a look at these two videos part 1 and part 2.Are there any other programs that you could recommend? as I do not have (and probably cannot get) either of those programs
Maybe I should try and better explain the problem I have been having. Getting the 3-view jpegs imported and set up hasn't been a problem, however trying to recreate the lines in the 3-view in sketchup so that i can manipulate them has been a problem. I do have the plugin that allows me to import cloud points (.csv files) and have successfully used that to create a few NACA Airfoils.
I've attached one of the 3-views i've been trying to build off of. however, all attempts I've made to trace over the drawing have failed miserably. So i decided to ask around and see if there was a way to convert this image into a vector file or a set of datapoints that i can then import into sketchup and directly manipulate without having to trace.
thanks again
Mike
-
RE: Starting from a three view
you mention using Ruby tools and plugins, can you be more specific?
I remember seeing once, Silvershadow's EyeCandy 1 (or 2, i cant remember) where when building the fuselage of the Blackhawk by what appeared to be extruding from the three view. I've been trying to reproduce that method, with little success. The model I had been working on was the BD-5J, a small, simple jet.
I also have a drawing of Tu-160 that i eventually want to do that also includes some cross sections at various areas.Not at this point I've not been trying to do any detail work, just trying to get the overall shapes correct.
I guess here would be another question, is there a way to convert a JPG to a vector drawing or something that could be manipulated within sketchup? ( the JPG or BMP would consist only of black lines ona white background)
thanks again
Mike -
Starting from a three view
Ok, so say I have a three view drawing (or any simple line drawing) of an aircraft (for example)
Are there any tips and tricks for doing this to get the best results?
As is, I've been trying to trace over the imported Jpegs, and that hasn't been going very well.any help would be appreciated,
thanks
Mike -
RE: Is there something I could be doing better?....
thanks guys, this has helped explain alot for me.
-
RE: Is there something I could be doing better?....
just to make sure i got this right...
when composing a section such as the fanblades in the cowling, it is better to make each blade a component, then make the collection of the blades and the hub a group?modelhead,
I was able to figure out which one was which, though I'm unsure as to why it would be half the size of the original. it still appears to have essentially the same amount of geometry.thanks for your patience guys, I do appreciate it