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!
plgarcia
Posts: 281
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Sweep a selected sketch along a path or to other profiles

Postby plgarcia » Thu Oct 25, 2018 6:03 pm

This request aims to stabilize this function. I provide this for any use you feel usefull.
First FreeCAD version
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15007 (Git)
Build type: Release
Branch: master
Hash: 70fef3934190aabc61f5e1346483359d5ad21403
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/France (fr_FR)


The problem is that it does not work as expected as shown in the attached file. The intention is to make something like this:
Capture600.JPG
Capture600.JPG (46.74 KiB) Viewed 851 times
But this is not exactly what I wanted, I will explain later.
Capture601.JPG
Capture601.JPG (49.79 KiB) Viewed 851 times
3 – Now building the object:
Selecting SkectchProfile and clicking the tool in Part design workbench.
I have at this stage to make SkechPath visible.
Then in the task panel 2 times click on Add Edge and click on the edge on the view (the long one first, the curved one after.
The preview look like this what is exactly what I expect at this stage: The flat side outside.
Capture602.JPG
Capture602.JPG (82.08 KiB) Viewed 851 times
Capture604.JPG
Capture604.JPG (49.88 KiB) Viewed 851 times
I tried to change corner transition to something else, but FreeCAD entered in an infinite loop, and I add to kill the process, what is really a problem.

I have obtained other behaviors as the one shown at first image, what is not what I want.
The result is somehow unpredictable.

When clicking OK, I have got different results without understanding the conditions and what introduces these ifferences:
- A pipe (not solid)
- A solid
- A solid but the last part (corresponding to Edge 2) removed for the result.

Now the questions and remarks:
- What do I do wrong? (just in case I missed something)
- Should not for each edge add a boolean (reverse) to define in what direction it is to be gone throw, what will help to decide the direction of the normal vector?
- Obviously, the algorithm for rendering the preview is not the same as the algorithm for the final rendering, especially on the positioning. I do not understand what the logic for translating the sketch extruded is. Translating of not this shape has almost no effect. It would be good to clearly identify the point of the shape that will be kept on the path.
- test2 is build on test. I changed the position of SketchProfile and build another pipe. The first pipe has now errors that I cannot identify. Changing the profile to be extruded should change the shape but not induce errors!

I can help you in reproducing the case if needed.





Regards
Pascal Garcia
Last edited by plgarcia on Thu Oct 25, 2018 8:28 pm, edited 3 times in total.
chrisb
Posts: 16832
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Thu Oct 25, 2018 7:15 pm

It would be great if you could edit your post and enter the information directly. I don't have a word program at hand, but from what I can see there is nothing in the file that could not be done directly in one or two posts. To place images at a certain position you can use the "place inline" button.

Can you provide the file?

A short remark on your sketches which has probably nothing to do with your issue: You should avoid measures of 0. You can almost always use something else like horizontal or vertical or - in your case - point-on-object.
plgarcia
Posts: 281
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 » Thu Oct 25, 2018 8:22 pm

Thanks for taking the time for answering.
I take the advise.
Here are the files.
I hope the problem is enough described for the developers to identify the problems.

Regards
Pascal Garcia
Attachments
test2.FCStd
(60.85 KiB) Downloaded 16 times
test.FCStd
(49.77 KiB) Downloaded 16 times
plgarcia
Posts: 281
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 » Thu Oct 25, 2018 8:58 pm

I change the constraint 0 to coincidence point.
A ! marked appeared on the additivePipe.
Mark to recompute and F5 does noting.
Then right click-> edit and then OK.
Here is the error raized.
Capture605.JPG
Capture605.JPG (34.37 KiB) Viewed 841 times
1rst : Error in the tree is not enough to identify the problem.
2nd it may be due to the fact I rename one of the sketches at some point.

If I add a new pipe, the problem does not show when editing the second pipe just created. So it is probably due to the fact I rename the sketch at some point after the pipe has been created.

But with the 2 two additive pipes in the same body the menu item delete does not appear, and If I delete using del keyboard key, the message appears saying that the other pipe is links to this one, what is not true, only the sketch is linked.

I maintain an evolution to be able to have the 0 point (or a specified point) maintained on the path would be really great, so the sketch could be extruded on different paths.

When selecting "make independent copy", an error appears. When selecting "make dependent copy" no error appears.

Regards
Pascal Garcia
chrisb
Posts: 16832
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Thu Oct 25, 2018 9:01 pm

Everything works as designed. The problem is that the inside coming from one side is the outside from the other side. If you use two sweeps you can control what's in and what's out.
There is one more thing you could do to make your model clearer: You can move SketchPath inside the body and omit the ShapeBinder.
Attachments
test_cb.FCStd
(110.8 KiB) Downloaded 17 times
plgarcia
Posts: 281
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 » Fri Oct 26, 2018 8:38 am

Thank you for spending time.
I get the points of usage.

If you add the third edge, then you will see everything is reverted.

Your proposal is to duplicate the SketchProfile to revert it and then sweep this new sketch along the last segment. Correct?

It is not efficient for the user it complexify the design, an a boolean on every edge added would be simpler don't you think?

Take it for what it is, not a support request, but a report on a situation that I think should be addressed by FreeCAD. Up to you to

I simply propose 2 improvements:
- Add a boolean for the user to choose the direction the arc should be gone throw (and therefore chose the orientation of the nomal of the sketch).
- Add a boolean to use the zero point of the sketch on the path instead of having to place it at the start or the path.

Report situations that should be avoided:
- The reporting of errors depending on how the SketchProfile is "copied in the body".
- An infinite loop that lead to kill FreeCAD. Whatever the user does it should not happen. I understand it will always happen because of the technical complexity underneath, but any situation identified should be analyzed and the code changed not to fall into the trap. Eventually should FreeCAD team report bugs to OpenCascade if this is the cause.

I have also questions :
- How to make it solid? Sometime it is and sometimes not.


Regards
Pascal Garcia
chrisb
Posts: 16832
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Fri Oct 26, 2018 8:58 am

plgarcia wrote:
Fri Oct 26, 2018 8:38 am
- How to make it solid? Sometime it is and sometimes not.
In PartDesign it should always be. If it isn't it's an error, and you should upload an example. In Part workbench there is a checkbox controlling solidness.
plgarcia
Posts: 281
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 » Fri Oct 26, 2018 9:08 am

I would add some more words:
- On Sketch design there is no button (or it is not obvious) to change when one tool selected to selection, so when needed I close the sketch and reopen it.
plgarcia
Posts: 281
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 » Fri Oct 26, 2018 9:15 am

Then there is an error.
plgarcia
Posts: 281
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 » Fri Oct 26, 2018 9:31 am

I made a pipe and want to substract it to a cube (as example)

Substracting the the body end with an error, and substracting the pipe itself shows it is somehow not solid.

See example.
test.FCStd
(68.72 KiB) Downloaded 20 times