Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Modelling error - snub dodecahedron modeling
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Modelling error - snub dodecahedron modeling (Read 1428 times)
0 Members and 1 Guest are viewing this topic.
ribarm
Gator
Posts: 3265
Marko Ribar, architect
WWW
Modelling error - snub dodecahedron modeling
«
on:
June 30, 2015, 07:23:14 AM »
Here is situation... If you have 20+ minutes, please watch this video :
https://www.youtube.com/watch?v=hOO-y1R3HgU
It shows my geometric construction of pretty difficult POLYHEDRON called SNUB DODECAHEDRON... This construction is the most closest to exact precise solution and I don't know any better... (If you know please help me - it's not a task but only pleasure to make us more wise and smart...) ... Anyway, after watching this video, near its ending I tried both UNION command and SURFSCULPT command on bounding REGIONS but I failed to obtain unique 3DSOLID entity... As addition to this post, I'll attach this version of MODEL - constructed with shown geometry procedure to save you time and I'll post a code for scaling regions by their centroid points - I thought this will make model watertight, but I was wrong... So my question : Is after all possible to construct this MODEL as 3DSOLID entity using this geometry concept? If you know any better solution for constructing starting rotation angle of first edge adjacent triangle pyramid, but without math result (knowing ratio of Radius of sphere of snub dodecahedron and one its edge - you can google this), please give us that info...
Here is the code and attachment DWG :
Code - Auto/Visual Lisp:
[Select]
(
defun
c:scaleregsbycentroids
(
/
*error*
*
adoc
*
v
^
v unit ucs ucsf ss scf i reg n x y p ce
)
(
vl-load-com
)
(
defun
*error*
(
msg
)
(
while
(
not
(
eq
(
getvar
'worlducs
)
1
)
)
(
command
"_.UCS"
"_P"
)
)
(
if
ucsf
(
command
"_.UCS"
"_P"
)
)
(
vla-endundomark
*
adoc
*
)
(
if
msg
(
prompt
msg
)
)
(
princ
)
)
(
defun
v
^
v
(
u v
)
(
mapcar
'
(
lambda
(
s1 s2 a b
)
(
+
(
(
eval
s1
)
(
*
(
nth
a u
)
(
nth
b v
)
)
)
(
(
eval
s2
)
(
*
(
nth
a v
)
(
nth
b u
)
)
)
)
)
'
(
+
-
+
)
'
(
-
+
-
)
'
(
1
0
0
)
'
(
2
2
1
)
)
)
(
defun
unit
(
v
)
(
mapcar
'
(
lambda
(
x
)
(
/
x
(
distance
'
(
0.0
0.0
0.0
)
v
)
)
)
v
)
)
(
setq
*
adoc
*
(
vla-get-activedocument
(
vlax-get-acad-object
)
)
)
(
vla-startundomark
*
adoc
*
)
(
if
(
eq
(
getvar
'worlducs
)
0
)
(
progn
(
command
"_.UCS"
"_W"
)
(
setq
ucsf t
)
)
)
(
prompt
"
\n
Select regions for scale by their cetroids"
)
(
setq
ss
(
ssget
"_:L"
'
(
(
0
.
"REGION"
)
)
)
)
(
initget
6
)
(
setq
scf
(
getdist
"
\n
Pick or specify scale factor <1.1> : "
)
)
(
if
(
null
scf
)
(
setq
scf
1.1
)
)
(
if
ss
(
repeat
(
setq
i
(
sslength
ss
)
)
(
setq
reg
(
ssname
ss
(
setq
i
(
1-
i
)
)
)
)
(
setq
n
(
vlax
-
safearray
->
list
(
vlax
-
variant-value
(
vla-get-normal
(
vlax
-
ename
->
vla-object
reg
)
)
)
)
)
(
if
(
equal
(
v
^
v n '
(
0.0
0.0
1.0
)
)
'
(
0.0
0.0
0.0
)
1e
-
6
)
(
setq
x '
(
1.0
0.0
0.0
)
y '
(
0.0
1.0
0.0
)
)
(
setq
x
(
unit
(
v
^
v n '
(
0.0
0.0
1.0
)
)
)
y
(
unit
(
v
^
v n x
)
)
)
)
(
command
"_.explode"
reg
)
(
while
(
>
(
getvar
'cmdactive
)
0
)
(
command
""
)
)
(
setq
p
(
vlax-curve-getstartpoint
(
entlast
)
)
)
(
command
"_.undo"
)
(
while
(
>
(
getvar
'cmdactive
)
0
)
(
command
""
)
)
(
setq
ucs
(
vla-add
(
vla-get-usercoordinatesystems
*
adoc
*
)
(
vlax-3d-point
p
)
(
vlax-3d-point
(
mapcar
'
+
p x
)
)
(
vlax-3d-point
(
mapcar
'
+
p y
)
)
"{ UCS }"
)
)
(
vla-put-activeucs
*
adoc
*
ucs
)
(
command
"_.UCS"
"_D"
"{ UCS }"
)
(
vlax-release-object
ucs
)
(
setq
ce
(
trans
(
vlax
-
safearray
->
list
(
vlax
-
variant-value
(
vla-get-centroid
(
vlax
-
ename
->
vla-object
reg
)
)
)
)
1
0
)
)
(
while
(
not
(
eq
(
getvar
'worlducs
)
1
)
)
(
command
"_.UCS"
"_P"
)
)
(
command
"_.SCALE"
reg
""
"_non"
ce scf
)
(
while
(
>
(
getvar
'cmdactive
)
0
)
(
command
""
)
)
)
)
(
*error*
nil
)
)
(
defun
c:scregs
-
cent
nil
(
c:scaleregsbycentroids
)
)
Thanks for reading and watching video, M.R.
«
Last Edit: July 30, 2015, 01:40:37 PM by ribarm
»
Logged
Marko Ribar, d.i.a.
(graduated engineer of architecture)
M.R. on Youtube
ribarm
Gator
Posts: 3265
Marko Ribar, architect
WWW
Re: Modelling error - snub dodecahedron modeling
«
Reply #1 on:
July 02, 2015, 01:44:34 AM »
To obtain real 3DSOLID entity, you'll have to be even more precise... So you'll have to scale RED CIRCLE by factor : 0.999966385 (it's easy to remember at least for me...)
M.R.
Logged
Marko Ribar, d.i.a.
(graduated engineer of architecture)
M.R. on Youtube
ribarm
Gator
Posts: 3265
Marko Ribar, architect
WWW
Re: Modelling error - snub dodecahedron modeling
«
Reply #2 on:
July 03, 2015, 01:36:49 PM »
The same issue with SNUB CUBOCTAHEDRON...
VIDEO :
https://youtu.be/Hw-zp-80lkw
To obtain real 3DSOLID entity, you'll have to be even more precise... So you'll have to scale RED CIRCLE by factor : 1.000180852
M.R.
Logged
Marko Ribar, d.i.a.
(graduated engineer of architecture)
M.R. on Youtube
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Modelling error - snub dodecahedron modeling