Giter Site home page Giter Site logo

components's Introduction

TOC | documentation | demo | community | npm package

cover

Open BIM Components

NPM Package NPM Package Tests

This library is a collection of BIM tools based on Three.js and other libraries. It includes pre-made features to easily build browser-based 3D BIM applications, such as postproduction, dimensions, floorplan navigation, DXF export and much more.

Usage

You need to be familiar with Three.js API to be able to use this library effectively. In the following example, we will create a cube in a 3D scene that can be navigated with the mouse or touch events. You can see the full example here and the deployed app here.

import * as THREE from "three";
import * as OBC from "openbim-components";

// Get the <div> element where the scene will be displayed

const container = document.getElementById('container');

// Initialize the basic components needed to use this library

const components = new OBC.Components();

components.scene = new OBC.SimpleScene(components);
components._renderer = new OBC.SimpleRenderer(components, container);
components.camera = new OBC.SimpleCamera(components);
components.raycaster = new OBC.SimpleRaycaster(components);

components.init();

// Add some elements to the scene

components.scene.setup();

const scene = components.scene.get();

const geometry = new THREE.BoxGeometry(3, 3, 3);
const material = new THREE.MeshStandardMaterial({ color: "red" });
const cube = new THREE.Mesh(geometry, material);
cube.position.set(0, 1.5, 0);
scene.add(cube);

components.meshes.push(cube);

components's People

Contributors

agviegas avatar aka-blackboots avatar cytostatic avatar danizep avatar davidgtl avatar emmeongoingammuaroi avatar felipemore96 avatar github-actions[bot] avatar harrycollin avatar hoyosjuan avatar jsanchez4 avatar lewibs avatar madsholten avatar manuelromer avatar oxcabe avatar pylgrym avatar quimmoya avatar rocha442 avatar tristanlecallier avatar wlinna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

components's Issues

Test new feature

Description ๐Ÿ“

This is a test issue!

Suggested solution ๐Ÿ’ก

No idea!

Alternative โ›•

Whdkfjaksdjfakjdfka

Additional context โ˜๏ธ

Whdkfjaksdjfakjdfka

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Colour palette texture atlas for merged geometries

Description ๐Ÿ“

Generate a simple colour palette texture to replace multiple materials in merged geometries. With some simple UV mapping you map entire sections of a merged geometry to single pixels on a texture. This results in a single draw call for that geometry instead of n draw calls for n colours.

This could also be applied to instanced items to keep the number of unique materials to one. Although the benefits become less noticeable.

Suggested solution ๐Ÿ’ก

Based on the colours found in a merged geometry generate a small texture with a resolution of 1 x (unique colours) and UV map items to pixels in this texture. Additional pixel padding might be needed.

Alternative โ›•

No response

Additional context โ˜๏ธ

This approach can be found in many 2D games where a larger texture atlas is used for many sprites. Resulting in fewer draw calls.

Example texture atlas:
image

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

missing elements

Describe the bug ๐Ÿ“

missing elements in tooeen
20230614_missing_elements

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

--

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

SimpleDimensionLine - looks like Autodesk Forge

Description ๐Ÿ“

I want to integrate this tool looks like Autodesk Forge Measurement .
image

Suggested solution ๐Ÿ’ก

I can handle that, but i can not fork branch "big -restructure". And i want to access this function https://github.com/IFCjs/components/blob/big-restructure/src/core/Components/index.ts#L131 to make the width of line dimension none- change when we zoom out/in

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Clipping planes for civil projects

Description ๐Ÿ“

The clipping planes tools is awesome, but it's not suited for civil projects. It would be nice to have a similar tool for roads project, so that the clipping plane adapts to the axis of the road automatically.

Suggested solution ๐Ÿ’ก

Create an extension of the current clipping plane that adapts its orientation to a Three.js curve.

Alternative โ›•

No response

Additional context โ˜๏ธ

This is crucial for companies working mainly with civil projects.

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Culling doesn't update when using FPS mode.

When moving around in FPS mode I noticed that culling no longer updates. We can either connect these events or reintroduce a periodic culling update as previously implemented.

wishlist from umdaschgroup

