Jump to content

arranging & moving quandary


Recommended Posts

hi there folks,

first of all, i must proclaim that it's been a pleasure to lurk these forums the past few months. i've learned loads of excellent tricks and good solutions while eating breakfast at my desk or taking a break from rhino. i did some quick searches of the forums for the answer to my current problem, but i couldn't find anything. i'm sure someone in the past has dealt with this issue before, however.

without going into too much detail, i'm building a model of a boat my colleague designed using rhino. i have access to a laser cutter and thin (2, 3, and 5mm) sheets of nice, high-density foam, so the best solution is to use the contour command in rhino to extract sections of the boat at regular intervals. you can see the results in the autocad dwg i exported.

the next step is to prepare those contours for the laser cutter. (i'm going to make the model out of whole, solid sections of the boat, ignoring the space between deck and hull found in a real fiberglass boat. much easier to build the model that way.) the idea is to cut each piece out along the outline, but to also include the silhouette of the NEXT section as a light guide line. in other words, each piece will have printed on it the outline of the next piece of the model.

this is easy to do with several contours:

 

1. along the X or Y axis, separate them all by a common distance (like 1 meter).

2. copy the whole lot over that common distance (while changing the second set's layer for clarity). now there is a primary piece with a secondary overlay.

3. last, arrange the pieces, each now consisting of a full cut outline and a light guideline of the next piece of the puzzle, onto sheets to be sent to the laser cutter.

 

and i'd do just that in this case... except i have over 200 contours to deal with. i tried to do it manual-labor style, by moving each contour 1 meter, 2 meters, 3 meters, and so on until they were all separated, but i got through about 20 when my wrist shut down completely. there has to be a better way to get this process automated.

i'm not new to autocad, but i am new to LISPs. it seems like the solution lies in incorporating some simple algebra into a LISP command which offsets objects found at a certain height a certain distance related to that height. or better yet, it would select objects found in order along an axis (in this case from z=0 to z=infinity), then offset them in X or Y a certain distance based on selection order.

has anyone else encountered anything like this before? i do this kind of laser cutting work somewhat often, but never with so many inputs, so i've always bit the bullet and arranged everything by hand, keying in distances and pretending i'm a robot. this time, i would really like to avoid that!

all suggestions are welcome. let me know if you need any more information or the original rhino file. i tried to be as thorough as possible without being too boring!

thanks,

 

bngm

 

p.s. the obligatory: i use autocad 2006 and rhinoceros 4.0.

p.p.s. try to download the original contours file here. it was too big to upload:

 

http://rapidshare.de/files/38390818/bngm-01freshboatcontours.dwg.html

bngm-02processexample.dwg

Link to comment
Share on other sites

That does look like a handful. Automating that task would certainly be the way to go.

 

Any of the Autocad API's (Lisp, VBA, .NET, ARX) offer up the appropriate capabilities. Lisp seems to have the best resourses available for those looking to learn.

 

Given that you use both Rhino and Autocad, however, I'd suggest one of the .Net flavors (VB.Net, C#.Net) or, for a more immediate needs Autocad VBA and/or its close cousin Rhinoscript (vbscript).

 

The .Net languages look to give the best return as a long term investment.

 

If you do decide on VBA in Autocad or Rhinoscript/C# in Rhino, I can offer some assistance.

Link to comment
Share on other sites

sean, you are incredibly helpful. a thousand, no, a million thanks.

i'm just a gnat's eyelash from getting this task completed, however. i'm stuck with the VBScript runtime error after i key in the offset distance and it gets to the Xform translation function.

from an afternoon of reading, asking around, and a little experimenting, it seems as if it might be due to a problem connecting to rhinoscript, as illustrated on mcneel's wiki: http://en.wiki.mcneel.com/default.aspx/McNeel/Rhino4Automation.html

but i just don't know. i've blundered around trying to insert and modify the win32 sleep command into the original contour layout script, but to no avail - i don't know vb or rhinoscript well enough to tell.

runtiumeerror.JPG

Link to comment
Share on other sites

That's interesting. The message makes me think that you may not have the latest Rhinoscript Plugin. If you are using Rhino 4 with SR2 you can check the version of RhinoScript by Tools - Options - Rhino Options - Plugins. Under Rhinoscript properties, you should see the date I have underlined.

 

If that is indeed the issue, you will probably have to update before the script will run.

Plugin.jpg

Properties.jpg

Help.jpg

Link to comment
Share on other sites

sean,

i'm going to talk to my system admin at work today to see about getting the new service pack. you're right, that's probably the problem. i tried to run the latest rhinoscript version, but it only works with sp2.

in related news, you've singlehandedly saved my wrist from aggravated carpal tunnel syndrome with that script (and supremely helpful file upload - exactly what i was trying to do, complete with the offsets!!!).

thank you very, very much.

Link to comment
Share on other sites

  • 2 weeks later...

photo of the completed model coming soon. it turned out pretty nice, but i didn't account for the laser burning out as much of the material as it did, so the edges were slightly annihilated before i started building. next time, i'll tweak the model to get thicker edges, then use this incredibly handy script for the necessary offsets.

thanks again, sean.

Link to comment
Share on other sites

  • 1 year later...

Hi. I've downloaded and ran your script but seem to not get the desired results - organizing "stacked" contour lines from a 3d model to a "spread" for 2d printing (laser cutter). I've looked at the example file of the boat hull and that layout that is what I expected the script to produce. Instead, it seems to move the existing contour lines to a new "laser-GUIDE" layer (red in attached image) and copies a set of the contour lines (still stacked) in the x-direction to a new "laser-FULLCUT" layer (blue).

 

The only user input it asks are "Select appropriate Contours" followed by "Spacing between each contour". After the spacing is inputed the script runs and ends with the condition described above. Also, the value of the spacing it asks for always results (in my instance) in a 1-1/4" distance between the two sets of contours.

 

I hope you are able to provide some guidance as this script has great potential to be very useful. Thanks in advance.

Picture 2.jpg

Picture 1.jpg

Link to comment
Share on other sites

The script above was written to the specific condition presented by the Original Poster. I probably should have allowed for more flexibility. :geek:

 

Sometime in the future I might readdress this process as a C# Plugin. Until then, however, the script should run well enough if you set it up as shown, i.e., with the “stack direction” aligned towards the World Z axis. The contours should spread out in the X direction.

 

As it sounds like you’ve already determined, the “Spacing between each contour” prompt is looking for the 2.5 (or whatever you are using) dimension.

Prelim.jpg

LaidOut.jpg

Link to comment
Share on other sites

Thanks for responding so promptly and thoroughly.

 

I am getting the results I want with the contours stacked in the World Z. I'm curious, how were you able to generate my model from the images I attached? Also, is the purpose of having a "FULL CUT" layer and "GUIDE" layer connected to the Original Poster's problem? There are some contours that only make it to one or the other layer. It's a non-issue with some minor rearrangements.

 

Again, many thanks and I hope you'll be able and willing to answer any future questions I have about digital drawing.

Link to comment
Share on other sites

Thanks for responding so promptly and thoroughly.

 

I am getting the results I want with the contours stacked in the World Z. I'm curious, how were you able to generate my model from the images I attached? Also, is the purpose of having a "FULL CUT" layer and "GUIDE" layer connected to the Original Poster's problem? There are some contours that only make it to one or the other layer. It's a non-issue with some minor rearrangements.

 

Again, many thanks and I hope you'll be able and willing to answer any future questions I have about digital drawing.

 

The routine has features that were specific to the Original Posters requirements. Essentially, each “contour” is dropped to the World CPlane and placed on the “Full Cut” layer. A copy of the geometry is also aligned on top of the next contour and assigned to the “Guide” layer. If that's not happening for you then there may be a bug in the routine.

 

That second step was for laser cutting where this Guide layer geometry would be used to make a “shadow” mark on the actual cut piece – to aid assembly. That project had all the pieces glued face to face.

 

From the look of your original geometry (Which I just traced and lofted, by the way), you may not need the guides.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...