Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gendl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
47
Issues
47
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gendl
gendl
Commits
96bd9fb0
Commit
96bd9fb0
authored
Nov 24, 2013
by
Dave Cooper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated defgeneric for lispworks
parent
ed4ed212
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
6 deletions
+48
-6
surf/source/3d-curve.lisp
surf/source/3d-curve.lisp
+42
-3
surf/source/methods.lisp
surf/source/methods.lisp
+6
-3
No files found.
surf/source/3d-curve.lisp
View file @
96bd9fb0
...
...
@@ -25,10 +25,14 @@
(
define-object
3d-curve
(
b-spline-curve
)
:documentation
(
:description
"Given a uv on-surface curve and its surface, produce the corresponding 3d curve."
)
:documentation
(
:description
"Given a uv on-surface curve and its
surface, produce the corresponding 3d curve. Note this must be a true
on-surface curve, not just an arbitrary curve whose domain happens to
be in the parameter space of the surface."
)
:input-slots
(
"GDL Curve object. Curve whose points are understood to be 2D u, v parameter values on the surface."
uv-curve
:input-slots
(
"GDL Curve object. Curve which is a proper on-surface
curve (e.g. produced by a project or drop operation
onto the surface)."
uv-curve
"GDL Surface object. The surface corresponding to the given uv-curve."
surface
)
...
...
@@ -39,3 +43,38 @@
(
control-points
(
mapcar
#'
(
lambda
(
point
)
(
the
surface
(
point
(
get-x
point
)
(
get-y
point
))))
(
the
uv-curve
control-points
)))))
(
define-object
3d-approximated
(
approximated-curve
)
:documentation
(
:description
"Given a curve in uv parameter space of
a surface, produce a corresponding 3d curve with brute-force fitting
techniques."
)
:input-slots
(
"GDL Curve object. Curve whose points are understood to be 2D u, v
parameter values on the surface."
uv-curve
"GDL Surface object. The surface corresponding to the given uv-curve."
surface
(
"Integer. How many point samples to take for fitting
purposes. Default is 42."
number-of-samples
42
)
(
"Number. The tolerance for the final approximation, to be
multiplied by the 3d curve length. Default is 10e-5."
tolerance-factor
10e-5
))
:hidden-objects
((
3d-curve
:type
'fitted-curve
:points
(
mapcar
#'
(
lambda
(
point
)
(
the
surface
(
point
(
get-x
point
)
(
get-y
point
))))
(
the
uv-curve
(
equi-spaced-points
(
the
number-of-samples
))))))
:computed-slots
((
tolerance
(
*
(
the
tolerance-factor
)
(
the
3d-curve
total-length
)))
(
curve-in
(
the
3d-curve
))))
\ No newline at end of file
surf/source/methods.lisp
View file @
96bd9fb0
...
...
@@ -281,8 +281,11 @@
(
declare
(
ignore
file-name
curves
surfaces
breps
file-type
quiet?
))
(
error
"Don't know how to write native file using ~s.~%"
geometry-kernel
))
(
defmethod
read-native-file
((
geometry-kernel
vanilla-geometry-kernel
)
file-name
&key
curves
surfaces
trees
breps
file-type
quiet?
)
(
declare
(
ignore
file-name
curves
surfaces
trees
breps
file-type
quiet?
))
(
defgeneric
read-native-file
(
geometry-kernel
file-name
&key
file-type
quiet?
sew-and-shrink-breps?
))
(
defmethod
read-native-file
((
geometry-kernel
vanilla-geometry-kernel
)
file-name
&key
file-type
quiet?
sew-and-shrink-breps?
)
(
declare
(
ignore
file-name
sew-and-shrink-breps?
file-type
quiet?
))
(
error
"Don't know how to read native file using ~s.~%"
geometry-kernel
))
...
...
@@ -776,4 +779,4 @@
tolerance
))
(
define-vanilla-wrapper
make-cardinal-spline
(
&key
control-points
tension-params
periodic?
))
\ No newline at end of file
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