Description ๐Ÿ“

  1. BIG IFC models to upload and view it as fast as possible
  2. Import and Export IFC2x3 CV2.0 and IFC4.3 (*it would be nice to show the structural analytical view, including .ifczip format
  3. What we really need is to display the geometrical and non-geometrical information accurately in web IFC viewer.
    20220208_Autodesk_Support_BaseQuantities_Gross_and_NetVolume_Error_02

a. Autodesk BIM360 or ACC viewer fails to open the geometry of IFC (see. Attached images- model geometry error), we would like to avoid this problem
20210519_Image01_IFC_Model_GeoemtryError_in_ACC

b. When the origin of model is far over 100 km away, we found that Autodesk BIM360 or ACC viewer fails to display the object accurate.. (see. Attached images- model geometry error),
20210521_Image03_IFC_Model_Geometry_Error_in_ACC

c. Orthographic & perspective view mode, as well as overriding shaded colour options
d. IfcPresentationLayerAssignment information in the model tree
e. 3D viewCube and zoom options
f. Selected item graphic display (Highlight selected item and have the option to show unselected items in transparent or wireframed view)
g. Overlay PDF drawings

  1. Create Parameter and PropertySet
    a. If we can create the addtional IfcParameter and PropertySet would be great. For example, we need Quanity parameters and values, however, we get sometimes without the Quantity parameter and values from the clients. We use simplebim or IfcOpenShell to add the Quantity parameters and values at the momentโ€ฆ It would be great if Tooeen can have the same features.
  2. Federating the Ifc Models.
    a. We would like to keep the different IfcBuilding within one IfcSite when we federate the models (see. Attached example of simplebim and solibri/ IfcModelStructure)
    20210908_IfcModelStructure_Solibri
    20210908_IfcModelStructure_simplebim

b. When we federate the models, we would like to have a good federated building storey structure
c. Custom model tree โ€“ to show both federated Ifc Model structure and individual Ifc model structure
6) Merging model
a. We have to merge different Ifc files and export as a one model from time to time. At the moment, we use simplebim for it. Can we have this feature?
7) CDE feature
a. I like the idea to connect with SharePoint for example. Then we could really use Tooeen as CDE (Common Data Environment) to upload not only IFC models

  1. Modifying Element Property
    a. Re-assign IfcBuildingStorey
    b. If we can automize the reassigning IfcBuildingStorey based on the element elevation would be great.
    c. Re-assign IfcClass. For example, we get many IfcBuildingElementProxy from our clients. It would be nice if we can re-assign the Ifc Entity and Type according to the buildingSMART classificaiton
    d. Modifying the existing parameter values

  2. Clear Documentation to find out the information of the codes.

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Fails for models with no levels

I have some mechanical IFC models from Aveva that load fine in web-ifc. Since they don't contain levels, however, they do not work with fragments. I am looking through the code and I can see that none of the items are considered unique and hence they are handled by the processMergedItems method on the DataConverter. this._spatialStructure.itemsByFloor[instance.id] returns undefined for all instances, and that seems to create issues further down the line...

Unfortunately, I cannot share the file.

Double-sided materials

DoubleSided materials are not rendered correctly.

Issue

Below you see an example of the glTF taken directly from the zip loaded in an online viewer and here there is no problem.
image

The following fragments zip can be used for testing:
Duplex.zip

I tried making the following changes to fragment-ifc-importer/geometry.ts with no luck

private sortGeometriesByMaterials(
    geometryData: WEBIFC.PlacedGeometry,
    geometry: THREE.BufferGeometry
  ) {
    const materialID = this.saveMaterials(geometryData);
    if (!this._geometriesByMaterial[materialID]) {
      this._geometriesByMaterial[materialID] = [geometry];
    } else {
      this._geometriesByMaterial[materialID].push(geometry);
    }
    geometry.computeVertexNormals(); <----ADDED
  }

private saveNewMaterial(colorID: string, color: WEBIFC.Color) {
    console.log("SaveNewMat")
    this._materials[colorID] = new THREE.MeshLambertMaterial({
      color: new THREE.Color(color.x, color.y, color.z),
      transparent: color.w !== 1,
      opacity: color.w,
      side: THREE.DoubleSide <----ADDED
    });
}

Adapt culling to only read pixels when GPU is ready

