Hello, I have some problem with pipeshell, documentation is not complete,
I have found this:
https://forum.freecadweb.org/viewtopic. ... 39#p168339
But the post is very old.
And say that there is no infomration:
meanwhile, I have found this:
https://dev.opencascade.org/doc/occt-7. ... 688390c4da
and deduced something in the txt file include.
It is simply a copy and paste with some deduction.
Meanwhile I'm experimenting, but having mixed results, maybe the shapes are not correct and maybe I could put a MWE (Minimal Working Example) of the errors I have.
Maybe it is outdated and substituted by more manageable method.
Anyone know something about it?.
EDIT
Here a minimal example:
The problem are some artifacts left and how to tune profile or path position to cut a regular Groove following the profile, like you will do when you made a shaped frame with router.
END EDIT
Regards
Carlo D.
Help about BRepOffsetAPI.makePipeShell usage.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Help about BRepOffsetAPI.makePipeShell usage.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Help about BRepOffsetAPI.makePipeShell usage.
I did not know about this BRepOffsetAPI. That looks very interesting. Here is how I would have done, but the results are the same:
The results using the Gui are also the same when making a solid sweep of the rotated profile along the path object. There are self intersections at the corners.
Perhaps with a larger radius the self intersection can be avoided.
Or by aligning the profile to the outside of the path rather than to the inside.
Then you need to reduce the path to get the same final geometry.
Code: Select all
rotated = profile.rotated(FreeCAD.Vector(0,0,0),FreeCAD.Vector(1,0,0),90)
Part.show(rotated,"rotated")
pipe = path.makePipeShell([rotated],True, False)# solid = True, Frenet = False
Part.show(pipe,"pipe")
Perhaps with a larger radius the self intersection can be avoided.
Or by aligning the profile to the outside of the path rather than to the inside.
Then you need to reduce the path to get the same final geometry.
- Attachments
-
- pipeshell.FCStd
- (31.94 KiB) Downloaded 27 times
Re: Help about BRepOffsetAPI.makePipeShell usage.
Many thanks, I've had the same thinking, about the rotation position, but stupidly I have done some experimenting, surely in the wrong way.
NOTE: I don't mark as solved as it will be interesting maybe have some other comments. (hoping by some developers or @wmayer, @chrisb, @Chris_G I think are the most skilled in these sort of thing.)
BRepOffsetAPI.makePipeShell I think it is used internally by many sweep tools, that maybe make some assumption, at a first glance it is very customizable, in terms of parameters.
In fact a first glance to the differences between OCCT C API and FreeCAD show that many SetMode options are explicitly set as separate options.
As I'm not very skilled in mathematics, I've not be able to guess the trihedron thing, and related.
I think that SetMaxDegree, SetMaxSegments, setToleranceand setForceApproxC1 seems to be interesting to tune the "sweep".
But this is matter of other experiments.
Many thanks again and best regards.
Carlo D.
NOTE: I don't mark as solved as it will be interesting maybe have some other comments. (hoping by some developers or @wmayer, @chrisb, @Chris_G I think are the most skilled in these sort of thing.)
BRepOffsetAPI.makePipeShell I think it is used internally by many sweep tools, that maybe make some assumption, at a first glance it is very customizable, in terms of parameters.
In fact a first glance to the differences between OCCT C API and FreeCAD show that many SetMode options are explicitly set as separate options.
As I'm not very skilled in mathematics, I've not be able to guess the trihedron thing, and related.
I think that SetMaxDegree, SetMaxSegments, setToleranceand setForceApproxC1 seems to be interesting to tune the "sweep".
But this is matter of other experiments.
Many thanks again and best regards.
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Help about BRepOffsetAPI.makePipeShell usage.
Hi,
As you have already experienced, I think one golden rule is to try to design the path that has the highest curvatures, that is the most in the inside of the turns, to avoid to challenge the pipe algorithm with auto-intersections.
I tested the possibilities of BRepOffsetAPI.makePipeShell(), but I am not sure I fully understood all the modes
In Curves workbench I used 2 tools :
- Pipeshell Profile is a wrapper above a profile object to add the Location, Contact, Correction properties used in the add() method of pipeShell
- Pipeshell that uses these profiles
Although it offers many options, I finally stopped playing with it before understanding it completely.
As you have already experienced, I think one golden rule is to try to design the path that has the highest curvatures, that is the most in the inside of the turns, to avoid to challenge the pipe algorithm with auto-intersections.
I tested the possibilities of BRepOffsetAPI.makePipeShell(), but I am not sure I fully understood all the modes
In Curves workbench I used 2 tools :
- Pipeshell Profile is a wrapper above a profile object to add the Location, Contact, Correction properties used in the add() method of pipeShell
- Pipeshell that uses these profiles
Although it offers many options, I finally stopped playing with it before understanding it completely.
Re: Help about BRepOffsetAPI.makePipeShell usage.
Thanks for answering, it's ever a pleasure to ear something from you, (side note: I've learned many thing reading your posts, many thanks.)Chris_G wrote: ↑Thu Jan 20, 2022 4:08 pm Hi,
As you have already experienced, I think one golden rule is to try to design the path that has the highest curvatures, that is the most in the inside of the turns, to avoid to challenge the pipe algorithm with auto-intersections.
....
Although it offers many options, I finally stopped playing with it before understanding it completely.
Other things, like trihedron and such obscure thing, are beyond my mathematical skills.
If some math expert would try to explain to my old brain things, I will be pleased to increase my knowledge, but maybe it will take some time to have a clear idea, i'm not very young (>50) so the brain is not very "elastic".
Many Thanks, from now, I have found some things, taken from the OCCT page for 7.5.0 and put them in the txt file included in the first post.
At least some findings, about the .add() are that (obj, True, True) is not the best way to position things, as the accurate placement is vanished by
"WithContact" and "WithCorrection", as it seem to also center the shape on the spline.
for corners, i don't know this code:.Add(Profile, WithContact = Standard_False, WithCorrection = Standard_False)
Adds the section Profile to this framework. First and last sections may be punctual, so the shape Profile may be both wire
and vertex. Correspondent point on spine is computed automatically.
- WithContact is true, the section is translated to be in contact with the spine.
- WithCorrection is true, the section is rotated to be orthogonal to the spine?s tangent in the correspondent point.
This option has no sense if the section is punctual (Profile is of type TopoDS_Vertex).
gave this result:
It is almost perfect, a small radius on the corners help to make smooth things, and some maths around will make a decent parametric object.
Some lengths have to be added around, so there is many small amounts (like 0.1, 0.25, and so on) to avoid fails on some fillets calculations.
As the resulting has to be 3d printed, such small tolerances are not a problem.
I'm tempted to try to use similar technique to create fillets, on complex shapes, this is another experiment to be done.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/