René's URL Explorer Experiment


Title: a bug about to import ifc geometry to opencascade · Issue #807 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: a bug about to import ifc geometry to opencascade · Issue #807 · IfcOpenShell/IfcOpenShell

X Title: a bug about to import ifc geometry to opencascade · Issue #807 · IfcOpenShell/IfcOpenShell

Description: I develop a very lightweight ifc viewer by opencascade and glfw. I find out not every ifc2X3 file can be read properly. This is my project : https://github.com/caadxyz/ifcOcctViewer In the main.cpp , I try two different approach to impor...

Open Graph Description: I develop a very lightweight ifc viewer by opencascade and glfw. I find out not every ifc2X3 file can be read properly. This is my project : https://github.com/caadxyz/ifcOcctViewer In the main.cpp...

X Description: I develop a very lightweight ifc viewer by opencascade and glfw. I find out not every ifc2X3 file can be read properly. This is my project : https://github.com/caadxyz/ifcOcctViewer In the main.cpp...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/807

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"a bug about to import ifc geometry to opencascade ","articleBody":"I develop a very lightweight  ifc viewer by opencascade and  glfw.\r\n\r\nI find out not every ifc2X3 file can be read properly.\r\nThis is my project : https://github.com/caadxyz/ifcOcctViewer  \r\n\r\nIn the main.cpp , I try two different approach to importing ifc file. Both fail in some ifc files, some work will. \r\nlike the example file IfcOpenHouse.ifc.\r\n\r\nthe code below show where maybe the bug is: \r\n\r\nI guess  the bug is from this function  `create_brep_for_representation_and_product\u003creal_t>`  from  ifcOpenSHell 0.5 project   `src/ifcgeom/IfcGeomFunctions.cpp`\r\n\r\n```\r\n#include \"ifcgeom/IfcGeomIterator.h\"\r\n#include \"ifcgeom/IfcGeomRenderStyles.h\"\r\n#include \"ifcparse/utils.h\"\r\n#include \u003cStandard_Version.hxx>\r\n#include \u003cTopoDS_ListOfShape.hxx>\r\n#include \"GlfwOcctView.h\"\r\ntypedef double real_t;\r\ntypedef std::string path_t;\r\nstatic  std::ostream& cout_ = std::cout;\r\nstatic  std::ostream& cerr_ = std::cerr;\r\n\r\nint main(int argc, char** argv) {\r\n\tif ( argc != 2 ) {\r\n        cout_ \u003c\u003c \"Usage: ifcviewer \u003cinput.ifc>\\n\"\r\n            \u003c\u003c \"\\n\"\r\n            \u003c\u003c \"Converts the geometry in an IFC file into glfw view\\n\";\r\n        cout_ \u003c\u003c std::endl;\r\n\t\treturn 1;\r\n\t}\r\n\tIfcParse::IfcFile ifc_file;\r\n\tif ( ! ifc_file.Init(argv[1]) ) {\r\n\t\tstd::cout \u003c\u003c \"Unable to parse .ifc file\" \u003c\u003c std::endl;\r\n\t\treturn 1;\r\n\t}\r\n    TopoDS_ListOfShape L;\r\n    IfcGeom::IteratorSettings settings;\r\n    std::vector\u003cIfcGeom::filter_t> filter_funcs;\r\n    std::set\u003cstd::string> entities;\r\n    entities.insert(\"IfcSpace\");\r\n    entities.insert(\"IfcOpeningElement\");\r\n    IfcGeom::entity_filter entity_filter;\r\n    entity_filter.populate(entities);\r\n    filter_funcs.push_back(entity_filter); \r\n    settings.set(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION, true);\r\n\r\n    IfcSchema::IfcProduct::list::ptr products = ifc_file.entitiesByType\u003cIfcSchema::IfcProduct>();\r\n\tstd::cout \u003c\u003c \"Found \" \u003c\u003c products->size() \u003c\u003c \" products in \" \u003c\u003c argv[1] \u003c\u003c \":\" \u003c\u003c std::endl;\r\n\tfor ( IfcSchema::IfcProduct::list::it it = products->begin(); it != products->end(); ++ it ) {\r\n\t\tconst IfcSchema::IfcProduct* product = *it;\r\n        if (product->is(IfcSchema::Type::FromString(\"IFCOPENINGELEMENT\"))) continue;\r\n        if (product->hasRepresentation())\r\n        {\r\n            IfcGeom::Kernel kernel;\r\n            IfcSchema::IfcProductRepresentation* prodrep = product->Representation();\r\n\t\t\tIfcSchema::IfcRepresentation::list::ptr reps = prodrep->Representations();\r\n            for (IfcSchema::IfcRepresentation::list::it it = reps->begin(); it != reps->end(); ++it) {\r\n                IfcSchema::IfcRepresentation* rep = *it;\r\n                if (!rep->hasRepresentationIdentifier()) {\r\n                    continue;\r\n                }\r\n\r\n                \r\n                //todo: need concern about finding a representation within the 'Model' or 'Plan' context\r\n                if (rep->RepresentationIdentifier() == \"Body\") {\r\n\t\t            //std::cout \u003c\u003c \"Body\" \u003c\u003c std::endl;\r\n                    //todo : create_brep_for_representation_and_product\u003creal_t> need debug\r\n                    //To refer to the version of ifcopenshell 0.6, may there be a solution? Maybe not\r\n                    //ifcgeom/IfcGeomFunctions.cpp\r\n                    IfcGeom::BRepElement\u003creal_t>* o = kernel.create_brep_for_representation_and_product\u003creal_t>(settings, \r\n                            rep, (IfcSchema::IfcProduct*)product);\r\n                    for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) {\r\n                            gp_GTrsf gtrsf = it->Placement();\r\n                            const gp_Trsf& o_trsf = o->transformation().data();\r\n                            gtrsf.PreMultiply(o_trsf);\r\n                            if (o->geometry().settings().get(IfcGeom::IteratorSettings::CONVERT_BACK_UNITS)) {\r\n                                gp_Trsf scale;\r\n                                scale.SetScaleFactor(1.0 / o->geometry().settings().unit_magnitude());\r\n                                gtrsf.PreMultiply(scale);\r\n                            }\r\n                            const TopoDS_Shape& s = it->Shape();\r\n                            const TopoDS_Shape moved_shape = IfcGeom::Kernel::apply_transformation(s, gtrsf);\r\n                            L.Append(moved_shape);\r\n                     }\r\n                }\r\n            }\r\n\t\t    std::cout \u003c\u003c product->entity->toString() \u003c\u003c std::endl;\r\n        }\r\n    }\r\n\r\n    /*\r\n    IfcGeom::Iterator\u003creal_t> context_iterator(settings, &ifc_file, filter_funcs);\r\n    if (!context_iterator.initialize()) {\r\n        cerr_ \u003c\u003c \"No geometrical entities found\" \u003c\u003c std::endl;\r\n        return EXIT_FAILURE;\r\n    }\r\n    cout_ \u003c\u003c \"Creating geometry...\" \u003c\u003c std::endl;\r\n\tsize_t num_created = 0;\r\n\tdo {\r\n        IfcGeom::Element\u003creal_t> *geom_object = context_iterator.get();\r\n        const IfcGeom::BRepElement\u003creal_t>* o = static_cast\u003cconst IfcGeom::BRepElement\u003creal_t>*>(geom_object);\r\n        for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) {\r\n                gp_GTrsf gtrsf = it->Placement();\r\n                const gp_Trsf& o_trsf = o->transformation().data();\r\n                gtrsf.PreMultiply(o_trsf);\r\n                if (o->geometry().settings().get(IfcGeom::IteratorSettings::CONVERT_BACK_UNITS)) {\r\n                    gp_Trsf scale;\r\n                    scale.SetScaleFactor(1.0 / o->geometry().settings().unit_magnitude());\r\n                    gtrsf.PreMultiply(scale);\r\n                }\r\n                const TopoDS_Shape& s = it->Shape();\r\n                const TopoDS_Shape moved_shape = IfcGeom::Kernel::apply_transformation(s, gtrsf);\r\n                L.Append(moved_shape);\r\n         }\r\n    } while (++num_created, context_iterator.next());\r\n    cout_ \u003c\u003c \"Done creating geometry\" \u003c\u003c std::endl;\r\n    */\r\n\r\n    GlfwOcctView anApp(L);\r\n    try\r\n    {\r\n        anApp.run();\r\n    }\r\n    catch (const std::runtime_error& theError)\r\n    {\r\n        cerr_ \u003c\u003c theError.what() \u003c\u003c std::endl;\r\n        return EXIT_FAILURE;\r\n    }\r\n}\r\n```","author":{"url":"https://github.com/mahaidong","@type":"Person","name":"mahaidong"},"datePublished":"2020-03-07T03:21:42Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/807"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:79df8c2f-8c70-0c93-5f79-5170e6e23ede
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD6C8:1FA32B:754F46:A09E99:6B047997
html-safe-nonced6a7ab4c1bf99dbe55e643bfea6af677703fe5ce625a10c5e56d00b03a592407
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkM4OjFGQTMyQjo3NTRGNDY6QTA5RTk5OjZCMDQ3OTk3IiwidmlzaXRvcl9pZCI6IjE4NjQ1Nzk1ODcxNDE1NjQ4MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6cca26c70ffbc028239cf94657e5912f795be4822e872291654d4ff89779abb2
hovercard-subject-tagissue:577269036
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/IfcOpenShell/IfcOpenShell/807/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8c331b54f1f4e2c4c6114cdc47c6f2ddc1ac041e72086d4b85d258d77425015c/IfcOpenShell/IfcOpenShell/issues/807
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8c331b54f1f4e2c4c6114cdc47c6f2ddc1ac041e72086d4b85d258d77425015c/IfcOpenShell/IfcOpenShell/issues/807
og:image:altI develop a very lightweight ifc viewer by opencascade and glfw. I find out not every ifc2X3 file can be read properly. This is my project : https://github.com/caadxyz/ifcOcctViewer In the main.cpp...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemahaidong
hostnamegithub.com
expected-hostnamegithub.com
None9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
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
releasecf73f57448d52b3a7b619195e182b33d3b3454ca
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/807#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F807
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F807
Sign uphttps://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=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/807
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/807
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/807
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests937 (937)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/807
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/807
a bug about to import ifc geometry to opencascade https://github.com/IfcOpenShell/IfcOpenShell/issues/807#top
IfcOpenShell-Corehttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Core%22
https://github.com/mahaidong
mahaidonghttps://github.com/mahaidong
on Mar 7, 2020https://github.com/IfcOpenShell/IfcOpenShell/issues/807#issue-577269036
https://github.com/caadxyz/ifcOcctViewerhttps://github.com/caadxyz/ifcOcctViewer
Moulthttps://github.com/Moult
IfcOpenShell-Corehttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Core%22
on Feb 14, 2023https://github.com/IfcOpenShell/IfcOpenShell/issues/807#event-8511265516
https://github.com/Moult
Moulthttps://github.com/Moult
on Mar 5, 2023https://github.com/IfcOpenShell/IfcOpenShell/issues/807#issuecomment-1454955063
steverugihttps://github.com/steverugi
completedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 13, 2025https://github.com/IfcOpenShell/IfcOpenShell/issues/807#event-17237945166
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/807
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/807
IfcOpenShell-Corehttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Core%22
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.