How can I set the hook length using "create_longitudinal_shape_with_user_hooks"? I could not find it.
- Forum
- CAD Parametric Modelling
- PythonParts
[Question] Adjusting hook length
Show most helpful answer Hide most helpful answer
Hi,
you can set the length by providing the start_hook and end_hook arguments with values higher than 0:
- When the values are higher than 0, they are understood as the desired length of the hook
- When the values are equal to 0, the hook length is calculated based on the current reinforcement standard
- When the values are equal to -1, no hook is created
Here's an example of a definition of a longitudinal rebar 6m long, with 15 cm hooks:
create_longitudinal_shape_with_user_hooks( length = 6000, model_angles = RotationAngles(0,0,0), shape_props = shape_props, concrete_cover_props = ConcreteCoverProperties.all(30), start_hook = 150.0, end_hook = 150.0, ) -> BendingShape
If you find a feature badly documented in 2024 Version, give it a try and have a look on 2025 version - many of the functions (but not all yet) are documented better there. This is the case with this function.
Also please give us feedback on good/bad documented functions/classes/feature by clicking the thumbs up/down at the bottom of the page. We can focus on things that matters.
Best,
Bart
Hi,
you can set the length by providing the start_hook and end_hook arguments with values higher than 0:
- When the values are higher than 0, they are understood as the desired length of the hook
- When the values are equal to 0, the hook length is calculated based on the current reinforcement standard
- When the values are equal to -1, no hook is created
Here's an example of a definition of a longitudinal rebar 6m long, with 15 cm hooks:
create_longitudinal_shape_with_user_hooks( length = 6000, model_angles = RotationAngles(0,0,0), shape_props = shape_props, concrete_cover_props = ConcreteCoverProperties.all(30), start_hook = 150.0, end_hook = 150.0, ) -> BendingShape
If you find a feature badly documented in 2024 Version, give it a try and have a look on 2025 version - many of the functions (but not all yet) are documented better there. This is the case with this function.
Also please give us feedback on good/bad documented functions/classes/feature by clicking the thumbs up/down at the bottom of the page. We can focus on things that matters.
Best,
Bart