Sweep a selected sketch along a path or to other profiles

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
chrisb
Posts: 11401
Joined: Tue Mar 17, 2015 9:14 am

Re: Sweep a selected sketch along a path or to other profiles

Postby chrisb » Mon Oct 29, 2018 11:57 pm

plgarcia wrote:
Mon Oct 29, 2018 11:06 pm
^R on mac!
Cmd+R on a mac!
User avatar
NormandC
Posts: 16982
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sweep a selected sketch along a path or to other profiles

Postby NormandC » Tue Oct 30, 2018 5:34 am

chrisb wrote:
Mon Oct 29, 2018 5:18 pm
Changing to another graphics kernel than OCC might be a good idea, but the proposal might be a toothless tiger:
Minor correction: OCC is a geometric kernel, not a graphics kernel. Graphics is managed by the Coin3D library.

chrisb wrote:
Mon Oct 29, 2018 5:18 pm
- Is there a replacement out there?
None that would have an open source license. I don't count CGAL (used in OpenSCAD) as a geometric kernel; it's more of a mathematics algorithms library, missing too much stuff essential in the CAD world (like fillets and chamfers! Loft! Sweep! STEP and IGES import/export! and on and on).

chrisb wrote:
Mon Oct 29, 2018 5:18 pm
- How much effort will it take to move?
Assuming another open source kernel would suddenly become available: GIGANTIC. FreeCAD is intricately linked to OCC. I used to read CAD blogs (most of them are closed down now), and there was this gentleman who was the lead developer for Solid Edge for almost 20 years and he was often providing information in comments. In the early years they switched their geometric kernel from ACIS to Parasolid. If I'm not mistaken this may have required thousands of man-hours.
Last edited by NormandC on Tue Oct 30, 2018 6:29 am, edited 1 time in total.
User avatar
NormandC
Posts: 16982
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sweep a selected sketch along a path or to other profiles

Postby NormandC » Tue Oct 30, 2018 6:28 am

plgarcia wrote:
Mon Oct 29, 2018 10:49 am
I also know SolidCAD, Fusion360 and many other software are proprietary,
Again with SolidCAD, could you please post a link, I'm curious. I searched again, and the only reference to SolidCAD I can find is not software, it's an Autodesk vendor.

plgarcia wrote:
Mon Oct 29, 2018 4:15 pm
Here is the OpenSCAD script.
(snip)
I made duplicates, the manifold is not valid.
Could you please edit your post and place the script inside code brackets? It would make your reply easier to read, and the code easier to copy.

You are probably having the same issue as in FreeCAD: tangent/co-planar faces. Please have a look at this old article about OpenSCAD which gives the same exact advice we give here for FreeCAD.

I Heart Robotics: OpenSCAD Tip: Manifold Space and Time

I saved your script, opened it in OpenSCAD and compiled it (damn it is slow), exported it to .scad then imported it in FreeCAD. Unfortunately, I've had issues with import, by default cylinders are imported as prisms (this is OpenSCAD's fault, cylinders are not really cylinders but prisms :roll: ). This can be changed in the OpenSCAD workbench's preferences (in FreeCAD) so that a prism with more than n number of faces is converted to a cylinder, but then the import is flaky, FreeCAD crashed on me twice.

I started replacing prisms with cylinders, but I have only one done for now. I may abandon this idea, what I really want to do is see if I can model this from scratch in FreeCAD, and maybe document the issues I encounter. But I can't read your OpenSCAD script, it's just gibberish to me. I'm a CAD operator, not a programmer.

The OpenSCAD script converted to a FreeCAD file, on Google Drive because it's too big to attach here: plgarcia_part2.fcstd (2.4MB)
plgarcia
Posts: 275
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: Sweep a selected sketch along a path or to other profiles

Postby plgarcia » Wed Oct 31, 2018 9:38 pm

Hello,
Sorry for the delay. It took some time to digest everything. And apologize as I was really upset even if thee is a part of truth in what I was complaining about.

Sorry I mixed words.
I was thinking about solidworks and not solidcad.

The point is that I have been able quickly to reach a state with SolidCAD I almost never reach with FreeCAD, and you are right there are some little problem on tangent faces also, but not as important as in FreeCAD. FreeCAD does not give much explanation when it encounters a problem.

Based on what I experienced, knowing where the problem would occur, and with the advises of you, I have had a new try and built a new model with FreeCAD directly.

I build first the global shape of the phalanx.
- The main cylinder,
- Subtraction of 2 cubes to remove the chamfers,
- Adding 2 half spheres at each end
- Removing form all this:
o 2 half spheres
o 2 cylinder (to make the axis)
o A cube (to remove one part that all along the phalanx that will be designed later as a cover.
o And (that is one very important thing) a last cube (cube001) that makes a groove all along the phalanx and remove a region of the phalanx where it used to be different tangency in the previous designs.

Here is the result. Just to understand, I added a small view to show the way two successive phalanx will be articulated one on the other:
Capture801.JPG
Capture801.JPG (27.99 KiB) Viewed 72 times
Good but the easy point.

Now I have to remove the grooves in which the tendons will circulate.
- I designed a pipe in one bit not to have hopefully problems of tangencies where the different sections join. Here is the pipe, build along the path in that order: A first strait line, the first second and third arcs, and the last line. The order I gave is a continuous order from start to the end of the path. The capture set with transparencies show the profile extruded, the path and the pipe transparent. I will come back on this pipe at the end because there is a lot to say and I still do not understand what is the logic to extrude. But OK I made the pipe I wanted after 4 versions of the profile to have the correct orientation.
- I added to this pipe a small piece (subtraction of a cylinder to a cube) to remove future complex intersections in this area.
Capture802.JPG
Capture802.JPG (33.92 KiB) Viewed 72 times
All this is subtracted to the shape.
I also made a compound of phalanx1 named phalanx2 I moved to place it to see the join of the finger.
Capture803.JPG
Capture803.JPG (49.28 KiB) Viewed 72 times
But to obtain that result I have had also to add a micron here and another somewhere else, and 2 again on another dimension, etc. I have had to anticipate by removing the difficult areas (the groove at the beginning of the design and the extra bow added to the body). I did not create the body with different pipes so no tangency problem has been encountered. May be also a bit of luck, may be also some improvement (this last test has been done with the very last version of FreeCAD), and also the help of you guys giving some tricks). The result at this stage is quite what I wanted to obtain. There are still some behaviors of the pipes not understandable and surely some improvement to be made. Anyway thanks for your patience.

Now a word on the pipe.
Here is an assembly of captures done during the constitution of the pipe:
Capture810.JPG
Capture810.JPG (107.19 KiB) Viewed 72 times
1 selecting first edge: The pipe does not start at the beginning of the path! The profile is taken with its original orientation what I feel normal.
2 – What is this strange shape? Why? The orientation of the profile is still the same.

3 – Selecting the 3rrd segment: The shape now starts where I was expecting. The profile is reversed!

4 & 5 : Adding the 2 last segment of the path It continues as with the 3rd step.

What I would have expected is the profile to be put at the beginning of the path without changing the orientation, and then be along the path staying normal to the path.

I maintain that an option to state that the profile is to be maintained on the path would be of a great help. Here one must put it a t the right place.
I have had to change the shape of the profile 3 times after having set the pipe the first time until I get the right pipe.

Find the new test file if of interest for somebody. Surely for the body and pipe issues may be.
test4.FCStd
(253.06 KiB) Downloaded 1 time
Regards
Pascal Garcia