Author Topic: encrypted lisp routine  (Read 6826 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« on: January 05, 2005, 06:42:19 PM »
this lisp routine was given to me by my old co-worker. however i would like to look at the code but apparently i cant because it seems to be encrypted. please check my lily pond for the file Break.lsp

CADaver

  • Guest
encrypted lisp routine
« Reply #1 on: January 05, 2005, 07:08:29 PM »
Code is usually encrypted for a reason, so I am loathe to "break" someone's attempt at security. Sorry.

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #2 on: January 05, 2005, 07:41:13 PM »
well, i had permission to have this lisp routine. its simply just a routine to draw a break symbol. however when i load the routine i receive this error.

Quote
error: bad character read (octal): 0

CADaver

  • Guest
encrypted lisp routine
« Reply #3 on: January 05, 2005, 07:52:43 PM »
Permission to use a specific code is different than permission to break encryption.  Contact the original owner of the code.

Express tools has a breakline function.

BTW, an octal error indicates to me some sort of font or shape error.  Do you have all the proper compiled shape files in the proper paths?

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #4 on: January 05, 2005, 08:27:59 PM »
OK...thanks for clarifying that for me. i know that i had probably reached the line between copyright and free. but I am too aware of encrypted lisp routines. i dont know what other file could be related to this routine. its basically a line that looks like a widget's tail., if you know what i mean. anyhow its not my common practice to break codes i'd rather create my own. im pretty sure if someone finds out then i have a good explanation. may this be a lesson to all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
encrypted lisp routine
« Reply #5 on: January 05, 2005, 08:37:40 PM »
This one may not work like the one you have.
But you can modify it.

Code: [Select]
;;;===========================================
;;;      Single Line Break Symbol Creator    
;;;===========================================
;;;
;|     Created by C. Alan Butler  2003

     Yet another Break symbol creator
     Uses PloyLine created on the current layer
     Ortho Mode is up to you to pre set or not
     Symbol is proportional to the length
     and doesn't break anything
|;
 ;
(defun c:brk (/ p1 p2 p3 p4 p5 p6 dist ang usercmd)
 ;
 ; error function & Routine Exit
  (defun *error* (msg)
    (if
      (not
        (member
          msg
          '("console break" "Function cancelled" "quit / exit abort" "")
        )
      )
       (princ (strcat "\nError: " msg))
    ) ; if
    (setvar "CMDECHO" usercmd)
    (setvar "osmode" useros)
    (princ)
  ) ;
 ;end error function
  (setq oldcmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setq useros (getvar "osmode"))

  (setq usercmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setvar "plinewid" 0)
  (if (and (setq p1 (getpoint "Starting point of line : "))
           (setq p6 (getpoint p1 "\nSelect second point: "))
      )
    (progn
      (setq dist (distance p1 p6)
            ang  (angle p1 p6)
            p2   (polar p1 ang (* 0.4167 dist))
            p5   (polar p1 ang (* 0.5833 dist))
            p3   (polar p2 (+ 1.25664 ang) (* 0.1667 dist))
            p4   (polar p5 (+ 4.39824 ang) (* 0.1667 dist))
      ) ;_ end of setq
      (setvar "osmode" 0)
      (command "pline" p1 p2 p3 p4 p5 p6 "") ; Draw the Z-Line
    )
  )
  (*error* "")
  (princ)
)
(prompt
  "\nBreak Symbol Creator loaded.  Type BRK to run it."
)
(princ)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CADaver

  • Guest
encrypted lisp routine
« Reply #6 on: January 05, 2005, 09:05:29 PM »
I should have known that Cab would have a breakline function.  I'd be surprised if he didn't have one to draw paychecks.  :wink:

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
encrypted lisp routine
« Reply #7 on: January 05, 2005, 10:18:38 PM »
CADaver, that'd be my job ... I must say that I am very good at it too.....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CADaver

  • Guest
encrypted lisp routine
« Reply #8 on: January 06, 2005, 07:08:53 AM »
snort  :lol:

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
encrypted lisp routine
« Reply #9 on: January 06, 2005, 08:02:16 AM »
Print me up a few next time your printing. :D
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #10 on: January 06, 2005, 11:47:51 AM »
thanks alot fellaz...this routine looks like newer code than the one i have..i think the code is faily old it was made in 1996.

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #11 on: January 06, 2005, 12:03:50 PM »
sweet  8)  this routine is a beauty thanks

CADaver

  • Guest
encrypted lisp routine
« Reply #12 on: January 06, 2005, 12:06:51 PM »
CAB's the man. :roll:  :wink:

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
encrypted lisp routine
« Reply #13 on: January 06, 2005, 12:24:35 PM »
Thanks folks.
I was able to run the other lisp, command BR.
It is different in that a layer is created, the Z shape is different
and the end points of the break line are extended past the actual pick points.
There are times when the extensions beyond the pick points are useful.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #14 on: January 06, 2005, 02:16:58 PM »
the best thing about the other lisp command "BRK" is that no matter the size of what is to be broken, the break line changes its size per the distance of the break distance. however, my routin "BR" inteferes with the autocad "break" command and its also dependent on the dimscale. having it dependent on the  dimscale can be useful but there are times when the break symbol is larger than the distance to to break. did i confuse ya?

pmvliet

  • Guest
encrypted lisp routine
« Reply #15 on: January 06, 2005, 04:57:29 PM »
Cab,

Any thoughts on making extensions on your break routine so that it did go beyond? Other then that, and not that is a bad thing but a great tool that is easy to use.

