Ticket #2187 - Unusable Wire from Section
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Ticket #2187 - Unusable Wire from Section
Hello,
attached you can find a macro creating eventually two sweeps.
The sweep result with the standard helix is ok, but trying to use the special helix, created by a section, ends in an ugly structure.
What are the exact steps to get a correct wire (path) for the sweep out of a section?
Or is my approach to get the special helix and sweep completely wrong? I tried to follow the hints
on http://blogs.solidworks.com/solidworksb ... rings.html
Many thanks for your help.
attached you can find a macro creating eventually two sweeps.
The sweep result with the standard helix is ok, but trying to use the special helix, created by a section, ends in an ugly structure.
What are the exact steps to get a correct wire (path) for the sweep out of a section?
Or is my approach to get the special helix and sweep completely wrong? I tried to follow the hints
on http://blogs.solidworks.com/solidworksb ... rings.html
Many thanks for your help.
- Attachments
-
- Path0904.txt
- Please rename the extension from .txt to .FCMacro
- (8.17 KiB) Downloaded 83 times
Last edited by frwi5432 on Thu Jul 09, 2015 7:37 am, edited 1 time in total.
Regards,
Willy
Willy
Re: Unusable Wire from Section
the solidworks guys have gone the easy way: with a circle as profile the profile orientation becomes irrelevant and always works. Your sweep does work with frenet=false flawless, so you could easily reproduce the solid works example. Of course with your triangle profile orientation becomes relevant.
Now I'm not totally sure what the problem with the path is, but the frenet formula seems to completely fail with it. I was able to get the desired result with a binormal profile orientation mode, however, this is not yet exposed to the freecad python api. It only exists in the experimental part design branch.
Now I'm not totally sure what the problem with the path is, but the frenet formula seems to completely fail with it. I was able to get the desired result with a binormal profile orientation mode, however, this is not yet exposed to the freecad python api. It only exists in the experimental part design branch.
Re: Unusable Wire from Section
ickby,ickby wrote:the solidworks guys have gone the easy way: with a circle as profile the profile orientation becomes irrelevant and always works. Your sweep does work with frenet=false flawless, so you could easily reproduce the solid works example. Of course with your triangle profile orientation becomes relevant.
Now I'm not totally sure what the problem with the path is, but the frenet formula seems to completely fail with it. I was able to get the desired result with a binormal profile orientation mode, however, this is not yet exposed to the freecad python api. It only exists in the experimental part design branch.
that's correct with Frenet=False the sweep is ok.
My conclusion is, that the Sweep-Tool has a bug. Should I report it?
Unfortunately a circle as sketch and Frenet=False are no options for me.
Is there a way to verify if the path is valid? Or a way to recompute it to a valid wire?
What are now my possibilities? Is there another way to get the desired structure with the existing tools?
I just created the bug report http://www.freecadweb.org/tracker/view.php?id=2187
Regards,
Willy
Willy
Re: Unusable Wire from Section
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: Unusable Wire from Section
That is not a valid conclusion. It is quite likely that the orientation is correctly calculated for the frenet orientation, and that the correct result is just not what you expect. Further analysis is needed to see why the result looks like it does.My conclusion is, that the Sweep-Tool has a bug. Should I report it?
Starting from the frenet-seret formulas https://en.wikipedia.org/wiki/Frenet%E2 ... t_formulas you could analyse your path by calculating the frame at a few positions where the direction changes happen for th eprofile. Maybe you get some insight why this change occurs and from there can find out what is wrong with the profile. (or maybe in your calculation the frenet-serret frame is always correct and the sweep tool has a bug)
Re: Unusable Wire from Section
Quick question: What is the verdict with issue #2187 then? Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Unusable Wire from Section
Sorry, forgot to quote ickbyickby wrote:That is not a valid conclusion. It is quite likely that the orientation is correctly calculated for the frenet orientation, and that the correct result is just not what you expect. Further analysis is needed to see why the result looks like it does.My conclusion is, that the Sweep-Tool has a bug. Should I report it?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Unusable Wire from Section
Hi,
The red spiral, in the above picture, is made of 4 BsplineCurves of degree 1 :
Edge 1, with 1026 poles
Edge 2, with 1026 poles
Edge 3, with 2463 poles
Edge 4, with 1003 poles
If I try to pick a normal somewhere on the first edge, I get :
That should explain why Frenet mode is failing.
The solution is probably to discretize the faulty wire and recreate a clean BSplineCurve by interpoation or approximation.
But is it a FreeCAD bug ?
Maybe the Sweep tool should check the sweep path more strictly ?
The red spiral, in the above picture, is made of 4 BsplineCurves of degree 1 :
Edge 1, with 1026 poles
Edge 2, with 1026 poles
Edge 3, with 2463 poles
Edge 4, with 1003 poles
If I try to pick a normal somewhere on the first edge, I get :
Code: Select all
>>> elt.normalAt(600)
Traceback (most recent call last):
File "<input>", line 1, in <module>
Part.OCCError: LProp_CLProps::Normal(...):Curvature is null or infinity
The solution is probably to discretize the faulty wire and recreate a clean BSplineCurve by interpoation or approximation.
But is it a FreeCAD bug ?
Maybe the Sweep tool should check the sweep path more strictly ?
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Unusable Wire from Section
This is why I created Macro Section some while ago.
Re: Unusable Wire from Section
Inquiring about the fate of issue #2187. Please weigh in. Is it a bug?
Chris_G wrote: The solution is probably to discretize the faulty wire and recreate a clean BSplineCurve by interpoation or approximation.
But is it a FreeCAD bug ?
Maybe the Sweep tool should check the sweep path more strictly ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs