Modeling - Add optimized point-to-plane projection helper for batch processing#959
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an optimized helper for projecting multiple 3D points onto a plane by pre-computing the plane basis and avoiding redundant gp_Trsf overhead for each point projection.
Key Changes:
- Adds a new
PlaneProjectorstruct that caches plane origin and direction components - Replaces two instances of
ElSLib::Parameterscalls with the optimized projector for batch pole projection
| double OX, OY, OZ; //!< Plane origin | ||
| double DXx, DXy, DXz; //!< X direction components | ||
| double DYx, DYy, DYz; //!< Y direction components |
There was a problem hiding this comment.
Struct member fields should follow the FieldVariableName naming pattern according to OCCT conventions. These fields should be renamed: OX → OriginX, OY → OriginY, OZ → OriginZ, DXx → XDirectionX, DXy → XDirectionY, DXz → XDirectionZ, DYx → YDirectionX, DYy → YDirectionY, DYz → YDirectionZ.
| //! Pre-computes plane basis for efficient batch projection of multiple points. | ||
| struct PlaneProjector | ||
| { | ||
| double OX, OY, OZ; //!< Plane origin |
There was a problem hiding this comment.
Use Standard_Real instead of double for consistency with OCCT conventions. While Standard_Real is a typedef to double, using the OCCT type ensures consistency across the codebase and makes the code's intent clearer.
| double DXx, DXy, DXz; //!< X direction components | ||
| double DYx, DYy, DYz; //!< Y direction components | ||
|
|
||
| //! Initialize from plane position. |
There was a problem hiding this comment.
The constructor parameter thePos should be documented with a Doxygen comment explaining its purpose (e.g., @param thePos [in] plane coordinate system).
| //! Initialize from plane position. | |
| //! Initialize from plane position. | |
| //! @param thePos [in] plane coordinate system defining origin and in-plane directions. |
No description provided.