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.
LHC
Posts: 239
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canada

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

Postby LHC » Wed Sep 08, 2021 1:57 pm

Hi - I'm following this development and just had a look at your installation - looks good ! Keep up the good work :)
User avatar
marja1
Posts: 265
Joined: Wed Jan 06, 2021 2:00 pm

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

Postby marja1 » Thu Sep 09, 2021 8:30 pm

Thank you @LHC,

New update in the Smart Extrude.
I had a big problem regarding finding objects in the document. App.ActiveDocument.Objects bring you things that is not what you draw inside the document. You have to filter out them.
Was difficult to understand.
There is something left and need to be fixed. but in general extrude-merge , extrude-cut is working.

More testing and bug hunting required.
Another bug that FreeCAD has, when you have different objects with transparency and you merge, cut them .. when you put the transparency of the produced object to 0 , it doesn't reset all of them.. so you get some of your parts still with transparency colors.

Look at the tool. It is pushed to the main .. so update your copy.

https://youtu.be/9at7Cq1BnTg
Attachments
extrude-cut.JPG
extrude-cut.JPG (75.07 KiB) Viewed 827 times
User avatar
marja1
Posts: 265
Joined: Wed Jan 06, 2021 2:00 pm

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

Postby marja1 » Sat Sep 11, 2021 4:31 pm

SmartExtrude works for many faces but when the face has no angle it fails.
I need to find a way to calculate the angle.
See the video.

Code: Select all

https://youtu.be/mHYloULuOUI
User avatar
marja1
Posts: 265
Joined: Wed Jan 06, 2021 2:00 pm

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

Postby marja1 » Sun Sep 12, 2021 9:39 am

Release of Smart Extrude:

How it works:
We have to recreate the object each time we change the radius.
This means that the redrawing must be optimized later. Maybe if someday we change this to cpp make that issue be resolved.

1-If we have a 2D face, we just extrude it.
2-If we have a face from a 3D object, we extract that face and extrude it
3-Created object either it will remain as a new object or would be merged.
But if it is used as a tool to cut another 3D object, the object will disappear.
Known issue:
There are circumstances where this tool will fail. Pushing is not correct yet.
Pushing should be developed later.
To find out where this tool fails in other places I need to get help from FreeCAD community.
Please report the bugs to my github.
Thanks.

https://youtu.be/rvbkx-esfqk
Attachments
smartExtrude.JPG
smartExtrude.JPG (160.47 KiB) Viewed 641 times
User avatar
marja1
Posts: 265
Joined: Wed Jan 06, 2021 2:00 pm

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

Postby marja1 » Sun Sep 12, 2021 12:48 pm

Adding DocObserver to draw plane when file opened or created.
Long time didn't know how to do that.

Thanks go to @OpenBrain and others who answered the thread
https://forum.freecadweb.org/viewtopic. ... 5&start=10
that helped me to understand the concept.

I looked even to this thread to understand more how it works.

https://forum.freecadweb.org/viewtopic. ... =3&t=36709
Smiling_user
Posts: 180
Joined: Tue Jul 28, 2020 7:31 am

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

Postby Smiling_user » Tue Sep 14, 2021 7:14 am

FreeCAD 0.19. Windows 7 x64

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23463 (Git)
Build type: Release
Branch: master
Hash: adc6db8f32c17e9f67cb82aa7962d1e42ce061c6
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Code: Select all

Python 3.6.8 (v3.6.8:3c6b436a57, Mar 26 2019, 15:45:44) [MSC v.1916 64 bit (AMD64)] on win32
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> ### Begin command Std_Workbench
>>> Gui.activateWorkbench("Design456_Workbench")
>>> ### End command Std_Workbench
>>> 

Code: Select all

10:25:41  No module named 'dataclasses'
10:25:41  Traceback (most recent call last):
  File "<string>", line 58, in Initialize
  File "E:\FreeCAD\FreeCAD\Mod\Design456\DirectModeling\directModelingCommands.py", line 27, in <module>
    import DirectModeling.Design456_SmartScale
  File "E:\FreeCAD\FreeCAD\Mod\Design456\DirectModeling\Design456_SmartScale.py", line 36, in <module>
    import ThreeDWidgets.fr_line_widget as wlin
  File "E:\FreeCAD\FreeCAD\Mod\Design456\ThreeDWidgets\fr_line_widget.py", line 33, in <module>
    from ThreeDWidgets import fr_draw
  File "E:\FreeCAD\FreeCAD\Mod\Design456\ThreeDWidgets\fr_draw.py", line 39, in <module>
    from dataclasses import dataclass
User avatar
marja1
Posts: 265
Joined: Wed Jan 06, 2021 2:00 pm

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

Postby marja1 » Tue Sep 14, 2021 2:26 pm

Smiling_user wrote: Tue Sep 14, 2021 7:14 am
Please use latest weekly build. It is a python issue in your freecad that dosent have the latest libraries.

https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds
Smiling_user
Posts: 180
Joined: Tue Jul 28, 2020 7:31 am

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

Postby Smiling_user » Tue Sep 14, 2021 9:22 pm

Grateful for your answer, but.... the 0.20. of this week did not work for me under win 7x64.
Will try under Linux.
User avatar
marja1
Posts: 265
Joined: Wed Jan 06, 2021 2:00 pm

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

Postby marja1 » Fri Sep 17, 2021 8:49 pm

New FR_WIDGET - Fr_Wheel_Widget:

This widget will be used to rotate, move, extrusion by rotating a face .. and many more tools. The video shows one kind of the widget. There will be a 3D dimension version of it.
I discovered the draw_label wasn't so proper. I have to re-write it.
At the moment you cannot control the label well using only 2 vertices.
Keep tuned for further tools based on this widget.
https://youtu.be/i0dKk49dloU
Attachments
fr_wheel_widget.JPG
fr_wheel_widget.JPG (95.39 KiB) Viewed 115 times