René's URL Explorer Experiment


Title: ScadInterface · Issue #181 · SolidCode/SolidPython · GitHub

Open Graph Title: ScadInterface · Issue #181 · SolidCode/SolidPython

X Title: ScadInterface · Issue #181 · SolidCode/SolidPython

Description: #scad_interface.py from .solidpython import OpenSCADObject class ConstantOpenSCADObject(OpenSCADObject): def __init__(self, code): super().__init__("not valid openscad code !?!?!", {}) self.code = code def _render(self, render_holes=42):...

Open Graph Description: #scad_interface.py from .solidpython import OpenSCADObject class ConstantOpenSCADObject(OpenSCADObject): def __init__(self, code): super().__init__("not valid openscad code !?!?!", {}) self.code = ...

X Description: #scad_interface.py from .solidpython import OpenSCADObject class ConstantOpenSCADObject(OpenSCADObject): def __init__(self, code): super().__init__("not valid openscad code !?!?!", {}) se...

Opengraph URL: https://github.com/SolidCode/SolidPython/issues/181

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ScadInterface","articleBody":"```python\r\n#scad_interface.py\r\nfrom .solidpython import OpenSCADObject\r\nclass ConstantOpenSCADObject(OpenSCADObject):\r\n    def __init__(self, code):\r\n        super().__init__(\"not valid openscad code !?!?!\", {})\r\n        self.code = code\r\n\r\n    def _render(self, render_holes=42):\r\n        return self.code\r\n\r\nclass ScadInterface:\r\n    def __init__(self):\r\n        self.header = ''\r\n\r\n    def register_customizer_var(self, name, value, options=''):\r\n        self.header += f'{name} = {value}; //{options}\\n'\r\n\r\n    def set_global_var(self, name, value):\r\n        self.header += f'{name} = {value};\\n'\r\n\r\n    def get_header_str(self):\r\n        return self.header\r\n\r\n    def register_font(self, filename):\r\n        self.header += f'use \u003c{filename}\u003e\\n'\r\n\r\n    @staticmethod\r\n    def get(name):\r\n        return self.inline(name)\r\n\r\n    @staticmethod\r\n    def inline(code):\r\n        return scad_inline(code)\r\n\r\ndef scad_inline(code):\r\n    return OpenSCADConstant(code)\r\n\r\n#scad_render\r\ndef scad_render(root, file_header = '', scad_interface=None):\r\n    [...]\r\n    if scad_interface != None:\r\n        file_header += scad_interface.get_header_str()\r\n\r\n    return file_header + includes + scad_body \\\r\n                       + extensions_footer_str\r\n\r\n```\r\n\r\nThese 50 lines are able to close #180, #178, #165 and #61.\r\n\r\nIf possible I would **not** let OpenSCADConstant inherit from OpenSCADObject and use duck typing instead. But since the master is full of \"typing-stuff\" I'm afraid it'll crash it.\r\n\r\nExample usage of the Interface:\r\n[customizer support](https://github.com/jeff-dh/SolidPython/blob/exp_solid/solid/examples/10-customizer.py)\r\n[fonts](https://github.com/jeff-dh/SolidPython/blob/exp_solid/solid/examples/11-fonts.py)\r\n[animation](https://github.com/jeff-dh/SolidPython/blob/exp_solid/solid/examples/12-animation.py)\r\n\r\nThis can also be used to set global `$fn, $fa, $fs`.\r\n\r\nAnd I guess it would make the `header` parameter for `scad_render` obsolete, right?\r\nAny thing else you would like to *inject* into the header can be done trough the `ScadInterface`.","author":{"url":"https://github.com/jeff-dh","@type":"Person","name":"jeff-dh"},"datePublished":"2021-06-01T22:50:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/181/SolidPython/issues/181"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7131eea2-8468-29a5-d654-843be72a39df
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD928:D7362:E5F38E:13557DC:696ACC7D
html-safe-nonce378612279850b44e04fd7518d1d3842b3e1a8273f6ddeada146a9a689334cb30
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTI4OkQ3MzYyOkU1RjM4RToxMzU1N0RDOjY5NkFDQzdEIiwidmlzaXRvcl9pZCI6IjIwNzcxNTYwNjcyOTUxMDAxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac28c4fe26c8a14b1e44cb0af46dbea0d3380c647e335472a6b8653bef4d5bf342
hovercard-subject-tagissue:908792245
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/SolidCode/SolidPython/181/issue_layout
twitter:imagehttps://opengraph.githubassets.com/13f3dd5d898e093459643cc2a8d715c4614d847b1770b74978cc63a6fed8123b/SolidCode/SolidPython/issues/181
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/13f3dd5d898e093459643cc2a8d715c4614d847b1770b74978cc63a6fed8123b/SolidCode/SolidPython/issues/181
og:image:alt#scad_interface.py from .solidpython import OpenSCADObject class ConstantOpenSCADObject(OpenSCADObject): def __init__(self, code): super().__init__("not valid openscad code !?!?!", {}) self.code = ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejeff-dh
hostnamegithub.com
expected-hostnamegithub.com
Nonec785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d
turbo-cache-controlno-preview
go-importgithub.com/SolidCode/SolidPython git https://github.com/SolidCode/SolidPython.git
octolytics-dimension-user_id622839
octolytics-dimension-user_loginSolidCode
octolytics-dimension-repository_id1377446
octolytics-dimension-repository_nwoSolidCode/SolidPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1377446
octolytics-dimension-repository_network_root_nwoSolidCode/SolidPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec718a376fcf780eb22089171adb84a543f660bf7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/SolidCode/SolidPython/issues/181#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSolidCode%2FSolidPython%2Fissues%2F181
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSolidCode%2FSolidPython%2Fissues%2F181
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=SolidCode%2FSolidPython
Reloadhttps://github.com/SolidCode/SolidPython/issues/181
Reloadhttps://github.com/SolidCode/SolidPython/issues/181
Reloadhttps://github.com/SolidCode/SolidPython/issues/181
SolidCode https://github.com/SolidCode
SolidPythonhttps://github.com/SolidCode/SolidPython
Notifications https://github.com/login?return_to=%2FSolidCode%2FSolidPython
Fork 189 https://github.com/login?return_to=%2FSolidCode%2FSolidPython
Star 1.2k https://github.com/login?return_to=%2FSolidCode%2FSolidPython
Code https://github.com/SolidCode/SolidPython
Issues 27 https://github.com/SolidCode/SolidPython/issues
Pull requests 6 https://github.com/SolidCode/SolidPython/pulls
Actions https://github.com/SolidCode/SolidPython/actions
Projects 0 https://github.com/SolidCode/SolidPython/projects
Wiki https://github.com/SolidCode/SolidPython/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/SolidCode/SolidPython/security
Please reload this pagehttps://github.com/SolidCode/SolidPython/issues/181
Insights https://github.com/SolidCode/SolidPython/pulse
Code https://github.com/SolidCode/SolidPython
Issues https://github.com/SolidCode/SolidPython/issues
Pull requests https://github.com/SolidCode/SolidPython/pulls
Actions https://github.com/SolidCode/SolidPython/actions
Projects https://github.com/SolidCode/SolidPython/projects
Wiki https://github.com/SolidCode/SolidPython/wiki
Security https://github.com/SolidCode/SolidPython/security
Insights https://github.com/SolidCode/SolidPython/pulse
New issuehttps://github.com/login?return_to=https://github.com/SolidCode/SolidPython/issues/181
New issuehttps://github.com/login?return_to=https://github.com/SolidCode/SolidPython/issues/181
ScadInterfacehttps://github.com/SolidCode/SolidPython/issues/181#top
https://github.com/jeff-dh
https://github.com/jeff-dh
jeff-dhhttps://github.com/jeff-dh
on Jun 1, 2021https://github.com/SolidCode/SolidPython/issues/181#issue-908792245
#180https://github.com/SolidCode/SolidPython/issues/180
#178https://github.com/SolidCode/SolidPython/issues/178
#165https://github.com/SolidCode/SolidPython/issues/165
#61https://github.com/SolidCode/SolidPython/issues/61
customizer supporthttps://github.com/jeff-dh/SolidPython/blob/exp_solid/solid/examples/10-customizer.py
fontshttps://github.com/jeff-dh/SolidPython/blob/exp_solid/solid/examples/11-fonts.py
animationhttps://github.com/jeff-dh/SolidPython/blob/exp_solid/solid/examples/12-animation.py
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.