-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/hatching #1604
Feature/hatching #1604
Conversation
ijlal99
commented
Jul 31, 2024
- Users can now instantiate SectionCapsPlugin along with their section planes to enable hatching on the scene
- This plugin supports multiple section planes and models on the scene
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>xeokit Example</title> | ||
<link href="../css/pageStyle.css" rel="stylesheet" /> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"></script> |
Check warning
Code scanning / CodeQL
Inclusion of functionality from an untrusted source Medium
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Muhammad! Only changes I'd like to make is to make all methods and variables that are used internally by the plugin private, and remove them from the TS definitions. Then it would seem to have a nice simple API, as an automatic background helper. Also, please add a method, like setEnabled()
, so the user can disable/enable the plugin dynamically.
src/viewer/scene/model/vbo/instancing/triangles/VBOInstancingTrianglesLayer.js
Outdated
Show resolved
Hide resolved
@xeolabs this is something that is caused by objects that are not solids but classified as solids (I believe). |
Gotcha - can you make it not make solid caps for non-solid objects? |
@xeolabs that's how I am currently doing it. I am only generating caps for objects that are classified as solids.
|
Aha I see. These objects are wrongly classified. |
I am not sure if I can do much about it but would love to hear your ideas. |
Here's an XKT with properly classified solids: However, it would also be good to have an example that demonstrated solid caps with a programmatically-created SceneModel, like this example: https://xeokit.github.io/xeokit-sdk/examples/scenemodel/#vbo_instancing_autocompressed_triangles The idea is that we always have a minimal example that's easier to debug (way easier than with an IFC model). Note that you'd need to change the primitive types on the SceneModel meshes in that example to indicate that they are solids. |
Attached is the result of how hatching looks on previous xkt model, the model provided by @xeolabs and a more simpler model. ![]() ![]() ![]() |
I'd suggest reorganizing commits a bit, to avoid introducing unstable state of the repository. |
Could it be possible to color or texturize the hatch depending on the IfcType of the object? |