https://github.com/IFCjs/components/blob/278bab5592e6875f0a7128823790a90c65d9e41b/library/src/fragment/fragment-culling.ts#L167

We can adapt this behaviour to only read the pixels when the GPU is ready. As far as I understand the function renderer.readRenderTargetPixels() is synchronous and will block everything until the GPU has fully finished rendering. In testing, I noticed this caused a significant delay of at least 15ms on my machine. With the snippet below, we can delay this function call until the GPU is ready. Credit goes to this Stackoverflow answer for the snippet.

// Here a piece of code for checking if the GPU is ready before doing readpixels, place this after the draw
this.webGLSync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);
 
// Then you can check if the samples are ready with
checkSamplesReady() {
 return this.gl.clientWaitSync(this.webGLSync, 0, 0) === this.gl.CONDITION_SATISFIED;
}

I've tested a version of this locally and looks to be working. I will make a PR with the implementation soon.

FragmentProperties.add fails when if not all properties have a "type

Describe the bug ๐Ÿ“

The following line will fail if for some reason the item doesn't have type. This could happen if web-ifc reports Invalid IFC Line: #####

image

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

openbim-components": "1.0.0-alpha.42",

Used Package Manager ๐Ÿ“ฆ

yarn

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

pSet Properties is not working.

Description ๐Ÿ“

https://github.com/IFCjs/components/blob/big-restructure/src/ifc/IfcPropertiesUtils/index.ts#L8
I am working with this feature but not get the success. Can you help me on this please?
I am using the **Advance IFC JS course for implementation. **

There is error when it's matching the type of property. Somewhere "IFCPROJECT" is matching with type.
Used the Defined the functions for pSet:

image1

image2

I tried with static expressID but it is also giving the error, see above screenshots.

image4

image5 image6 image7

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Culling doesn't behave correctly with tone mapping

Fragment culling doesn't work when tone mapping is enabled on the renderer. This is likely due to the rendered frame not matching the RGB colours originally assigned. A simple fix is to set the renderer to use NoToneMapping before rendering the culling update. Alternatively we can create a new renderer specifically for culling.

Edit: this also applies when toneMappingExposure is not set to 1.0

IfcSpace Information in plan view

Description ๐Ÿ“

can we display also the room information in 2d plan view?
2023-06-27 00_58_50-Tooeen weekly - 16_roomName

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Issues with geometry of an IFC

Describe the bug ๐Ÿ“

Hi I finished the advanced course of IFC.js using react. I managed to load differents IFC without errors except this one. There is parts of the IFC that are missing from the model. If I use the web-ifc demo the parts are showing perfectly. I'm using the latest openbim-components package showed in the course (0.0.51) that has web-ifc version 0.0.36.

247638326-74bc956e-c25c-4e1c-a15e-53d7cfe56e0a
247638343-08e6c9ff-4082-450b-9c49-bf61a463b8f5

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

--

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

--

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Error in Floorplans views

Describe the bug ๐Ÿ“

When the app uses the floorplan navigator, it doesnโ€™t work like it should be. I saw in the documentation that the elevation itโ€™s defined by the SceneHeigth parameter, but when the fragments are generated in the model, this value is always the same. Even throw I change the elevation calculation by using the Elevation.value parameter, it takes me to a wrong level. What can be happening? Thanks!
Cap01
Cap02

Reproduction โ–ถ๏ธ

https://github.com/RASRC/Pruebas_Varias

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

openbim-components

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Test feature

Description ๐Ÿ“

This is a test feature!

Suggested solution ๐Ÿ’ก

kdjfakdsjfla

Alternative โ›•

djfaldjsfla

Additional context โ˜๏ธ

djfkaldlfalj

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Allow disabling the UI for all components

Description ๐Ÿ“

While using the FragmentManager and FragmentCacher an unexpected UI appeared when TAB was pressed.

Screenshot 2023-09-14 at 11 06 47

Digging a bit on the code it was possible to understand that UI and listeners are instantiated without actively being requested by the developer.

That said, would be cool to have a way to centrally enable/disable the UI.

Suggested solution ๐Ÿ’ก

components.ui.enabled = false could centrally specify that the UI should be disabled

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Measurement tools in 2D views

Description ๐Ÿ“

