Title: Python API little bug in material.edit_layer · Issue #2868 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Python API little bug in material.edit_layer · Issue #2868 · IfcOpenShell/IfcOpenShell
X Title: Python API little bug in material.edit_layer · Issue #2868 · IfcOpenShell/IfcOpenShell
Description: I was taking a look at the API and noticed the following: According to the code example in the material.edit layer documentation, the typical line: ifcopenshell.api.run("material.edit_layer", model, layer=layer, attributes={"LayerThickne...
Open Graph Description: I was taking a look at the API and noticed the following: According to the code example in the material.edit layer documentation, the typical line: ifcopenshell.api.run("material.edit_layer", model...
X Description: I was taking a look at the API and noticed the following: According to the code example in the material.edit layer documentation, the typical line: ifcopenshell.api.run("material.edit_layer&qu...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/2868
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python API little bug in material.edit_layer","articleBody":"I was taking a look at the API and noticed the following:\r\n\r\nAccording to the code example [in the material.edit layer documentation](https://blenderbim.org/docs-python/autoapi/ifcopenshell/api/material/edit_layer/index.html), the typical line:\r\n`ifcopenshell.api.run(\"material.edit_layer\", model, layer=layer, attributes={\"LayerThickness\": 13})`\r\n\r\ndoesn't include a `material=layer.Material` argument, which makes `layer.Material = None` after that call [(link)](https://github.com/IfcOpenShell/IfcOpenShell/blob/cce0867f6365288aa2a0c1963ceee610f96b14d3/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py#L66). On the other hand, it wouldn't seem necessary to call `material.edit_layer` if a thickness argument could be passed to `material.add_layer`. That's also in line with the behaviour of `material.add_profile` accepting the profile, without the need to call `material.edit_profile` at first creation.\r\n\r\nAm I missing something or it would be a good thing to add more arguments to `material.add_layer`? Perhaps even IsVentilated and so on.","author":{"url":"https://github.com/cvillagrasa","@type":"Person","name":"cvillagrasa"},"datePublished":"2023-03-15T07:18:29Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/2868"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:469ff925-603f-b589-a5cf-07f64c11e6c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B52A:1DFD99:5C0DC5:79B763:6B04C331 |
| html-safe-nonce | df97a533b4d43dcf8cfb0beb12ded9ac5082cd60a4fdb87ea72d7f96bfde8e3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTJBOjFERkQ5OTo1QzBEQzU6NzlCNzYzOjZCMDRDMzMxIiwidmlzaXRvcl9pZCI6IjkxNjAxODUzOTQ2MTk1MzIwODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ee68f1bf604a3d3dc5d5aa0de9392ae860347ebcc5a3804cd52d1a370e56d844 |
| hovercard-subject-tag | issue:1624902176 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/2868/issue_layout |
| twitter:image | https://opengraph.githubassets.com/745f1eea7132dbfe6ff0e7ae736a1b25b19393e830089e8d242c45a7783b1a9d/IfcOpenShell/IfcOpenShell/issues/2868 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/745f1eea7132dbfe6ff0e7ae736a1b25b19393e830089e8d242c45a7783b1a9d/IfcOpenShell/IfcOpenShell/issues/2868 |
| og:image:alt | I was taking a look at the API and noticed the following: According to the code example in the material.edit layer documentation, the typical line: ifcopenshell.api.run("material.edit_layer", model... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cvillagrasa |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width