Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mariwan »

Fillet without using FreeCAD-Fillet (OCCT) tool:

I updated the Design456_Paint to allow making fillet. You see in the video how it works.
Simply draw the fillet-way you want, the fillet-size you want and extrude-Subtract it.
You can later change, move the whole thing as they are normal FreeCAD objects (not simplified).
As I show you in the video, one of the fillet in the middle of the box was not aligned correctly .. I moved the Z-axis.

Keep in mine that you need to choose the correct plane and correct view. After placing the Paint .. you can do whatever you want. At the moment the paint-elements are 3D object .. You need to select a Face not the whole fillet-paint to extrude it.
I might change that to 2D objects in the future.
phpBB [video]
Attachments
box.FCStd
(79.15 KiB) Downloaded 35 times
Last edited by mariwan on Sun Nov 14, 2021 8:21 am, edited 1 time in total.
paullee
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by paullee »

Awesome :D There is progress every week !
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mariwan »

I am happy to show you the new 3D COIN3D widget. It is for move, rotate, and other tools that I will make.
The old wheel-widget is not so pretty .. actually it ugly :x

The new widget is at my devbranch .. will be merged to main when I finish the EdgeExtend tool.
But you can already use it if you want.

I hope it help to prettier rotation drawings for FreeCAD.
Configurations:
1-Color
2-Opacity
3-Distance of the arrows to the placement point (vector)
4-callback system
Using the callback, you can do all kind of operations required. It is a flexible widget.

Will be improved also as soon as I feel it needs more options and more arrows-type (drawings). Keep tuned.
phpBB [video]


Note:
Rotation mechanism (callback) is complex .. I have to work on that quite a bit. For the wheel widget it works somehow .. but it is not perfect. This will be also the same. I need to put some effort to fix it.
And this callback might be a part of the widget as user shouldn't care about it .. User is interested only for the angle of rotation of the pads.

So simple is the code for drawing them.

Code: Select all

import ThreeDWidgets.fr_three_arrows_widget as wd
import ThreeDWidgets.fr_coinwindow as wnn
mywin = wnn.Fr_CoinWindow()

vectors=[App.Vector(0,0,0), App.Vector(0,0,0)] 
root=wd.Fr_ThreeArrows_Widget(vectors,"Test")

mywin.addWidget(root)
mywin.show()
Edit:
There were some bugs and might still be there.. I am working on the widget and the ExtendEdge .. soon this should be OK. Sorry for that

Added to the new tool .
phpBB [video]
paullee
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by paullee »

Looks really nice !

Hope I learn how to do that too :)
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mariwan »

paullee wrote: Tue Nov 30, 2021 5:13 pm Looks really nice !

Hope I learn how to do that too :)
It is very easy. Look at my ExtendEdge tool. I made good progress and you can look at the file how I make the callbacks.
Not difficult. One time if you know how to use it. And it is almost just COPY-PASTE :)
mario52
Veteran
Posts: 4672
Joined: Wed May 16, 2012 2:13 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mario52 »

Hi

good progress

just one remark , you must invert the circle red and the circle green for obtain the same of the blue circle Z

(arrow to the face circle )

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mariwan »

mario52 wrote: Wed Dec 01, 2021 10:36 am Hi

good progress

just one remark , you must invert the circle red and the circle green for obtain the same of the blue circle Z

(arrow to the face circle )

mario
Thanks and :oops: You are right .. I changed it.
Now, you can even disable the pads .. default is disabled. not always you need it.
This widget will be improved .. specially with the usage.
Still I didn't implement the rotation .. that will come with the new tool I am planning after EdgeExtend.
Regards,
Attachments
test.JPG
test.JPG (192.57 KiB) Viewed 1856 times
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mariwan »

I released today the Design456_EdgeExtend tool.
This is one of the real manipulation tools that I must implement for direct modeling.
The modification applies to the object ONLY when you press OK.
Old object is removed (not hided). Be aware .

1-I removed the rotation pads since they are not necessary for this tool. There is an API that enable it for the widget if you use it for other purpose. It will be used for my next tool . Face manipulation.

2-You are limited by X,Y, and Z directions. Free Movement I would consider to get request of that otherwise I don't allow
3-I didn't divide the faces that has only one Vertex of the edge. These might became invalid if the movement is not in their direction. Please let me know what to do :
a. Shall I divide the face to 2 Triangles as 123D Design do?
b. Or you know how to fix the problematic object creates by the tool. I attached a file that the faces are not valid. Please let me know how I can in python fix the issue. I use both sew and tolerance tool (please look at my code if you want)

WARNING!
All Tweak tools are dangerous. Undo-Redo is not implemented yet. Be careful when you use them. Try it on temp object before applying the tool on real objects.
And remember that I don't have so much time to test my tools. I would love to hear what you think, suggestions, bug ..etc.


Edit:
Added Undo, Fixed three-arrows widget . Now it shows the label correctly and give you the length of the edge-movement. All are merged to Main branch.
Attachments
invalid.FCStd
(37.95 KiB) Downloaded 34 times
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by mariwan »

I made a test, and actually the objects are fine. So, there are times the objects fails to be valid solid and other times not.
Hope you enjoy the video.
Please if you want to check the objects, try it and let me know if you have any comments.
Still I don't know why the COIN3D faces becomes so dark. Some investigation is required :(
Thanks.
phpBB [video]
Attachments
valid.FCStd
(71.34 KiB) Downloaded 28 times
paullee
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Progress thread of New Design456 Workbench - FreeCAD's Direct Modeling workbench

Post by paullee »

mariwan wrote: Tue Nov 30, 2021 7:04 pm It is very easy. Look at my ExtendEdge tool. I made good progress and you can look at the file how I make the callbacks.
Not difficult. One time if you know how to use it. And it is almost just COPY-PASTE :)
Thanks! Trying to search 'ExtendEdge' in your WB *.py but seems nothing :)

Any file I should be looking into ?
Post Reply