Need help decipher existing unfolding script

Need help decipher existing unfolding script

vanowm
Contributor Contributor
1,116 Views
10 Replies
Message 1 of 11

Need help decipher existing unfolding script

vanowm
Contributor
Contributor

Hello.

 

Our small business just lost to cancer a very valuable member. He was the only one who did the drawings in AutoCAD R13 (DOS) and unfortunately he got ill so sudden and quick that he didn't have time to pass on his knowlege.
Now I'm trying resurrect what he left, by learning AutoCAD.

 

The brick wall I got here is that I can't figure out how he was using unfolding script that he wrote himself 20-25 years ago in LISP.


That script was a part of entire menu for R13, but I believe I managed to isolate it into a separate menu item for R14 (when first time tried load ruleflat.mnu file Acad crashed, however it created ruleflat.mnc, ruleflat.mnr and ruleflat.mns. These menu files can be loaded without crash and seem to work fine. (see attachment)

 

I've never seen how he was using this script(s), and can't really tell if these are the scripts he used, however they were the only two custom files I could find in his R13\SUPPORT\ folder

 

If someone could help me decipher this and possibly explain how to use it, it would really help us.

 

I've attached the menu files, template with predefined layers and an example from his last work.

 

Thank you!

0 Likes
Accepted solutions (2)
1,117 Views
10 Replies
Replies (10)
Message 2 of 11

dmfrazier
Advisor
Advisor

It seems to me that all you really need/want from these menu files are the various LISP functions that are defined within them.

 

What version of AutoCAD are you (or will you be) using?  (Note: If it's R13 or R14 for DOS [!!!], I'm afraid you are going to wait a long time for help here, and you will have similar difficulty elsewhere, because the "technology" of AutoCAD's interface elements - not to mention the operating system - has changed dramatically.  Whereas if you can somehow upgrade to a more recent version - like 2007 or newer - that will greatly improve your odds.)

0 Likes
Message 3 of 11

jggerth
Advisor
Advisor

Unfortunately, upgrading and staying with AutoCAD means upgrading to the 2016 release at full cost.  As AcadLT doesn't let you run LISP, that's not an option for your situation.  You'll have to decide if spending the $4k and then trying to resurrect the LISP code to work with the current version is feasible.  If it is, you may want to consider hring a LISP programmer or AutoCAD  consultant/trainer to update the coade and get you up to speed on the software.  It's not exactly a trivial enough application to just stumble through productivley.

 

There are alternatives that wil run  LISP; Bricsys, the various IntelliCAD packages, Arec Commander, etc.  Generally they cost less than LT, are more capable, but are unlikely to handle the most advanced capabilities and features of the full AutoCAD package.

 

0 Likes
Message 4 of 11

pendean
Community Legend
Community Legend
Friend, you need to hire an experience CAD user in your town/city that understands LISP to guide you folks to being able to understand and use these tools and their setup in your office. That person can then work out how to transition others to use these tools. You all sure waited a little too long to think about this problem.

This is a situation where you trying to do it on your own through remote online assistance is NOT the best approach.

Contact a reseller in your region and inquire if they have that capacity, or inquire about local AUGI user groups in your region and reach out to them about hiring someone for this task.
0 Likes
Message 5 of 11

vanowm
Contributor
Contributor
Accepted solution

This is was a good insensitive to learn LISP. From there I've learned that the script was very inefficient:

First you had to create ruled mesh, then explode it, then select each 3D Face manually one by one which then would get traced with lines, dividing it into 4 triangles. Then it would get lenghts and angles between these lines and draw them somewhere at 0,0,0 coordinates.

 

Although I couldn't make it work in other Autocad then DOS R13, from what I've learned from the code, the amount of manual work involved using this script was almost the same as when manually aligning traced lines

 

For now I'm satisfied with my more automated version that only requires manually create ruled surfaces, the rest it does automatically

Latest v1.0 is even faster and has some options.

Will publish source code when have more free time.

Message 6 of 11

dmfrazier
Advisor
Advisor

Good for you.

 

"...learning ridiculous LISP language..."

 

Ridiculous, huh?

Message 7 of 11

vanowm
Contributor
Contributor
Accepted solution

Here is my unroll 3D Rulled Surface to 2D (poly)lines in case someone interested.

 

A few things you must know:

 

- only Rulled Surfaces (rulled mesh? command: rulesurf) are supported

- the script assumes surfaces were created from top-left to bottom-left, so the result can be up-side-down and/or inside-out, but it has ability add reference points which should help identify which side you are looking at after unfold.

 

Message 8 of 11

Anonymous
Not applicable

Vanowm,

            I have been trying to get your unrollrulesurf_v1.0.lsp to work in ACAD 2016 with no success. What version did you write this for and Have you updated it?

 

Josh

 

0 Likes
Message 9 of 11

cadffm
Consultant
Consultant

It works in 2013 also in 2019, have you try it with the sample file above(example.dwg from the unfold.zip)

and you select the polygonmesh?

 

"with no success"

Can you explain what the problem is, more in detail?

Sebastian

Message 10 of 11

Anonymous
Not applicable

I had not tried the sample file (I missed that earlier). The LSP routine does work fine with the sample file.The problem I was having is that RULESURF creates a MESH and the LSP routine is looking for a polyline (POLYGON MESH). I now need to figure out how to create the POLYGON MESH (3DMESH?).

 

setting MESHTYPE to 0 forces rulesurf to create LEGACY Polygon Mesh.

 

Thank you for the quick response,

 

Josh

 

0 Likes
Message 11 of 11

vanowm
Contributor
Contributor

The problem with polygon mesh is each segment can be joined on 3 sides with other other segments therefore it can't be unfolded as continues flat object (i.e. can't make a sphere flat without breaking it into separate segments)

Rulesurf mesh however is just rectangles, that joined together on 2 sides.

0 Likes