USER FORUM

*(you are viewing a thread; or go back to
list of threads)*

**Enhancement idea : rotating angle**

*(by Mathieu)*

Hi!

Except if I don't use rotate feature correctly, I think it would be great to rotate a sketch with an angle less than 360°. This would simplify the model, avoiding rotate+boolean cut with another box.

Side point : I haven't found a list of planned features. Does't it exist ?

Thanks for that great simple CAD soft

Mathieu

Except if I don't use rotate feature correctly, I think it would be great to rotate a sketch with an angle less than 360°. This would simplify the model, avoiding rotate+boolean cut with another box.

Side point : I haven't found a list of planned features. Does't it exist ?

Thanks for that great simple CAD soft

Mathieu

**(no subject)**

*(by Paul)*

@Mathieu: Do you mean the lathe operation? Do you want it to revolve the sketch less than 360? I have been looking at the code for that but have not attempted it yet. If anyone else was planning to implement this don't let me thinking about it stop you ;-)

Conceptually it's simple. Existing revolve operations create four NURBS surface patches for each NURBS curve in the sketch. These surface patches each cover 90 degrees of the revolved surface. It actually only requires a surface every 120 degrees but most CAD software seem to do it every 90. After creating those surfaces we need to create end-caps which are just like the top and bottom of a straight extrusion but in a different orientation.

In practice there are some interesting issues. The weight (W) of the new control points depend on the cosine of the swept angle. Should the user have to specify the angle as a constant in the text window? If so I'm not yet sure how to update everything when that angle is changed. The weight W could also be computed by the solver in a way that allows the user to drag the end of the revolution to change the angle, or use an angle constraint or other method to do it. There are the subtle things that would need to be worked out.

Once this is done it would also be fun to try doing helical extrusions. It's not possible to represent those perfectly, but by using smaller segments (say 30 degrees) and sliding the points along an axis while rotating it may be possible to approximate it. I'm also interested in scaling the sketch as it is revolved which would allow modeling the volute of a centrifugal pump. But I digress. Implementing any of these features would be a good way to learn some of the solvespace internals. All of these would create 3D geometry without booleans so they would be more efficient too.

I just don't have the time to try this right now, and while I've compiled solvespace I have yet to do any actual hacking on it. If anyone else is interested in trying to implement these features but doesn't understand the code or how NURBS work we can talk about it. The code was surprisingly intuitive to read.

-Paul

Conceptually it's simple. Existing revolve operations create four NURBS surface patches for each NURBS curve in the sketch. These surface patches each cover 90 degrees of the revolved surface. It actually only requires a surface every 120 degrees but most CAD software seem to do it every 90. After creating those surfaces we need to create end-caps which are just like the top and bottom of a straight extrusion but in a different orientation.

In practice there are some interesting issues. The weight (W) of the new control points depend on the cosine of the swept angle. Should the user have to specify the angle as a constant in the text window? If so I'm not yet sure how to update everything when that angle is changed. The weight W could also be computed by the solver in a way that allows the user to drag the end of the revolution to change the angle, or use an angle constraint or other method to do it. There are the subtle things that would need to be worked out.

Once this is done it would also be fun to try doing helical extrusions. It's not possible to represent those perfectly, but by using smaller segments (say 30 degrees) and sliding the points along an axis while rotating it may be possible to approximate it. I'm also interested in scaling the sketch as it is revolved which would allow modeling the volute of a centrifugal pump. But I digress. Implementing any of these features would be a good way to learn some of the solvespace internals. All of these would create 3D geometry without booleans so they would be more efficient too.

I just don't have the time to try this right now, and while I've compiled solvespace I have yet to do any actual hacking on it. If anyone else is interested in trying to implement these features but doesn't understand the code or how NURBS work we can talk about it. The code was surprisingly intuitive to read.

-Paul

**(no subject)**

*(by Jonathan Westhues)*

One patch can represent up to (but not including) 180 degrees; so better to say that the minimum is three for a circle than 120 degrees for a patch. As the angle gets smaller, the patch fits more tightly within the convex hull or axis-aligned bounding box of the control points. That makes the first-pass intersection tests faster, and 90 degrees felt like a reasonable tradeoff.

Planned features are tracked on GitHub, and this has been a common request. The work would be more or less as you describe, and the most natural implementation would indeed let the solver determine the rotation angle. Stuff like control point weights is decoupled from the solver--you'd use the solver to determine the angle, and then the angle to determine the NURBS surfaces, same as we do e.g. with extrusion depth now.

Planned features are tracked on GitHub, and this has been a common request. The work would be more or less as you describe, and the most natural implementation would indeed let the solver determine the rotation angle. Stuff like control point weights is decoupled from the solver--you'd use the solver to determine the angle, and then the angle to determine the NURBS surfaces, same as we do e.g. with extrusion depth now.

**Post a reply to this comment:**