Открыть боковую панель
nikitronn
sverchok
Коммиты
7c988e67
Коммит
7c988e67
создал
Июн 18, 2019
по автору
Ilya Portnov
Просмотр файлов
Update documentation.
владелец
9027f8ba
Изменения
3
Скрыть пробелы
Построчно
Рядом
docs/nodes/generators_extended/profile_mk3.rst
Просмотр файла @
7c988e67
...
...
@@ -31,11 +31,11 @@ The following segment types are available:
+===============+=======+================================================================================+
| MoveTo | M, m | <2v coordinate> |
+---------------+-------+--------------------------------------------------------------------------------+
| LineTo | L, l | (<2v coordinate>)+ [
z]
|
| LineTo | L, l | (<2v coordinate>)+ [
"n = " num_segments] [z]
|
+---------------+-------+--------------------------------------------------------------------------------+
| HorLineTo | H, h | (<x>)+
";"
|
| HorLineTo | H, h | (<x>)+
["n = " num_segments] ";"
|
+---------------+-------+--------------------------------------------------------------------------------+
| VertLineTo | V, v | (<y>)+
";"
|
| VertLineTo | V, v | (<y>)+
["n = " num_segments] ";"
|
+---------------+-------+--------------------------------------------------------------------------------+
| CurveTo | C, c | (<2v control1> <2v control2> <2v knot2>)+ ["n = " num_verts] [z] |
+---------------+-------+--------------------------------------------------------------------------------+
...
...
@@ -66,7 +66,9 @@ The following segment types are available:
(...)+ : this sequence may appear several times
int : means the value will be cast as an int even if you input float
flags generally are 0 or 1.
["n = " num_verts] : for curve commands, number of subdivisions may be specified.
["n = " num_verts] : for curve and line commands, number of subdivisions may be specified.
For curve commands, default number of segments is specified in node settings (in the N panel).
For line commands, default number of segments is always 1.
z : is optional for closing a line
X : as a final command to close the edges (cyclic) [-1, 0]
in addition, if the first and last vertex share coordinate space
...
...
nodes/generators_extended/profile_mk3.py
Просмотр файла @
7c988e67
...
...
@@ -37,14 +37,14 @@ input like:
let name = <value>
M|m <2v coordinate>
L|l <2v coordinate 1> <2v coordinate 2> <2v coordinate n> [z]
L|l <2v coordinate 1> <2v coordinate 2> <2v coordinate n>
["n = " num_segments]
[z]
C|c (<2v control1> <2v control2> <2v knot2>)+ ["n = " num_segments] [z]
S|s (<2v control2> <2v knot2>)+ ["n = " num_segments] [z]
Q|q (<2v control> <2v knot2>)+ ["n = " num_segments] [z]
T|t (<2v knot2>)+ ["n = " num_segments] [z]
A|a <2v rx,ry> <float rot> <int flag1> <int flag2> <2v x,y> ["n = " num_verts] [z]
H|h <x1> <x2> ... ;
V|v <y1> <y2> ... ;
H|h <x1> <x2> ...
["n = " num_segments]
;
V|v <y1> <y2> ...
["n = " num_segments]
;
X
#
-----
...
...
utils/parsec.py
Просмотр файла @
7c988e67
...
...
@@ -116,10 +116,15 @@ def many(func, backtracking=False):
This corresponds to
<Parser> *
in BNF notation.
If backtracking is set to False, then the parser will iterate
as far as it can, even if consequential parsers will fail then.
With backtracking set to True, the parser will be able to go back
if it sees that some of consequencing parsers will fail.
"""
def
parser
(
src
):
for
(
value
,
values
),
rest
in
sequence
(
func
,
parser
)(
src
):
yield
[
value
]
+
values
,
rest
# Stop on first possible parsing variant?
if
not
backtracking
:
return
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать