1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <?xml-stylesheet type=
"text/xsl" href=
"formats/html.xsl"?>
4 <!-- This file is part of Shapes. -->
6 <!-- Shapes is free software: you can redistribute it and/or modify -->
7 <!-- it under the terms of the GNU General Public License as published by -->
8 <!-- the Free Software Foundation, either version 3 of the License, or -->
9 <!-- any later version. -->
11 <!-- Shapes is distributed in the hope that it will be useful, -->
12 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
13 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
14 <!-- GNU General Public License for more details. -->
16 <!-- You should have received a copy of the GNU General Public License -->
17 <!-- along with Shapes. If not, see <http://www.gnu.org/licenses/>. -->
19 <!-- Copyright 2008, 2014, 2015 Henrik Tidefelt -->
23 <within-namespace>..Shapes..Geometry3D
</within-namespace>
24 <extension>circle
</extension>
26 <p>Functions for construction of circular arcs in
<str-3D />.
</p>
31 <title><self /></title>
32 <meta-selflink><self-href /></meta-selflink>
33 <up-link><parent-namespace /></up-link>
34 <base href=
<!--#expand-next-string-->"$(BASE)" />
35 <examples-home href=
<!--#expand-next-string-->"$(EXAMPLES)" />
36 <shapes-version number=
<!--#expand-next-string-->"$(SHAPES_VERSION)" />
38 <!--#include virtual="^/toc.xml" -->
43 <p>Circles and circular arcs in
<str-3D /> are basically constructed by immersing a
<str-2D /> circle or arc, and then move it to the right location. This extension provides
<str-3D /> wrappers of the
<str-2D /> counterparts in
<extension path=
"..Shapes..Geometry/circle" />.
</p>
48 <system-binding name=
"generic_arc3D">
49 <summary><str-3D /> embedding of
<str-2D /> arcs
</summary>
51 <case constructor-of=
"Path">
53 <arg identifier=
"arc2D">
54 <type><named-type name=
"Function" /></type>
57 <type><named-type name=
"Coords3D" /></type>
59 <arg identifier=
"zStart">
60 <type><named-type name=
"Coords3D" /></type>
62 <arg identifier=
"zEnd">
63 <type><named-type name=
"Coords3D" /></type>
66 <type><named-type name=
"Length" /></type>
69 <dynamic-references></dynamic-references>
71 <p>The argument
<arg name=
"arc2D" /> should be a function accepting the same arguments as, for instance,
<value name=
"..Shapes..Geometry..ccw_arc" />.
</p>
72 <p>This function computes the transform that maps the plane spanned by
<arg name=
"z0" />,
<arg name=
"zStart" />, and
<arg name=
"zEnd" />, to a plane through the origin, normal to the
<eq>z
</eq> direction. Using this transform in combination with
<value name=
"view" />, the task of constructing arcs is moved from
<str-3D /> to
<str-2D />, where the arc is constructed using
<arg name=
"arc2D" />, and then the result is immersed and mapped back the the right position in
<str-3D />.
</p>
73 <p>The orientation of the intermediate
<str-2D /> representation is chosen to ensure that rotation about
<arg name=
"z0" /> from the direction to
<arg name=
"zStart" /> to
<arg name=
"zEnd" /> becomes counter-clockwise in
<str-2D />.
</p>
74 <p>The cuts of this function obtained by using
<value name=
"..Shapes..Geometry..ccw_arc" /> or
<value name=
"..Shapes..Geometry..cw_arc" /> are bound to separate variables.
</p>
77 <value name=
"..Shapes..Geometry..ccw_arc3D" />
78 <value name=
"..Shapes..Geometry..cw_arc3D" />
84 <system-binding name=
"ccw_arc3D">
85 <summary>Couter-clockwise circular arc
</summary>
87 <case constructor-of=
"Path">
90 <type><named-type name=
"Coords3D" /></type>
92 <arg identifier=
"zStart">
93 <type><named-type name=
"Coords3D" /></type>
95 <arg identifier=
"zEnd">
96 <type><named-type name=
"Coords3D" /></type>
99 <type><named-type name=
"Length" /></type>
102 <dynamic-references></dynamic-references>
104 <p>Uses
<value name=
"..Shapes..Geometry..generic_arc3D" /> with
<value name=
"..Shapes..Geometry..ccw_arc" /> to construct the arc in
<str-2D />.
</p>
110 <system-binding name=
"cw_arc3D">
111 <summary>Clockwise circular arc
</summary>
113 <case constructor-of=
"Path">
115 <arg identifier=
"z0">
116 <type><named-type name=
"Coords3D" /></type>
118 <arg identifier=
"zStart">
119 <type><named-type name=
"Coords3D" /></type>
121 <arg identifier=
"zEnd">
122 <type><named-type name=
"Coords3D" /></type>
125 <type><named-type name=
"Length" /></type>
128 <dynamic-references></dynamic-references>
130 <p>Uses
<value name=
"..Shapes..Geometry..generic_arc3D" /> with
<value name=
"..Shapes..Geometry..cw_arc" /> to construct the arc in
<str-2D />.
</p>