The TKHelix toolkit provides comprehensive functionality for creating, approximating, and manipulating helix curves in OCCT. This toolkit enables the construction of complex helix geometries commonly used in mechanical engineering, manufacturing, and architectural applications.
The TKHelix toolkit is organized into two packages:
Provides geometric helix curve functionality:
Provides topological helix construction:
Interactive commands for helix creation and testing:
setaxis: Define helix axis orientationhelix: Create single-diameter helixcomphelix: Create multi-diameter helixspiral: Create spiral helix with varying diameterhelix2, comphelix2, spiral2: Alternative interfaces using number of turnsHelix curves are represented using parametric equations in cylindrical coordinates:
x(t) = r(t) * cos(t) y(t) = r(t) * sin(t) [* direction_factor] z(t) = pitch * t / (2π)
Where:
r(t) = r_start + taper_factor * t (radius as function of parameter)t is the angular parameter in radianspitch is the vertical distance per full turn (2π radians)direction_factor is 1 for clockwise, -1 for counter-clockwiseHelixGeom_BuilderHelixCoil builder; builder.SetCurveParameters(0.0, 4*M_PI, 10.0, 5.0, 0.0, Standard_True); builder.SetTolerance(1e-6); builder.Perform();
HelixGeom_BuilderHelixCoil builder; builder.SetCurveParameters(0.0, 6*M_PI, 15.0, 8.0, 0.1, Standard_True); builder.SetApproxParameters(GeomAbs_C2, 8, 100); builder.Perform();
HelixBRep_BuilderHelix builder; TColStd_Array1OfReal heights(1, 1); heights(1) = 50.0; TColStd_Array1OfReal pitches(1, 1); pitches(1) = 10.0; TColStd_Array1OfBoolean isPitches(1, 1); isPitches(1) = Standard_True; gp_Ax3 axis(gp_Pnt(0,0,0), gp_Dir(0,0,1), gp_Dir(1,0,0)); builder.SetParameters(axis, 25.0, heights, pitches, isPitches); builder.Perform(); TopoDS_Shape helixWire = builder.Shape();
The TKHelix toolkit depends on the following OCCT toolkits:
The toolkit includes comprehensive testing:
Test files are located in:
src/ModelingAlgorithms/TKHelix/GTests/ - Unit teststests/helix/ - TCL integration testsThe toolkit is fully integrated into the OCCT build system:
Common error status codes returned by algorithms:
Potential areas for future development: