We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Polyhedra

Andy Thomson
Advisor
I'm trying to assemble the sequence of basic polyhedra; tetrahedron, octahedron, hexahedron, icosahedron, dodecahedron.

There are plenty of objects for GDL, but I have been trying to re-script one for coordinates input from origins at the centre, starting with the tetrahedron:

!!Script 3D 

pen     1
material 24

L=l !Edge Length 
!r=l*cos(45)

ROTx xrot
ROTy yrot
ROTz zrot

!SPHERE l  ! Sphere For testing rotation center

L=l*sqr(2)/4 !Edge Length (edge l=2*sqr(2))
!r=l*cos(45) 

HOTSPOT 0,0,0		!#0 origin
HOTSPOT l,l,l		!#1A
HOTSPOT -l,-l,l		!#2B 
HOTSPOT -l,l,-l		!#3C 
HOTSPOT l,-l,-l		!#4D

VERT l,l,l			!#1A
VERT -l,-l,l		!#2B 
VERT -l,l,-l		!#3C 
VERT l,-l,-l		!#4D

EDGE 1, 2, -1,-1,0 !#1AB 
EDGE 2, 3, -1,-1,0 !#2BC 
EDGE 3, 1, -1,-1,0 !#3CA 
EDGE 1, 4, -1,-1,0 !#4AD 
EDGE 2, 4, -1,-1,0 !#5BD 
EDGE 3, 4, -1,-1,0 !#6CD 

PGON 3, 0, -1, 1,2,3	!#1ABC 
PGON 3, 0, -1, -3,6,-4	!#2ACD 
PGON 3, 0, -1, -5,-1,4	!#3DBA 
PGON 3, 0, -1, -6,-2,5	!#4DCB 

!PGON 3, 0 ,-1,1,2,3	!#1ABC 
!PGON 3, 0 ,-1,2,3,4	!#2BCD 
!PGON 3, 0 ,-1,4,3,1	!#3DCA 
!PGON 3, 0 ,-1,1,2,4	!#4ABD 

end
The problem I am having is that while the object displays correctly in all views, and projects properly in plan (edges and hotspots from 3D) with this:

PROJECT2{3} 3, 270, 2, 1+2+4+8+16+32 
The object vanishes in any marquee'd view. Why? I have tried isolating this issue (ie. my commented out PGON stuff), but nothing works. Any help would be appreciated. PS - when the test sphere is uncommented - it works in every view - not sure why. I don't want the sphere in the object for anything but testing.
Andy Thomson, M.Arch, OAA, MRAIC
Director
Thomson Architecture, Inc.
Instructor/Lecturer, Toronto Metropolitan University Faculty of Engineering & Architectural Science
AC26/iMacPro/MPB Silicon M2Pro
1 REPLY 1
Andy Thomson
Advisor
Same problem with the octahedron. Geometry is correct - displays in all views except when marquee'd. Methinks the PGONs are wrong?

!!Script 3D 

pen     1
material 24

L=0.5*l !side 
r=l*sqr(2) !alt l*cos(45)

ROTx xrot
ROTy yrot

HOTSPOT 0, 0, 0					!#0 origin
HOTSPOT l, l, 0.0				!#1A
HOTSPOT l, -l, 0.0				!#2B 
HOTSPOT -l, -l, 0.0				!#3C 
HOTSPOT -l, l, 0.0				!#4D 
HOTSPOT 0.0, 0.0, l*sqr(2)		!#5E 
HOTSPOT 0.0, 0.0, -l*sqr(2)		!#6F 

VERT l, l, 0.0				!#1A
VERT l, -l, 0.0				!#2B 
VERT -l, -l, 0.0			!#3C 
VERT -l, l, 0.0				!#4D 
VERT 0.0, 0.0, l*sqr(2)		!#5E 
VERT 0.0, 0.0, -l*sqr(2)	!#6F 

EDGE 1, 2, -1, -1, 0 !#1AB 
EDGE 2, 3, -1, -1, 0 !#2BC 
EDGE 3, 4, -1, -1, 0 !#3CD 
EDGE 4, 1, -1, -1, 0 !#4DA 
EDGE 1, 5, -1, -1, 0 !#5AE 
EDGE 2, 5, -1, -1, 0 !#6BE 
EDGE 3, 5, -1, -1, 0 !#7CE 
EDGE 4, 5, -1, -1, 0 !#8DE 
EDGE 1, 6, -1, -1, 0 !#9AF 
EDGE 2, 6, -1, -1, 0 !#10BF 
EDGE 3, 6, -1, -1, 0 !#11CF 
EDGE 4, 6, -1, -1, 0 !#12DF
 
PGON 3, 0, -1, 6, -5, 1		!#1BEA 
PGON 3, 0, -1, -11,-2,10	!#2FCB 
PGON 3, 0, -1, -4,12,-9		!#3ADF 
PGON 3, 0, -1,-6, 2, 7		!#4EBC 
PGON 3, 0, -1,11,-12, -3	!#5CFD 
PGON 3, 0, -1, 4,5, -8		!#6DAE 
PGON 3, 0, -1,8, -7, 3		!#7DEC 
PGON 3, 0, -1, 9,-10, -1	!#8AFB 

end 
Andy Thomson, M.Arch, OAA, MRAIC
Director
Thomson Architecture, Inc.
Instructor/Lecturer, Toronto Metropolitan University Faculty of Engineering & Architectural Science
AC26/iMacPro/MPB Silicon M2Pro

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!