Pieter

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
encrypted lisp routine
« Reply #16 on: January 06, 2005, 06:58:48 PM »
Here is another version.
Code: [Select]
;;;===========================================
;;;      Single Line Break Symbol Creator    
;;;===========================================
;;;
;|     Created by C. Alan Butler  2003
     Yet another Break symbol creator
     Uses PloyLine created on the current layer
     Ortho Mode is up to you to pre set or not
     Symbol is proportional to the length
     and doesn't break anything
       [ Modified 01/06/2004 ]
     extends the break line out from the two picks
|;
 ;
(defun c:brk (/ p1 p2 p3 p4 p5 p6 dist ang usercmd)
 ;
 ; error function & Routine Exit
  (defun *error* (msg)
    (if
      (not
        (member
          msg
          '("console break" "Function cancelled" "quit / exit abort" "")
        )
      )
       (princ (strcat "\nError: " msg))
    ) ; if
    (setvar "CMDECHO" usercmd)
    (setvar "osmode" useros)
    (princ)
  ) ;
 ;end error function
  (setq oldcmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setq useros (getvar "osmode"))

  (setq usercmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setvar "plinewid" 0)
  (if (and (setq p1 (getpoint "Starting point of line : "))
           (setq p6 (getpoint p1 "\nSelect second point: "))
      )
    (progn
      (setq dist (distance p1 p6)
            ang  (angle p1 p6)
            p1 (polar p1 (- ang pi) (* 0.3 dist))
            p6 (polar p6 ang  (* 0.3 dist))
            dist (distance p1 p6)
       )
     (setq
            p2   (polar p1 ang (* 0.4167 dist))
            p5   (polar p1 ang (* 0.5833 dist))
            p3   (polar p2 (+ 1.25664 ang) (* 0.1667 dist))
            p4   (polar p5 (+ 4.39824 ang) (* 0.1667 dist))
      ) ;_ end of setq
      ;;  create extension points
      (setvar "osmode" 0)
      (command "pline" p1 p2 p3 p4 p5 p6 "") ; Draw the Z-Line
    )
  )
  (*error* "")
  (princ)
)
(prompt
  "\nBreak Symbol Creator loaded.  Type BRK to run it."
)
(princ)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Anonymous

  • Guest
encrypted lisp routine
« Reply #17 on: January 06, 2005, 07:07:26 PM »
Do you guys have a break routine for rectangular HVAC duct?


Thanks

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
encrypted lisp routine
« Reply #18 on: January 06, 2005, 07:45:03 PM »
Can you post a picture or drawing of what you are after.
Sorry I don't understand what you are asking for.
PS you will have to join before you can post pictures & drawings, it's painless :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #19 on: January 06, 2005, 08:19:51 PM »
cab....
that is beautiful....

pmvliet

  • Guest
encrypted lisp routine
« Reply #20 on: January 13, 2005, 12:15:45 PM »
Awesome :o)

Crank

  • Water Moccasin
  • Posts: 1503
encrypted lisp routine
« Reply #21 on: January 13, 2005, 01:51:36 PM »
Quote from: dubb
...but there are times when the break symbol is larger than the distance to to break. did i confuse ya?


Let's throw one of my first functions in :) :
Code: [Select]

; BRL.lsp
; Copyright ©1994 J.J.Damstra
; Modified for TheSwamp.org 13-01-2005

(defun c:brl (/ a a1 a2 af1 af2 hoek entp entq entv ep le p1 p2 p3 p4 p5 p6 sp)
(setq sp (getpoint "\nPoint 1:") ep (trans (getpoint sp "\nPoint 2:") 1 0) sp (trans sp 1 0))
(setq le (distance sp ep) hoek (angle sp ep))
(setq a1 (+ 1 (fix (/ le (* 25 (getvar "DIMSCALE"))))) a (/ le a1) a2 (/ a 2.0))
(setq af1 (* 1 (getvar "DIMSCALE")) af2 (* 1.5 (getvar "DIMSCALE")))

(setq entp (list (cons 0 "polyline")))
(setq entv (cons 0 "vertex"))
(setq entq (list (cons 0 "seqend")))
(entmake entp)
(setq p1 (cons 10 sp))
(entmake (list entv p1))
(repeat a1
(setq p2 (cons 10 (polar (cdr p1) hoek a2))
p3 (cons 10 (polar (cdr p2) (+ hoek pi) af1))
p4 (cons 10 (polar (cdr p2) (+ hoek (* pi 0.6)) af2))
p5 (cons 10 (polar (cdr p2) (- hoek (* pi 0.4)) af2))
p6 (cons 10 (polar (cdr p2) hoek af1))
)
(entmake (list entv p3))
(entmake (list entv p4))
(entmake (list entv p5))
(entmake (list entv p6))
(setq p1 p2 a2 a)
)
(setq ep (cons 10 ep))
(entmake (list entv ep))
(entmake entq)

(princ)
)
Vault Professional 2023     +     AEC Collection

dubb

  • Swamp Rat
  • Posts: 1105
encrypted lisp routine
« Reply #22 on: January 17, 2005, 12:30:00 PM »
gr8 lisp routine....however, do i have to switch my dimscale to 1 for it to draw  the right sized breakline on a 3/4"=1'-0" drawing?

WARBIE

  • Guest
encrypted lisp routine
« Reply #23 on: February 15, 2005, 03:44:09 AM »
*edited* by Hendie

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
encrypted lisp routine
« Reply #24 on: February 15, 2005, 07:45:00 AM »
Here is a linetype that I use.

Break.zip
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016