summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/base/three_surface.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-08 00:57:31 +0000
committerKarl Berry <karl@freefriends.org>2009-06-08 00:57:31 +0000
commit9e32dd6aee7faf4e59888cfbd7a927d497b563ad (patch)
tree5068ec13390f4352be663383dd58e22147e68201 /Build/source/utils/asymptote/base/three_surface.asy
parent3f49bad6cd5234b4e0ea156f6f68f6430643c10f (diff)
asymptote 1.76
git-svn-id: svn://tug.org/texlive/trunk@13664 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/base/three_surface.asy')
-rw-r--r--Build/source/utils/asymptote/base/three_surface.asy16
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy
index 55060cb516d..3c49b382133 100644
--- a/Build/source/utils/asymptote/base/three_surface.asy
+++ b/Build/source/utils/asymptote/base/three_surface.asy
@@ -681,6 +681,22 @@ struct surface {
triple[][] normals=new triple[][],
pen[][] colors=new pen[][], bool3 planar=default) {
s=new patch[];
+ if(planar == true) {// Assume all path3 elements share a common normal.
+ if(external.length != 0) {
+ triple n=normal(external[0]);
+ if(n != O) {
+ transform3 T=align(n);
+ external=transpose(T)*external;
+ T *= shift(0,0,point(external[0],0).z);
+ path[] g=sequence(new path(int i) {return path(external[i]);},
+ external.length);
+ for(patch p : surface(g).s)
+ s.push(T*p);
+ return;
+ }
+ }
+ }
+
for(int i=0; i < external.length; ++i)
construct(external[i],
internal.length == 0 ? new triple[] : internal[i],