Including longitude, slope and areas. Both for floorplans and sections.

Suggested solution ๐Ÿ’ก

Make existing measurement tools ergonomic to be used for 2D views.

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Link to documentation (in readme) doesn't work

Describe the bug ๐Ÿ“

Hello,

When I click the link "documentation" on the page below, I receive the error: "page not found".

https://github.com/IFCjs/components

Can this link be changed to a working one?

Best regards,

Tim de Louw

Reproduction โ–ถ๏ธ

https://github.com/IFCjs/components

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

-

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Smart property aggregator

Description ๐Ÿ“

Select multiple items and allow to aggregate their properties parametrically. E.g. select many windows, and get the sum of their surface area.

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

clipper.styles.create does not allow me to use 'new Set()' as an argument or more than 1 material

https://github.com/IFCjs/components/blob/3330ceb545d9aac735868613304509371c2700d8/src/fragments/FragmentPlans/index.html#L100

The only thing that works with the clipper.styles.create is this:
floorplanClipper.styles.create( "filled", [], // 1. an empty array like previous releases (1.0.0-alpha.54) instead of the new Set() like in (1.0.0-alpha.62) sectionMaterial, // 2. Just one simple material. );

Otherwise I get these errors:

1. For the new Set() : 
Argument of type 'Set<unknown>' is not assignable to parameter of type 'THREE.Mesh[]'.

Type 'Set' is missing the following properties from type 'THREE.Mesh[]': length, pop, push, concat, and 26 more.

2. if I add more than 1 material as an argument: 

Argument of type 'Set' is not assignable to parameter of type 'THREE.Mesh[]'.
Type 'Set' is missing the following properties from type 'THREE.Mesh[]': length, pop, push, concat, and 26 more.

Model_View_UI (orthographic mode & perspective)_and_ColourOverride

Description ๐Ÿ“

Orthographic & perspective view mode, as well as shaded colour options
2023-05-04 11_04_38_ModelViewUIandColourOverride

Suggested solution ๐Ÿ’ก

can we override the colour of each IfcEntity?
this will give us to display multiple ifc models from the different platform in consistent graphics.
I like this feature in Solibri for example.

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

IFC 2x3 TC1_Structural Analysis View (MVD)

Description ๐Ÿ“

can we enable to show the MVD of the Structural Analysis View?
This will help the structural engineers to collaborate the analytical model in IFC format.
There are no commercial IFC viewers offers this MVD to display... In fact, it will help a lot for the collaboration between the structural engineers.
2023-05-04 12_00_57_ IFC 2x3 TC1_Structural Analysis View_notSupporting

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

ViewCube Display And Zoom

Description ๐Ÿ“

when model is far, tooeen does not show the model, or perhaps it loads the model but we cannot find it or zoom to the model.
2023-05-04 10_47_06_DisplayAndZoom

Suggested solution ๐Ÿ’ก

perhaps, view cube will help us to find the element like most of 3D software does... when we select item from the model tree, we could click on the viewCube for allowing to zoom it to the selected item(s)

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Section / PK navigator for civil models

Description ๐Ÿ“

The library already has a floorplan navigator that works for buildings. It would be nice to have a similar feature to navigate sections in civil models. It should also allow to generate a section for each PK in the model.

Suggested solution ๐Ÿ’ก

Create a SectionNavigator similar to the PlanNavigator.

Alternative โ›•

No response

Additional context โ˜๏ธ

This would be really helpful for civil models.

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Incorrect geometries of the window openings

Describe the bug ๐Ÿ“

window openings of the model is incorrect.
the geometry is not correct in comparison to the other ifc viewer
20230614_incorrect_geometries_of_the_window_openings

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

..

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Fragment groups to intersect when using filters

There is a method under Fragment.group to get groups based on their names, this is an example fragments.groups.get({ floor: "ground floor", category: "IFCWALL" }). It should be nice if we don't get all walls and all elements at ground flood, but instead just all floors in ground floor.

Wrong coordinates of each models

Describe the bug ๐Ÿ“

when model is federated, the coordinates system is not refer to the model origin.
20230614_wrong_coordinates_of_each_models

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

--

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Sort levels by height for exploding tool

Describe the bug ๐Ÿ“

I'm having some problems with the explode tool.

It appears to don't work well with levels that have negative elevation (I mean that this levels are positioned below the IFC origin). The elements are displayed in an incorrect position above the origin when you explode the model like in the screen captures.
There is something I can do to fix it? Thanks!
Cap02
Cap03

Reproduction โ–ถ๏ธ

https://github.com/RASRC/FrontEnd_Course.git

Steps to reproduce ๐Ÿ”ข

Activating the explode tool in the bottom menu of the app

System Info ๐Ÿ’ป

openbim-components

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

IFC Viewer: Not showing the same view, Missing some fragments/objects.

Describe the bug ๐Ÿ“

I found another issue with IFC Viewer. Same file I checked in in our code as well I checked in different portal (first and second images), It is not showing same.
And in Our Viewer, it is different, some Fragments/Objects are not visible (third and fourth images).

MicrosoftTeams-image (2)

BV-2 1 2

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

openbim-components

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

IfcPresentationLayerAssignment

Description ๐Ÿ“

we would like to show the information of in the model tree, like in Solibri.
This is important because some of our clients use their CAD layer structure for their FM system. Ifc model could contain IfcPresentationLayerAssignment, therefore, it would be nice to filter the elements based on this information from the model tree.

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

components.scene.setup() is not a function

Describe the bug ๐Ÿ“

I see this command being used in the tutorial path for setting up the lights: components.scene.setup()
however, the console shows a message telling me that this command is not a function

image

image

It has an easy fix [const light = new THREE.AmbientLight(0x404040); scene.add(light);] from the user side though

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

follow the tutorial path

System Info ๐Ÿ’ป

openbim-components

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

import Formats

Description ๐Ÿ“

More formats to import especially for the 2D PDF or 2D DWG Plan import, as well as .ifczip format.
2023-05-04 12_16_03_importFormats

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Issue within loading two o more IFC models with the same coordinates.

Describe the bug ๐Ÿ“

Hi I finished the advanced course of IFC.js. In the viewer I'm loading two models which has the same coordinates but it doesn't show an alignment between them in the viewer. I tested these two models in BIM Collab Zoom (second picture) and it shows like I expect. I tested these two models in the web-ifc-viewer demo and it shows like I expect (third picture). I'm using the latest openbim-components package showed in the course (0.0.51) that has web-ifc version 0.0.36.
ifcmodel1
BIMCollab
ifcmodel2

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

--

System Info ๐Ÿ’ป

--

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Test - new feature

Description ๐Ÿ“

asdfa

Suggested solution ๐Ÿ’ก

adfad

Alternative โ›•

adsfa

Additional context โ˜๏ธ

afsdfasda

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Implement UMD support

Hi,

IFCJs/Components it generates only ESM output. It could be good to create a "Rollup" configuration to implement UMD support.

Error while loading package with Vite

We're trying to import the package and build it with vite but get this error:

Error:   Failed to scan for dependencies from entries: 
  C:/apps/sta-bimviewer/bim-viewer/index.html

  X [ERROR] Failed to resolve entry for package "openbim-components". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]


    node_modules/esbuild/lib/main.js:1360:21:
      1360 โ”‚         let result = await callback({
           โ•ต                      ^

    at packageEntryFailure (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:23384:11)
    at resolvePackageEntry (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:23381:5)
    at tryNodeResolve (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:23115:20)
    at Context.resolveId (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:22

                                                                                                                       2876:28)
    at Object.resolveId (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:428
                                                                                                                       805:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async resolve (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:43104:
                                                                                                                       :26)
    at async file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:43278:34       
    at async requestCallbacks.on-resolve (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1360:22)    
    at async handleRequest (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:723:13)

  This error came from the "onResolve" callback registered here:

    node_modules/esbuild/lib/main.js:1279:20:
      1279 โ”‚       let promise = setup({
           โ•ต                     ^

    at setup (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.js:43268:19)     
    at handlePlugins (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1279:21)
    at buildOrContextImpl (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:968:5)
    at Object.buildOrContext (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:776:5)
    at C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:2172:68
    at new Promise (<anonymous>)
    at Object.context (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:2172:27)
    at Object.context (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:2012:58)
    at prepareEsbuildScanner (file:///C:/apps/sta-bimviewer/bim-viewer/node_modules/vite/dist/node/chunks/dep-a178814b.j
                                                                                                                       js:43055:26)

  The plugin "vite:dep-scan" was triggered by this import

    src/managers/IfcManager.ts:8:75:
      8 โ”‚ ...roup, Fragments, PostproductionRenderer} from "openbim-components";
        โ•ต                                                  ~~~~~~~~~~~~~~~~~~~~


    at failureErrorWithLog (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1636:15)
    at C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1048:25
    at runOnEndCallbacks (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1471:45)
    at buildResponseToResult (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1046:7)
    at C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1058:9
    at new Promise (<anonymous>)
    at requestCallbacks.on-end (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:1057:54)
    at handleRequest (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:723:19)
    at handleIncomingPacket (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:745:7)
    at Socket.readFromStdout (C:\apps\sta-bimviewer\bim-viewer\node_modules\esbuild\lib\main.js:673:7)
Failed to resolve entry for package "openbim-components". The package may have incorrect main/module/exports specified in its package.json.

pSet Properties is not working.

Describe the bug ๐Ÿ“

https://github.com/IFCjs/components/blob/big-restructure/src/ifc/IfcPropertiesUtils/index.ts#L8
I am working with this feature but not get the success. Can you help me on this please?
I am using the **Advance IFC JS course for implementation. **

There is error when it's matching the type of property. Somewhere "IFCPROJECT" is matching with type.
Used the Defined the functions for pSet:

image

image

I tried with static expressID but it is also giving the error, see above screenshots.

image

image

image

image

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

No response

System Info ๐Ÿ’ป

openbim-components

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Optimize .frag format

Description ๐Ÿ“

Right now there is a lot of information in the format that is unoptimized (e.g. the express-fragment-map.json repeats a lot of strings instead of encoding them). Optimizing this will be critical for bigger models.

Suggested solution ๐Ÿ’ก

Include everything in the .frag file (geometry, properties and others), and optimize the structures that can be optimized (such as the express-fragments-map).

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Selected_Item_Display

Description ๐Ÿ“

Selected item graphic display - could we isolate the selected item(s).. perhaps, we can make unselected items in transparent mode or wire framed mode.
2023-05-04 10_42_33_SelectedItemDisplay

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Maximum call stack size exceeded

Describe the bug ๐Ÿ“

when initializing the components from the boilerplate code I receive a Maximum call stack size exceeded RangeError:
image

I'm using the boilerplater :

// Initialize the basic components
const container = document.getElementById("container");
const components = new Components();
//console.log(components);
components.scene = new SimpleScene(components);
components.renderer = new SimpleRenderer(components, container);
components.camera = new SimpleCamera(components);
components.raycaster = new SimpleRaycaster(components);
components.init();

// Add some elements to the scene
const scene = components.scene.get();

const geometry = new BoxGeometry(3, 3, 3);
const material = MeshStandardMaterial({ color: "red" });

const cube = new Mesh(geometry, material);
cube.position.set(0, 1.5, 0);
scene.add(cube);

components.meshes.push(cube);

Dependencies
image

Reproduction โ–ถ๏ธ

No response

Steps to reproduce ๐Ÿ”ข

Type the boilerplate
execute the init() command from the component class

System Info ๐Ÿ’ป

--sytem

Used Package Manager ๐Ÿ“ฆ

npm

Error Trace/Logs ๐Ÿ“ƒ

Uncaught RangeError: Maximum call stack size exceede

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Point cloud support

Description ๐Ÿ“

Point clouds are present in many use cases of the built environment. Especially, it would be interesting to be able to open E57 and LAS files.

Suggested solution ๐Ÿ’ก

There are some libraries available to make it possible:

E57:

LAS:

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Custom model tree for the multiple IFC files

Description ๐Ÿ“

2023-05-04 10_09_14_ModelTreeForTheMultipleModels

Custom model tree โ€“ to show both federated Ifc Model structure and individual Ifc model structure
Can we also have option to move the model or orient the model origin as well as the orientation of the building?

Suggested solution ๐Ÿ’ก

No response

Alternative โ›•

No response

Additional context โ˜๏ธ

No response

Validations โœ…

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.