Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
oldroco
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mehtank
oldroco
Commits
a62ef52e
Commit
a62ef52e
authored
5 years ago
by
mehtank
Browse files
Options
Downloads
Patches
Plain Diff
explicit angle in Extension
parent
fe3c951b
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
svggen/builders/ExtensionBuilder.py
+4
-1
4 additions, 1 deletion
svggen/builders/ExtensionBuilder.py
svggen/library/Extension.yaml
+6
-2
6 additions, 2 deletions
svggen/library/Extension.yaml
with
10 additions
and
3 deletions
svggen/builders/ExtensionBuilder.py
+
4
−
1
View file @
a62ef52e
from
svggen.api.component
import
Component
from
svggen.api.Function
import
Function
c
=
Component
()
c
.
addParameter
(
"
l
"
)
c
.
addParameter
(
"
w
"
)
c
.
addParameter
(
"
angle
"
,
180
)
c
.
addSubcomponent
(
"
top
"
,
"
Rectangle
"
)
c
.
addSubcomponent
(
"
bot
"
,
"
Rectangle
"
)
...
...
@@ -15,7 +18,7 @@ c.addConstraint(("bot", "l"), "w")
c
.
addConstraint
((
"
bot
"
,
"
w
"
),
"
l
"
,
"
x/2
"
)
c
.
addConnection
((
"
top
"
,
"
b
"
),
(
"
bot
"
,
"
t
"
),
angle
=
180
)
(
"
bot
"
,
"
t
"
),
angle
=
Function
(
params
=
"
angle
"
,
fnstring
=
"
x
"
)
)
c
.
inheritInterface
(
"
t
"
,
(
"
top
"
,
"
t
"
))
c
.
inheritInterface
(
"
b
"
,
(
"
bot
"
,
"
b
"
))
...
...
This diff is collapsed.
Click to expand it.
svggen/library/Extension.yaml
+
6
−
2
View file @
a62ef52e
...
...
@@ -2,11 +2,15 @@ connections:
connection0
:
-
[
top
,
b
]
-
[
bot
,
t
]
-
{
angle
:
180
}
-
angle
:
{
parameter
:
angle
}
interfaces
:
b
:
{
interface
:
b
,
subcomponent
:
bot
}
t
:
{
interface
:
t
,
subcomponent
:
top
}
parameters
:
{
l
:
null
,
w
:
null
}
metadata
:
angle
:
{
default
:
180
}
l
:
{
default
:
null
}
w
:
{
default
:
null
}
parameters
:
{
angle
:
180
,
l
:
null
,
w
:
null
}
subcomponents
:
bot
:
classname
:
Rectangle
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment