ThatOpen / engine_web-ifc

Reading and writing IFC files with Javascript, at native speeds.
https://thatopen.github.io/engine_web-ifc/demo
Mozilla Public License 2.0
573 stars 170 forks source link

Refactor mesh_utils methods to use constant references for parameter passing #861

Closed mantunezr closed 1 week ago

mantunezr commented 3 weeks ago

Refactored several methods in the mesh_utils module to pass parameters by constant reference instead of by value. This change improves performance by avoiding unnecessary copies and enhances code readability and maintainability. All affected methods now take const references for input parameters where applicable.

mantunezr commented 2 weeks ago

Solution issue 520

This is the initial state:

initial_state

End state after pull request:

end_state

There is a part of the geometry wrong. I have seen the file in other viewers and this problem exists too. I believe that the problem is in the definition of one of the NURBSs.

warnings

The method inverse_method of nurbs class, is inefficient. It remains the same. I have tried to optimize it with the method get_approximation, but I didn't get it.