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
1247b184
Commit
1247b184
authored
Apr 20, 2016
by
Dave Cooper
Browse files
added missing normally-projected-curve.lisp
parent
ae6020d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
surf/source/normally-projected-curve.lisp
surf/source/normally-projected-curve.lisp
+66
-0
No files found.
surf/source/normally-projected-curve.lisp
0 → 100644
View file @
1247b184
(
in-package
:surf
)
(
define-object
normally-projected-curve
(
curve
)
:input-slots
(
from-surface
curve
to-surface
(
number-of-points
200
))
:computed-slots
((
sample-points
(
the
curve
uv-curve
(
equi-spaced-points
(
the
number-of-points
))))
(
normals
(
mapcar
#'
(
lambda
(
point
)
(
the
from-surface
(
normal
(
get-u
point
)
(
get-v
point
))))
(
the
sample-points
)))
(
projected-points
(
mapcar
#'
(
lambda
(
point
normal
)
(
the
to-surface
(
projected-point
(
the
from-surface
(
point
(
get-u
point
)
(
get-v
point
)))
normal
)))
(
the
sample-points
)
(
the
normals
)))
(
projected-points-3d
(
mapcar
#'
get-3d-point-of
(
the
projected-points
)))
(
projected-points-uv
(
mapcar
#'
get-uv-point-of
(
the
projected-points
))))
:objects
((
fitted
:type
'fitted-curve
:points
(
the
projected-points-3d
))
(
fitted-uv
:type
'fitted-curve
:points
(
mapcar
#'
(
lambda
(
point
)
(
make-point
(
get-x
point
)
(
get-y
point
)
0
))
(
the
projected-points-uv
)))
(
approximated
:type
'approximated-curve
:curve-in
(
the
fitted-uv
)
:tolerance
0.00001
)
(
fitted-3d
:type
'b-spline-curve
:knot-vector
(
the
approximated
knot-vector
)
:degree
(
the
approximated
degree
)
:weights
(
the
approximated
weights
)
:control-points
(
mapcar
#'
(
lambda
(
point
)
(
the
to-surface
(
point
(
get-u
point
)
(
get-v
point
))))
(
the
approximated
control-points
)))))
#+
nil
(
define-object
normally-projected-curve-test
(
normally-projected-curve
)
:computed-slots
((
from-surface
(
the
test-fitted-surface
))
(
curve
(
the
projected
))
(
to-surface
(
the
offset-surface
)))
:objects
((
test-fitted-surface
:type
'test-fitted-surface
:grid-height
1
)
(
offset-surface
:type
'rectangular-surface
:length
5
:width
5
:center
(
make-point
2
2
1.5
))
(
projected
:type
'projected-curve
:curve-in
(
the
segment
)
:surface
(
the
test-fitted-surface
)
:projection-vector
(
the
(
face-normal-vector
:bottom
)))
(
segment
:type
'linear-curve
:start
(
make-point
1
1
3
)
:end
(
make-point
3
3
3
))))
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