Author Topic: 3D experts wanted  (Read 6563 times)

0 Members and 1 Guest are viewing this topic.

Zahex

  • Guest
3D experts wanted
« on: May 12, 2005, 07:23:47 PM »
I'm working on a 3D routine and need some help

Thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
3D experts wanted
« Reply #1 on: May 12, 2005, 07:31:56 PM »
Wow, really !!
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
3D experts wanted
« Reply #2 on: May 12, 2005, 07:32:30 PM »
sorry,    da debil made me do it
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Zahex

  • Guest
3D experts wanted
« Reply #3 on: May 12, 2005, 07:38:30 PM »
can you help???

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
3D experts wanted
« Reply #4 on: May 12, 2005, 07:39:25 PM »
with what ?? What's your difficulty ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Zahex

  • Guest
3D experts wanted
« Reply #5 on: May 12, 2005, 07:48:10 PM »
it's hard to explain but basicly i want to draw a spiral through a solid.
i have a routine that defines the solid,it asks for:
1.base radius
2.top radius
3.height
4.number of polygon sides
5.insertion point

and i have  a spiral routine also,that draws spirals.
but now i first want to draw the solid and then the spiral but according to the spiral,kinda like the spiral is revolving arround the solid.

Do u understand?
should i post the routines?

Thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
3D experts wanted
« Reply #6 on: May 12, 2005, 07:53:19 PM »
Posting would be most excellent.

I have a bit to do today, so may be able to look at it tonight, If no-one else raises their hand. Chances are you will have a response before I get to look at it.

Good luck

kwb
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Zahex

  • Guest
3D experts wanted
« Reply #7 on: May 12, 2005, 07:56:12 PM »
solid:

Code: [Select]

(defun c:1 ()
  (defun Radians->Degrees (rads)
  (* rads (/ 180.0 pi))
)
  (setq radius (getdist "\n top radius: "))
  (setq baseradius (getdist "\n base radius: "))
  (setq height (getdist "\n height: "))
  (setq angRad (atan (- radius baseradius) height))
  (setq angDeg (Radians->Degrees angRad))
  (setq sides (getint "\n number of polygon sides: "))
  (setq centerpt (getpoint "\n insertion point: "))
  (setq osnaps (getvar "osmode"))
  (setvar "osmode" 0)
  (command "polygon"
  sides
  centerpt
  "C"
  (polar centerpt 0 radius)
  )
  (command "extrude" (entlast) "" height angDeg)
  (setvar "osmode" osnaps)
)




spiral:

Code: [Select]



(defun C:2()
(setq
segs (getreal "Number of segments: ")
spin -1
ri (getreal "Base radius: ")
rf (getreal "Top radius: ")
rt (getreal "Extrusion radius: "));setq   ;for the extrusion path
(setq h (getreal "Elevation: "))
(setq ns (getint "Number of spirals: "))
(setq
tu (getreal "Turns: ")
old (getvar "osmode")
fi1 (/ (* 2 PI) segs)
i 0
points (fix (* tu segs))
h1 (/ h points)
r1 (/ (- rf ri) points)
s (getpoint "Center of base: ")
end (list (car s) (cadr s) (+ h (caddr s))));setq
(setvar "osmode" 0 )
(command "line" s end "")
(command "chprop" "l" "" "c" 1 "")
(command "3dpoly")
(setq i 0)
(repeat (1+ points)
(setq
fi (* i fi1)
h (* i h1)
r (+ ri (* i r1))
x (* r (cos fi))
y (* spin r (sin fi)));setq
(command (list (+ (car s) x) (+ (cadr s) y) (+ (caddr s) h)))
(setq i (1+ i)));repeat
(command "")
(setvar "osmode" old)
(setq spiral (entlast))
(command "ucs" "n" "za" (polar s 0 ri)
(list
(+(car s) (* ri (cos fi1)))
(+(cadr s) (* spin ri (sin fi1)))h1))


;(command "circle" "0,0,0" rt)
;(command "extrude" (entlast) "" "p" spiral) ;for the extrusion path
(setvar "osmode" old)
(command "ucs" "p")


(command "array" (entlast) "" "p" s ns 360 "y")
(command "view" "swiso")
(command "_zoom" "e")
(command "shademode" "g")
); defun



even so,it would be great if you could help.

Thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
3D experts wanted
« Reply #8 on: May 12, 2005, 08:26:03 PM »
You may have to explain a little better what you are trying to do.  

The prompts don't mean a lot to me.
Quote

One-element array, nothing to do.
; error: Function cancelled
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
3D experts wanted
« Reply #9 on: May 12, 2005, 08:29:25 PM »
This is what I get :

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
3D experts wanted
« Reply #10 on: May 12, 2005, 10:36:34 PM »
Kerry,
Check this out, i combined the lisp but have no idea about the 3d stuff.
http://www.theswamp.org/phpBB2/viewtopic.php?p=62392#62392

this is what it produces:
Code: [Select]
Command: zahex
._undo Enter the number of operations to undo or
[Auto/Control/BEgin/End/Mark/Back] <1>: _begin
Command:
 larger radius: 120

 smaller radius: 60

 height: 200

 number of polygon sides: 6

 insertion point: Number of spirals: 4
Extrusion radius: 25
Turns: 6


._undo Enter the number of operations to undo or
[Auto/Control/BEgin/End/Mark/Back] <1>: _end

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.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
3D experts wanted
« Reply #11 on: May 12, 2005, 11:03:20 PM »
mmmm, jello.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
3D experts wanted
« Reply #12 on: May 12, 2005, 11:22:27 PM »
:shock:  :)  :)
It's past your bed time young man. 8)
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.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
3D experts wanted
« Reply #13 on: May 12, 2005, 11:38:04 PM »
But DaaAD!
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Zahex

  • Guest
Hey CAB
« Reply #14 on: May 14, 2005, 06:08:11 PM »
Hey CAB are you in here??

i've one question about the code you posted...

Thanks