Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
product-uniqer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
product-uniqer
Commits
f23cf4c9
There was an error fetching the commit references. Please try again later.
Commit
f23cf4c9
authored
5 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
triangle pipe
parent
2343d661
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
material.py
+10
-1
10 additions, 1 deletion
material.py
with
10 additions
and
1 deletion
material.py
+
10
−
1
View file @
f23cf4c9
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import
math
class
material_class
():
class
material_class
():
def
__init__
(
self
,
name
,
volume_calculator
,
density
,
meter_per_unit
,
is2d
=
False
):
def
__init__
(
self
,
name
,
volume_calculator
,
density
,
meter_per_unit
,
is2d
=
False
):
'''
'''
...
@@ -57,6 +59,13 @@ class material():
...
@@ -57,6 +59,13 @@ class material():
def
get_unit_amount
(
self
,
length
):
def
get_unit_amount
(
self
,
length
):
return
self
.
m_class
.
get_unit_amount
(
length
)
return
self
.
m_class
.
get_unit_amount
(
length
)
def
_calc_triangle_pipe_area
(
arg0
,
arg1
):
sqrt2
=
math
.
sqrt
(
2
)
p
=
arg1
-
(
2
+
sqrt2
)
*
arg0
area1
=
arg0
*
(
sqrt2
*
arg1
-
arg0
)
area2
=
arg0
*
(
arg0
+
p
)
return
area1
+
2
*
area2
material_class_list
=
[
material_class_list
=
[
material_class
(
'
扁钢
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
args
[
1
]
*
length
),
7850
,
6
),
material_class
(
'
扁钢
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
args
[
1
]
*
length
),
7850
,
6
),
material_class
(
'
扁钢--易折弯
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
args
[
1
]
*
length
),
7850
,
6
),
material_class
(
'
扁钢--易折弯
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
args
[
1
]
*
length
),
7850
,
6
),
...
@@ -71,7 +80,7 @@ material_class_list = [
...
@@ -71,7 +80,7 @@ material_class_list = [
material_class
(
'
方管
'
,
(
lambda
args
,
length
:
1.00000
*
4
*
args
[
0
]
*
(
args
[
1
]
-
args
[
0
])
*
length
),
7850
,
6
),
material_class
(
'
方管
'
,
(
lambda
args
,
length
:
1.00000
*
4
*
args
[
0
]
*
(
args
[
1
]
-
args
[
0
])
*
length
),
7850
,
6
),
material_class
(
'
不等边角钢
'
,
(
lambda
args
,
length
:
1.01493
*
args
[
0
]
*
(
args
[
1
]
+
args
[
2
]
-
args
[
0
])
*
length
),
7850
,
6
),
material_class
(
'
不等边角钢
'
,
(
lambda
args
,
length
:
1.01493
*
args
[
0
]
*
(
args
[
1
]
+
args
[
2
]
-
args
[
0
])
*
length
),
7850
,
6
),
material_class
(
'
等边角钢
'
,
(
lambda
args
,
length
:
1.01493
*
args
[
0
]
*
(
args
[
1
]
+
args
[
1
]
-
args
[
0
])
*
length
),
7850
,
6
),
material_class
(
'
等边角钢
'
,
(
lambda
args
,
length
:
1.01493
*
args
[
0
]
*
(
args
[
1
]
+
args
[
1
]
-
args
[
0
])
*
length
),
7850
,
6
),
material_class
(
'
三角管
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
args
[
1
]
*
(
2
+
1.4142
)
*
length
),
7850
,
6
),
material_class
(
'
三角管
'
,
(
lambda
args
,
length
:
1.00000
*
_calc_triangle_pipe_area
(
args
[
0
]
,
args
[
1
])
*
length
),
7850
,
6
),
material_class
(
'
三棱钢
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
1000
*
length
),
1
,
6
),
# Be caution to its density! lambda is giving weight rather than volume!
material_class
(
'
三棱钢
'
,
(
lambda
args
,
length
:
1.00000
*
args
[
0
]
*
1000
*
length
),
1
,
6
),
# Be caution to its density! lambda is giving weight rather than volume!
]
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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