View Issue Details

IDProjectCategoryView StatusLast Update
0000248FreeCADFeaturepublic2012-04-28 10:23
ReporterunauthenticatedAssigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version0.13 
Summary0000248: make the "revolve-axis" selectable
DescriptionWould be nice if one could select the axis which is used for revolving.
So one would draw a line (maybe only in construction mode) and when using the revolve function one can just select (just clicking on the line??) the line and use it as the "revolve-axis" to revolve the drawing around this line/axis.
TagsNo tags attached.

Activities

Jriegel

2011-03-10 16:26

administrator   ~0000724

Sounds unusual for me, all CADs I know rotate a Sketch around its
horizontal axis... IMO thats enough, cause you can move the Sketch...

unauthenticated

2011-03-10 19:23

viewer   ~0000725

The problem is if I need the axis to be on a certain position I have to move the sketch trying to meet the axis. Is it at least atm possible to make the revolve-axis (horizontal axis) visible? What if one needs the revolve-axis beeng 2.3mm from a certain point?
By just drawing the revolve axis you can place the axis on a certain position that you need and then revolve around it.

pperisin

2011-03-11 14:18

reporter   ~0000727

Hi,

If revolve happens around X, Y or Z axis, check out this topic:
http://forum.freecadweb.org/viewtopic.php?f=3&t=722

Over there you can see how to show origin of the coordinate system, and if you play a little, you can make visible all 3 axis

Regards,
Petar Perisin

unauthenticated

2011-03-12 10:58

viewer   ~0000728

Last edited: 2011-03-13 10:27

Thanks pperisin for the link. The problem is it's only possible in Python :) (->I can't code in Python). I attached a image which should explain what I was thinking about.
I also had another idea. What about coloring the axis of the Grid in Sketcher and add the Sketcher axis as a selectable axis for revolving?

edit: I guess it would be better to select the line first and pressing the "Select" button after. When the "Select" button is pressed the values of X,Y,Z are changed and hitting OK will confirm.

2011-03-12 10:59

 

revolve_2.png (Attachment missing)

Jriegel

2011-03-13 22:36

administrator   ~0000731

I still dont get it....

Revolve works always around the main axis. why one would use
a completely free defined axis is out of my understanding....

pperisin

2011-03-14 14:06

reporter   ~0000732

it is not the point about choosing the axis. The point is that the man wants the axis VISIBLE on the GUI. So that he knows (sees) what it will revolve around, and that he can work with it.

Regards,
Petar Perisin

pperisin

2011-03-14 15:09

reporter   ~0000733

OK, mr unathenticated, I think I have something that can help you :-)

1 - we will be creating new macro
Go to Tools >> Macros...
A new dialog will appear. Over there choose "Create"

For the name in the new dialog write "axis"

Command line for macro recording will appear. Over there copy-Paste this code (you do not have to know what this means)


from pivy import coin
try:
   Gui.ActiveDocument.ActiveView.getSceneGraph().removeChild(axisCross)
except:
   axisCross=coin.SoType.fromName("SoShapeScale").createInstance()
   axisCross.setPart("shape", coin.SoType.fromName("SoAxisCrossKit").createInstance())
   axisCross.scaleFactor.setValue(10) # modify this value to make origin bigger or smaller
   axis=axisCross.getPart("shape",0)
   cone=axis.getPart("xHead.shape",0)
   cone.bottomRadius.setValue(0.5) # modify this value to make arrow wider or thinner
   Gui.ActiveDocument.ActiveView.getSceneGraph().addChild(axisCross)
else:
   del axisCross



Do not forget to click File >> Save after you copy-pasted the code.
Now you have created a macro.



2 - We will be assigning this macro to a toolbar button.

Go to Tools >> Customize
A new dialog will appear. Choose "Macros" tab.

Over there you should see "axis.FCMacro" in the popup menu.
 
In the first text box under popup menu write "axis", and the next three can remain empty (they are toolbar help, so you can write anything you want in them).

In Piximap(click on ... button) choose toolbar button for this macro.

After you did this (we only assigned a name and toolbar button) click add. you should see "axis" on the left side of the dialog.


3 - we will create new toolbar and add this botton to it
Now go to "Toolbar" tab at the top of this dialog (this tab is in the same dialog just before the "Macros" tab).

On the left side make sure "Complete" workbench is selected in the popup menu.

click on "Add". Give new toolbar some name - maybe "mybar"

On the left side in the popup menu select macros. you should see axis here.

now you need to select "Axis" on the left side and "mybar" on the right side and click on the "->" (arrow from left to right) button between them.

Right now "axis" toolbar button should be part of "mybar" toolbar.

Click close.


Right now you should see new toolbar with new button, and if you click on it once it will turn on axes, and if you click on it once after that it will hide axes.


If you can not see new toolbar, make sure "Complete" workbench is selected. It this workbench is selected right click on any toolbar area and make sure "mybar" is enabled.


It sounds more complicated than it really is. Hope you can get it right. If you get stuck on any part ask ahead.

Regards,
Petar Perisin

pperisin

2011-03-16 14:49

reporter   ~0000738

Hi,

I think this one can be closed.

Regards,
Petar Perisin

wmayer

2012-04-28 10:23

administrator   ~0001975

git show f44a17a

Issue History

Date Modified Username Field Change
2011-01-22 10:33 unauthenticated New Issue
2011-03-10 16:26 Jriegel Note Added: 0000724
2011-03-10 19:23 unauthenticated Note Added: 0000725
2011-03-11 14:18 pperisin Note Added: 0000727
2011-03-12 10:58 unauthenticated Note Added: 0000728
2011-03-12 10:59 unauthenticated File Added: revolve_2.png
2011-03-13 10:27 unauthenticated Note Edited: 0000728
2011-03-13 22:36 Jriegel Note Added: 0000731
2011-03-14 14:06 pperisin Note Added: 0000732
2011-03-14 15:09 pperisin Note Added: 0000733
2011-03-16 14:49 pperisin Note Added: 0000738
2012-04-28 10:23 wmayer Note Added: 0001975
2012-04-28 10:23 wmayer Status new => closed
2012-04-28 10:23 wmayer Resolution open => fixed
2012-04-28 10:23 wmayer Fixed in Version => 0.13