anyone care to write a lisp?

I do a lot of sheetmetal layout & have to rotate my UCS to align with each piece of a multi sided transition..
what I am thinking is a one step block command that prompts for 3 point ucs
, then prompts for object to make block then switches to world or view UCS & prompts for insertion point. I know lots of you guys could write this in less than hour & it would take me a week since I know very little about LISP programming... any takers? TIA
Rob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I'm not being snotty here, but that also makes it a great beginners' project. Why not give it a (long)shot? ; D I'm sure you'll get help when stuck, and you'll have a new skill....

ucs
UCS
in
LISP
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Doesn't sound rough at all.
Send me a better description of EXACTLY what you're needing and I'll get something to you. From what I'm gathering from your post, it almost sounds like you don't need much more than the 'object' option of the UCS command (which makes me think I'm not properly interpreting your request.)

ucs
UCS
in
LISP
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
the most common example is a twisted fitting.. .take 2 square flanges for example around 2 foot square looking at them flat in world ucs , move one up (on z axis) a couple feet, rotate 45 degrees in xy plane, then rotate it 20 degrees on each x & y axis, now draw triangles with 3d face (these triangles should always go in the directions that doesn't choke the volume of the fitting <try it both ways & hide to see which is which>)to represent the sheet metal sides of this transition. (I draw only the inside face of the metal since it will be fit for corner welding, the outside or metal thickness is irrelevant.)
now to lay out all the pieces to be cut on a cnc laser... I use 3 point UCS align, then trace over the 3d face with a polyline & writeblock it to a junk file, I rotate around the fitting with my UCS aligning with each one from outside looking in & create 8 Blocks, then set my UCS to View or World & insert all these blocks flat into one view & DXF out to the laser to cut. I was actually thinking it would be nice if the WBlock box had UCS alignment options it would cut that work in half,,, but if anyone has any other ideas, I'd like to hear em... If my description is hard to follow I'd gladly post a dwf or dwg or email it if desired...
still sound easy? how about a lisp that would take the whole fitting & produce all the cut files with one click???
ideas?
TIA Rob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
<SNIPPED>

Certainly. Email a couple of samples.

I wouldn't go that far, but it doesn't terribly difficult, either. As long as you're not in a super hurry and promise to tell me if you find something else, I'll give it a try. No promises.............of course, what do you expect for free? ;)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
for general unfoldings you should try out my www.black-cad. It will sove your "twisted problem" too ... regards Jochen

ucs
UCS
in
LISP
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
What was that link supposed to be?

each
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi

Architects still today think that the most advanced feature about programs like AutoCAD, is the option of having a surface unfolded , to produce the building as a primitive mesh entity , as done 20 years ago. Bad acturly, as the idea of unfolding is up against some very conservative engineers idears .that is about that the only geometrie you must use being a designer using CAD, is "known geometrics" ; ----- this acturly is a 2D way of thinking.
So when you get this link as reply, it is becaurse a lot of profesional think, that surface is what the thing is about.
Now I builded lots of boats with my own software, doing unfolded panels from single curved surfaces represented as mesh entity, and that acturly work even projecting nice tradisional wooden boats , on the screen with a lot of Lisp applications ----------- but with my experience I know, that surface is the least thing about it ; acturly the structure is much more important, the structure or framework to place the panels with. Beside ,try being a bit critic about buildings produced from mesh entity ; where are the core structure, the floors and walls ? Is the best and most progressive realy an emty metal tophat, where you need to build another house within, just to get the floors and walls ?
Surfaces is acturly easy unfolded with a bit Lisp, and AutoCAD offer direct access to the drawing database , ------ that's from my point of view much better, than a script like way of placing UCS's , as doing it by calculating can "unfold" a surface with thoousands of faces in one go. Like what you se done with the paneling for these boats ; http://groups.yahoo.com/group/Cyber-Boat /
But if structure is the issue, if you want . If you don't want just an emty mesh entity but the floors and walls in an assembly structure, please check this ;
http://home20.inet.tele.dk/h-3d /
Or this ; http://home20.inet.tele.dk/h-3d/villa-3dh.htm
P.C.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I have surfed your site & found nothing useful, however I appreciate your good intentions.
Rob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
anyone else wants to see the type of transition I am talking about, post your email & I'll send the r2000i file
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I would like to see it.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi longshot, please send me the file too. Regards Jochen
scj.schulz(at)t-online.de

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
(jochen) wrote:

That link gives the following message:
Cannot find server or DNS Error
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
If this gets scrambled you can email me for a copy.
;; *********************************************************************** ;; * RUCS.lsp written by Chip Harper 06-17-03 * ;; * * ;; * Email: snipped-for-privacy@hotmail.com * ;; * Homepage: * ;; * * ;; * Program to rotate ucs, set to plan and maintain zoomed area * ;; * * ;; * * ;; * * ;; * This lisp is FREEWARE, you may distribute, copy, edit and/or modify * ;; * this program as you see fit. * ;; * * ;; *********************************************************************** ;; ;; ;; **************************************** ;; * == Error Handler == * ;; * * ;; **************************************** ;; ;; (defun ETRAP (msg) (if (or (= msg "Function cancelled") ; if user cancelled (= msg "quit / exit abort") ; if user aborted ) ; end or sequence (princ) ; exit quietly (princ (strcat "\nError: " msg)) ; otherwise report error message ) ; end if sequence ;; ;; **** Variable Resets **** ;; (setvar "cmddia" CCDI) ; Reset cmddia variable (setvar "cmdecho" CCME) ; Reset cmdecho variable (setvar "cecolor" CCOL) ; Reset color variable (setvar "dimscale" CDMS) ; Reset dimscale variable (setvar "filedia" CFDI) ; Reset fiedia variable (setvar "celtype" CLTY) ; Reset linetype variable (setvar "clayer" CLAY) ; Reset layer variable (setvar "orthomode" CORM) ; Reset ortho variable (setvar "osmode" COSM) ; Reset osnaps variable (setvar "snapang" CSAN) ; Reset snapang variable ;; ;; **** Screen Prompts **** ;; (prompt "\n") ; clear text line (princ (strcat CLFN " Terminated")) ; notify Operator (setq *error* PERROR) ; reset Previous Error Function (princ) ; nil supression ) ;; ;; ;; **************************************** ;; * == End Error Handler == * ;; * * ;; **************************************** ;; ;; ;; ;; **************************************** ;; * == Main Function == * ;; * * ;; **************************************** ;;
(defun c:RUCS ( / RCTR NRCTR RSIZE CLFN) ;; ;; **** Sets general conditions**** ;; (setq PERROR *error*) ; Get previous error (setq *error* ETRAP) ; Set error trap (setq CLFN "RUCS") ; Set Current Lisp Function name ;; (setq CCDI (getvar "cmddia")) ; Get cmddia setting (setq CCME (getvar "cmdecho")) ; Get cmdecho setting (setq CCOL (getvar "cecolor")) ; Get current color (setq CDMS (getvar "dimscale")) ; Get dimscale setting (setq CFDI (getvar "filedia")) ; Get filedia setting (setq CLTY (getvar "celtype")) ; Get current linetype (setq CLAY (getvar "clayer")) ; Get current layer (setq CORM (getvar "orthomode")) ; Get ortho setting (setq COSM (getvar "osmode")) ; Get osnap settings (setq CSAN (getvar "snapang")) ; Get snapang setting ;; (setvar "cmdecho" 0) ; Turn cmdecho off ;; ;; **** Change UCS, set to plan and zoom **** ;; (if (= RSTAT "1") (progn (setq RCTR (trans(getvar "viewctr") 1 0)) ; Get and transfer screen center (setq RSIZE (getvar "viewsize")) ; Get viewsize (Command "ucs" "world") ; Change UCS to object (Command "Plan" "current") ; Set to plan (setq NRCTR (trans RCTR 0 1)) ; Transfer screen center (command "zoom" "c" NRCTR RSIZE) ; Reset center zoom (setq RSTAT "0") ; Reset stat to world setting ) ; End progn "if" (progn (setq RCTR (trans(getvar "viewctr") 1 0)) ; Get and transfer screen center (setq RSIZE (getvar "viewsize")) ; Get viewsize (prompt "\nSelect Object to Align UCS") ; Prompt for object (Command "ucs" "new" "OB" PAUSE) ; Change UCS to object (Command "Plan" "current") ; Set to plan (setq NRCTR (trans RCTR 0 1)) ; Transfer screen center (command "zoom" "c" NRCTR RSIZE) ; Reset center zoom (setq RSTAT "1") ; Reset stat to object setting ) ; End progn "else" ) ; End if ;; ;; **** Reset conditons **** ;; (prompt "\n. ") ; Clear the command Line (prompt "\n. ") (princ) ;; (setvar "cmdecho" CCME) ; Reset cmdecho (setq *error* PERROR) ; Reset previous error (princ) ) ;; ;; **************************************** ;; * == Load Message == * ;; * * ;; **************************************** ;; (prompt "\n Template.lsp Loaded") (prompt "\n Written by Chip Harper") (prompt "\n ") ;; ;; **************************************** ;; * == End of File == * ;; * * ;; **************************************** ;;
--


Chip Harper
Member of the AutoDesk Discussion Forum Moderator Program
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
getting syntax error message when I try to run this
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I managed to get it to work , but it doesn't do anything close to what I was looking for. Thanks for the attempt.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.