Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gendl
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
45
Issues
45
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
gendl
gendl
Commits
58466c0c
Commit
58466c0c
authored
Nov 13, 2018
by
Dave Cooper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added error messages for cylinder, cone and brep center-of-gravity.
parent
a7302be0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
geom-base/wire/source/cylinder.lisp
geom-base/wire/source/cylinder.lisp
+11
-2
surf/source/brep.lisp
surf/source/brep.lisp
+5
-2
surf/source/cone-solid.lisp
surf/source/cone-solid.lisp
+11
-2
No files found.
geom-base/wire/source/cylinder.lisp
View file @
58466c0c
...
...
@@ -235,8 +235,17 @@ Partial cylinders and hollow cylinders are supported."
:hidden-objects
((
inner-cylinder
:type
(
cond
((
and
(
the
:inner-radius-1
)
(
the
:inner-radius-2
))
'cone
)
((
the
inner-radius
)
'cylinder
)
((
inner-cylinder
:type
(
cond
((
and
(
the
:inner-radius-1
)
(
the
:inner-radius-2
))
(
if
(
not
(
and
(
<
(
the
inner-radius-1
)
(
the
radius-1
))
(
<
(
the
inner-radius-2
)
(
the
radius-2
))))
(
error
"inner radius not less than radius for ~a.~%"
(
cons
'the
(
reverse
(
the
root-path
))))
'cone
))
((
the
inner-radius
)
(
if
(
not
(
<
(
the
inner-radius
)
(
the
radius
)))
(
error
"inner radius not less than radius for ~a.~%"
(
cons
'the
(
reverse
(
the
root-path
))))
'cylinder
))
(
t
'null-part
))
:radius
(
the
:inner-radius
)
:radius-1
(
the
:inner-radius-1
)
...
...
surf/source/brep.lisp
View file @
58466c0c
...
...
@@ -689,8 +689,11 @@ be faster to compute and exhibit more stability.
:&key ((tolerance (the adaptive-tolerance)) \"Controls how precisely the properties are computed\")"
center-of-gravity
(
&key
(
tolerance
(
the
adaptive-tolerance
)))
(
scalar*vector
(
/
(
the
(
volume
:tolerance
tolerance
)))
(
getf
(
the
(
moments
:tolerance
tolerance
))
:volume-static-moments
)))))
(
let
((
volume
(
the
volume
:tolerance
tolerance
)))
(
when
(
zerop
volume
)
(
error
"~a is a zero-volume brep. Center-of-gravity cannot be computed.~%"
(
cons
'the
(
reverse
(
the
root-path
)))))
(
scalar*vector
(
/
volume
)
(
getf
(
the
(
moments
:tolerance
tolerance
))
:volume-static-moments
))))))
...
...
surf/source/cone-solid.lisp
View file @
58466c0c
...
...
@@ -51,8 +51,17 @@ from brep and cylinder"
:pass-down
(
radius
radius-1
radius-2
arc
brep-tolerance
))
(
inner-cylinder
:type
(
cond
((
and
(
the
:inner-radius-1
)
(
the
:inner-radius-2
))
'simple-cone-solid
)
((
the
inner-radius
)
'simple-cylinder-solid
)
(
inner-cylinder
:type
(
cond
((
and
(
the
:inner-radius-1
)
(
the
:inner-radius-2
))
(
if
(
not
(
and
(
<
(
the
inner-radius-1
)
(
the
radius-1
))
(
<
(
the
inner-radius-2
)
(
the
radius-2
))))
(
error
"inner radius not less than radius for ~a.~%"
(
cons
'the
(
reverse
(
the
root-path
))))
'simple-cone-solid
))
((
the
inner-radius
)
(
if
(
not
(
<
(
the
inner-radius
)
(
the
radius
)))
(
error
"inner radius not less than radius for ~a.~%"
(
cons
'the
(
reverse
(
the
root-path
))))
'simple-cylinder-solid
))
(
t
'null-part
))
:radius
(
the
:inner-radius
)
:radius-1
(
the
:inner-radius-1
)
...
...
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