[SOLVED]Maybe revolve is not the right tool for this action?
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
[SOLVED]Maybe revolve is not the right tool for this action?
I am trying and trying to figure out how revolve could do a similar extrusion (green part). It fails and I am not able to figure out how to do that.
The direction and Axis is not doing what I expect to do.
Don't know how to do that, Sweep might do that? not sure either.
If Revolve, or Sweep cannot do that .. what other tools are there? don't think there are any
The direction and Axis is not doing what I expect to do.
Don't know how to do that, Sweep might do that? not sure either.
If Revolve, or Sweep cannot do that .. what other tools are there? don't think there are any
- Attachments
-
- revolve.jpg (27.37 KiB) Viewed 2229 times
Last edited by mariwan on Fri Oct 22, 2021 9:07 pm, edited 1 time in total.
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
Re: Maybe revolve is not the right tool for this action?
Revolve seems to work...
- Attachments
-
- RevolveExamp.FCStd
- (27.97 KiB) Downloaded 34 times
-
- Snip macro screenshot-08f03b.png (122.28 KiB) Viewed 2211 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Maybe revolve is not the right tool for this action?
Looks like it is not the Revolve that doesn't work, but rather your modeling. Further help may be possible with mor - much more - details from your side.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Maybe revolve is not the right tool for this action?
My WB is on the github. The tools is called (Design456_SmartExtrudeRotate) in the devbranch please.
I even have many videos showing the tool I am working on.
I extract the face selected, and that face should be extruded (using revolve) as the picture shown.
Now:
1-How should I calculate the axis?
2-How should I calculate the base?
I used normalVector as direction, I used subtraction of vectors from lower-edge and addition of the two vectors/2 . All seems to fail.
It works for Cube but not for any other faces it has an angle.
I am out of ideas really.
I tested sweep now.. Seems to works better. But I have to draw a hidden curve (circle that I decide the start-end angle) and sweep it. Might work better than revolve.
Don't know really how to fix that.
Please download the WB and try the tool by yourself to understand the problems I have.
and look at the video shown on my youtube channel.
I appreciate any ideas help me to solve this complex issue.
I even have many videos showing the tool I am working on.
I extract the face selected, and that face should be extruded (using revolve) as the picture shown.
Now:
1-How should I calculate the axis?
2-How should I calculate the base?
I used normalVector as direction, I used subtraction of vectors from lower-edge and addition of the two vectors/2 . All seems to fail.
It works for Cube but not for any other faces it has an angle.
I am out of ideas really.
I tested sweep now.. Seems to works better. But I have to draw a hidden curve (circle that I decide the start-end angle) and sweep it. Might work better than revolve.
Don't know really how to fix that.
Please download the WB and try the tool by yourself to understand the problems I have.
and look at the video shown on my youtube channel.
Code: Select all
r=s.revolve(App.Vector(10,10,0),App.Vector(0,1,0), 360)
^ ^
Last edited by mariwan on Sun Oct 17, 2021 8:24 pm, edited 1 time in total.
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
Re: Maybe revolve is not the right tool for this action?
In that file, what does decide the radius of the rotation? Not sure how it calculates?
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
Re: Maybe revolve is not the right tool for this action?
The radius is the rotation axis. This can be a standard origin line or a dutum line. The Gui allows you to pick.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Maybe revolve is not the right tool for this action?
Do you add the Part::Revolution object or do the revolve in python? If you add the object you can set its AxisLink property to a selected edge. It also needs a 2D object as its Source property. For that you can make a copy of the selected face (or a draft facebinder) and put that as a document object to serve as the Source. Workflow for user would be select Face and select Edge to serve as axis. He can then modify the Angle property afterwards or do it in your code.
Usage: select first the face, then the edge to use as axis, then run macro. No error checking is done in the example code. Presumption is user has selected first face, then edge.
Code: Select all
import Draft
selx = Gui.Selection.getSelectionEx()
face = selx[0].SubObjects[0]
edge = selx[-1].SubObjects[-1]
binder = Draft.makeFacebinder(selx[0])
rev = FreeCAD.ActiveDocument.addObject("Part::Revolution","Revolve")
rev.Source = binder
rev.AxisLink = (selx[-1].Object,selx[-1].SubElementNames[-1])
rev.Angle = 90
FreeCAD.ActiveDocument.recompute()
Usage: select first the face, then the edge to use as axis, then run macro. No error checking is done in the example code. Presumption is user has selected first face, then edge.
Re: Maybe revolve is not the right tool for this action?
Thanks,
Actually, if you look to the videos I have, the user should select a face and the other actions I should do in my code. User only rotate the wheel and the face should be created.
To do so I have to :
1-Find the axis which should be the lower side of the selected face (last edge anti-clockwise) . That edge should be used as the Axis. How can I change edge to axis?
2-I need to find the direction. Direction when you have square is easy. If the face is on the normal (x,y,z) direction. But as soon as the face has a slope and has an angle I am lost. How can you get the direction?
If I can fix those two values, It is not a matter if I use python or the Part.Revolve . Both should work.
What I do, when user rotates the wheel, I change the angle for the revolve and I recreate the object. (either by changing it for Part.Revolve or to recreate if it is python revolve).
I wish to avoid allowing the user to click the edge. At least for this tool. I want to find it by my code. I might make another tool which you select and decide ho you revolve.
I have it working on some faces, but as soon as the face has other shapes than the cube .. It is failing (Pyramid, Dodecahedron ..etc)
Please if you can help me to find out how I should find the direction and the Axis .. would be grate.
FYI:
My extrusion works in finding the direction. The same tool uses that. But now you have to find the axis which is 90degree to the extrusion-direction, which I don't know how to find it.
Please look at my video you understand better.
Actually, if you look to the videos I have, the user should select a face and the other actions I should do in my code. User only rotate the wheel and the face should be created.
To do so I have to :
1-Find the axis which should be the lower side of the selected face (last edge anti-clockwise) . That edge should be used as the Axis. How can I change edge to axis?
2-I need to find the direction. Direction when you have square is easy. If the face is on the normal (x,y,z) direction. But as soon as the face has a slope and has an angle I am lost. How can you get the direction?
If I can fix those two values, It is not a matter if I use python or the Part.Revolve . Both should work.
What I do, when user rotates the wheel, I change the angle for the revolve and I recreate the object. (either by changing it for Part.Revolve or to recreate if it is python revolve).
I wish to avoid allowing the user to click the edge. At least for this tool. I want to find it by my code. I might make another tool which you select and decide ho you revolve.
I have it working on some faces, but as soon as the face has other shapes than the cube .. It is failing (Pyramid, Dodecahedron ..etc)
Please if you can help me to find out how I should find the direction and the Axis .. would be grate.
FYI:
My extrusion works in finding the direction. The same tool uses that. But now you have to find the axis which is 90degree to the extrusion-direction, which I don't know how to find it.
Please look at my video you understand better.
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
Re: Maybe revolve is not the right tool for this action?
I think you should have a look at sheetmetal workbench bend tool...
follow my experiments on BIM modelling for architecture design
Re: Maybe revolve is not the right tool for this action?
I have to thank you alot. You saved me
Yes, the direction is correct.
But I have problem with my wheel widget. I have to fix it. I tried many many things before I get to this point. It is hard .. and don't have time to work continuously. ..
Look at the video please but the wheel is totally failing ..the direction of the rotation only is correct not the wheel..
Design456 Direct Modeling. Coin3D GUI Toolkit. Objects get simplified.
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_
https://github.com/MariwanJ/Design456 - https://wiki.freecadweb.org/Design456_Workbench
https://www.youtube.com/watch?v=6agcHPd ... utbTDH93m_