Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
b3f1bada
Commit
b3f1bada
authored
Feb 16, 2012
by
Dave Cooper
Browse files
added x3d support for sphericalcap
parent
5b06e69a
Changes
4
Hide whitespace changes
Inline
Sidebyside
demos/wireworld/source/assembly.lisp
View file @
b3f1bada
...
...
@@ 15,7 +15,7 @@
:displaycontrols
(
list
:color
:brown
)
:radius
3
:innerradius
2.5
:endhorizontalarc
pi
;;
:endhorizontalarc pi
:startverticalarc
0
:endverticalarc
(
/
pi
4
)
:center
(
translate
(
the
center
)
:left
10
:rear
10
:up
(
thechild
radius
)))
...
...
@@ 46,6 +46,15 @@
;;:arc pi
)
(
reactor
:type
'sphericalcap
:displaycontrols
(
list
:color
:purple
)
:baseradius
3
:axislength
2
:center
(
translate
(
the
center
)
:up
(
half
(
thechild
height
))
:left
17
:front
5
))
(
silo
:type
'silo
:radius
1
...
...
@@ 66,6 +75,7 @@
((
roof
:type
'sphere
:displaycontrols
(
list
:color
:orange
)
:center
(
translate
(
the
center
)
:rear
(
half
(
the
length
)))
:endhorizontalarc
pi
:passdown
(
radius
)
)
...
...
gdl/geombase/wire/source/arc.lisp
View file @
b3f1bada
...
...
@@ 135,7 +135,9 @@ the start and end point of the arc.
:arguments (angle \"Number in Radians\")"
pointonarc
(
angle
)
(
rotatepoint
(
the
start
)
(
the
center
)
(
the
(
facenormalvector
:top
))
:angle
angle
))))
(
if
(
the
start
)
(
rotatepoint
(
the
start
)
(
the
center
)
(
the
(
facenormalvector
:top
))
:angle
angle
)
(
the
center
)))))
...
...
gdl/geombase/wire/source/sphericalcap.lisp
View file @
b3f1bada
...
...
@@ 21,7 +21,7 @@
(
inpackage
:geombase
)
(
defineobject
sphericalcap
(
arcoidmixin
baseobject
)
(
defineobject
sphericalcap
(
ifsoutputmixin
arcoidmixin
baseobject
)
:documentation
(
:description
"The region of a sphere which lies above (or below) a given plane. Although this
could be created with a partial sphere using the sphere primitive, the spherical cap allows for more convenient
...
...
@@ 67,7 +67,10 @@ construction and positioning since the actual center of the spherical cap is the
numberofhorizontalsections
4
)
(
"Integer. How many lines of longitude to show on the sphericalcap in some renderings. Default value is 2."
numberofverticalsections
4
))
numberofverticalsections
4
)
(
inner?
nil
)
(
closed?
t
))
:computedslots
...
...
@@ 125,12 +128,41 @@ construction and positioning since the actual center of the spherical cap is the
(
push
(
list
(
if
(
typep
(
the
:innercap
)
'sphericalcap
)
(
the
:innercap
(
:meridians
count
)
:start
)
(
the
:basecenter
))
(
the
(
:meridians
count
)
:start
))
result
)))))
(
the
(
:meridians
count
)
:start
))
result
))))
(
polygonpoints
(
mapcar
#'
(
lambda
(
parallel
)
(
theobject
parallel
(
equispacedpoints
(
max
(
the
numberofverticalsections
)
12
))))
(
listelements
(
the
parallels
))))
(
polygonsforifs
(
let
((
thickness?
(
and
(
not
(
the
inner?
))
(
typep
(
the
innercap
)
'sphericalcap
))))
(
append
(
apply
#'
append
(
mapcar
#'
(
lambda
(
list1
list2
)
(
mapcar
#'
(
lambda
(
p1
p2
p3
p4
)
(
list
p1
p2
p4
p3
))
list1
(
rest
list1
)
list2
(
rest
list2
)))
(
the
polygonpoints
)
(
rest
(
the
polygonpoints
))))
(
when
(
and
(
not
thickness?
)
(
the
closed?
))
(
list
(
first
(
the
polygonpoints
))))
(
when
thickness?
(
the
innercap
polygonsforifs
))
(
when
thickness?
(
mapcar
#'
(
lambda
(
p1
p2
p3
p4
)
(
list
p1
p2
p4
p3
))
(
first
(
the
polygonpoints
))
(
rest
(
first
(
the
polygonpoints
)))
(
first
(
the
innercap
polygonpoints
))
(
rest
(
first
(
the
innercap
polygonpoints
)))))))))
:hiddenobjects
((
innercap
:type
(
if
(
and
(
the
:innerbaseradiusc
)
(
the
:capthicknessc
))
'sphericalcap
'nullpart
)
:baseradius
(
the
:innerbaseradiusc
)
:inner?
t
:center
(
translate
(
the
center
)
:down
(
half
(
the
capthicknessc
)))
:passdown
(
:numberofhorizontalsections
:numberofverticalsections
)
:axislength
(

(
the
:axislength
)
(
the
:capthicknessc
)))
...
...
surf/lenses/source/x3d.lisp
View file @
b3f1bada
...
...
@@ 456,7 +456,7 @@
(
clwho:withhtmloutput
(
*stream*
nil
:indent
t
)
(
:Shape
(
:Appearance
(
writethe
materialproperties
))
((
:IndexedFaceSet
:solid
"
false
"
((
:IndexedFaceSet
:solid
"
FALSE
"
:creaseAngle
"1.571"
:coordIndex
(
format
nil
"~{~{~a~^ ~}~^ 1 ~}"
(
the
ifsindices
)))
((
:Coordinate
:point
(
format
nil
"~{~{~a~^ ~}~^ ~}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment