MariwanJ / Design456

An attempt to create Direct Modeling workbench for FreeCAD
GNU General Public License v3.0
50 stars 5 forks source link

[request] projecting a sketch on surface.. #24

Closed projectcad closed 3 years ago

projectcad commented 3 years ago

It needs also a new feature to project a sketch on a surface.

MariwanJ commented 3 years ago

I believe that the functionality is there .. Draft can do that. Please look at the draft .. If not let me know.

projectcad commented 3 years ago

Draft doesnt include this feature but you can adapt the command "project to curved face" in Part WB to design456

Moreover, you can adapt the another command "facedraw" of @microelly2 's Nurbs WB ( currently not active due to Python2) ...https://www.youtube.com/watch?v=bPLX3pwUoss&t=4

MariwanJ commented 3 years ago

I like the idea. I thought Draft can attach the plane to the surface. I looked at https://github.com/microelly2/freecad-nurbs. I downloaded and try it . But none of the commands worked as they are written with older python as you said. I don't know the status of their project. I mailed the user .. let me see what he replies me. Yes would be good to combine the tools he did. Many useful tools were there. You might know that I am working on the new interface for the direct modelling. I am quite busy, but your project can get priority. Thanks again.

projectcad commented 3 years ago

@microelly2 had left his codes for uncertain time..you can change these codes as you want..due to GNU GPL licence.. 20210407_103357

MariwanJ commented 3 years ago

Ok thanks. do you know if the liciens is like Freecad?

projectcad commented 3 years ago

Absolutely like Freecad..... you can see licence terms at the beginning of @microelly2 's codes

MariwanJ commented 3 years ago

Great. I started on looking on it. It is not made similar to the new WB. Might need reorganizing, more implementation might needed. It will take some time. I made a new branch just for that and will not be merged to either devbranch or main until it works.I I might update you in the future. Have a nice evening.

projectcad commented 3 years ago

πŸ‘

MariwanJ commented 3 years ago

I managed to get Design456 works again. There are alot of bugs in the files but at least it can be run.

projectcad commented 3 years ago

Great !..πŸ‘πŸ‘πŸ‘

MariwanJ commented 3 years ago

Image to Cylinder is already done. You can prove it now.

projectcad commented 3 years ago

But your code has not been updated since 19 days ago...

MariwanJ commented 3 years ago

Don't look at the main branch .. Go to your director MOD under user account. When you download with git command .. then switch to the branch for the nurbs like bellow

git clone https://github.com/MariwanJ/Design456
git checkout nurbs 

and start FreeCAD

projectcad commented 3 years ago

At first attempt it returns an error... Just then reattempting returns the broken WB.. and then Freecad suddenly closes while doing something in this broken WB.. design456 design456_r

projectcad commented 3 years ago

Ok..it seemed after installing "scipy" Python module ...currently i am trying commands.. design456-1

MariwanJ commented 3 years ago

There are several libraries you need to install before you can run the Nurbs. It is not my WB which has problem .. It is his code .. Rather difficult to deal with .. No clear vision how it works, how it organized. But I hope I fix the problem soon. I will merge it to the develop as soon as I rearrange the icons. It is mess at the moment. Let the console be open. you get warning, info there

MariwanJ commented 3 years ago

http://freecadbuch.de/doku.php?id=nurbs

Some helps perhaps.

projectcad commented 3 years ago

I tried imagesurface... but nothing seems.. design456_try_img2surf

projectcad commented 3 years ago

Maybe one missing point there... @microelly2 uses nodeeditor-pyflow in his Nurbs example videos..

MariwanJ commented 3 years ago

The exaples he is giving (file names) might not exist .. update them .. use your own. try with small picture (48x48) . Notice that there are still commands not included. I will merge today the nurbs to devbranch .. and I might merge it to the main today. let me see.

MariwanJ commented 3 years ago

A big push to the rep. Still I didn't merge it to the main as I have some work to do .. but toolbars are almost fixed. Notice that there are many many bugs still. I just want to list the commands and make class for them .. after that I will start testing them and finding the problems.

MariwanJ commented 3 years ago

itor-pyflow Pyflow ? I don't know if I will touch it.. I need to go back to my main goal. I don't know if people will/would ever use it.

projectcad commented 3 years ago

πŸ‘πŸ‘πŸ‘πŸ‘Just looked at Nurbs adapted to Design456 bu you, many commands has started to active after succesfull conversion of codes from Python2 to Python3..in spite of some missing points.. i think..these codes also would be benefit for your actual target in Design456 @luzpaz @tomate44 @galou @nighcoder

MariwanJ commented 3 years ago

At least I learn something :) .. I will try my best to eliminate all bugs. Microelly in his code never check if you are selecting objects before clicking on the command. He assumes that you do that. But that is a bad decision. That is why I need to implement that for the whole code. Too many hours will be spent only on that. I feel sad that he can so much but, he is not writing good code unfortunately.. No comments, no HOWTO use the tools. It is just nightmare. I hope in the future, I further develop them also. But at the moment I want them to be there .. Thanks for you suggestions and opinion. BR

MariwanJ commented 3 years ago

Due to a big discouragement from the FreeCAD forum, Nurbs is separated and I will stop further developing it at least for now. It has it's own WB now. please refer to https://github.com/MariwanJ/nurbs

MariwanJ commented 3 years ago

@projectcad

πŸ‘πŸ‘πŸ‘πŸ‘Just looked at Nurbs adapted to Design456 bu you, many commands has started to active after succesfull conversion of codes from Python2 to Python3..in spite of some missing points.. i think..these codes also would be benefit for your actual target in Design456 @luzpaz @tomate44 @galou @nighcoder

I managed to fix the "Draw on Face" command. It is published and you can use it .. Please look at this video (not so good as my computer cannot capture dialogs ) https://youtu.be/NMGpnWF-x3A

projectcad commented 3 years ago

Just updated and tried but mine returns still same error.. nurbs_facedraw

MariwanJ commented 3 years ago

@ projectcad It seems that you didn't update your version. Please remove it and make a new clone. I just used my version and it works.

projectcad commented 3 years ago

Deleted Nurbs and reinstalled..but changed error 's line this time..πŸ™„ nurbs_facedraw-1

MariwanJ commented 3 years ago

Why do the cube is like so? Did you do anything to the cube? You have to select a face .. so without a face it will not work

MariwanJ commented 3 years ago

I updated the method to generate an error if you don't select a face. It should work ..

projectcad commented 3 years ago

I selected face of cube in the example above..also tried like that nurbs_facedrawww

MariwanJ commented 3 years ago

I removed my local copy, downloaded the github copy and it is working. Which command you are using? Nurbs_FaceDraw should be used. please make a gain a pull to update your version. remove the ( pycache ) folder. And start again FreeCAD. I cannot reproduce the error you have . Put your version of FreeCAD also please

projectcad commented 3 years ago

Yes "Nurbs_FaceDraw"...like in photos.. I deleted Nurbs then reinstalled with git clone again...tried again in both version.. Freecad Linkstage3 git version and Freecad Daily..but...same result..only one difference is line of the error nurbs_facedraw_linkstage3_git Nurbs_FaceDraw_daily

projectcad commented 3 years ago

also please find below..

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon) Word size of FreeCAD: 64-bit Version: 0.20. Build type: Release Branch: unknown Hash: 28c51d4a43ce............... Python version: 3.6.9 Qt version: 5.9.5 Coin version: 4.0.0a OCC version: 7.5.1 Locale: English/UnitedStates (en_US)

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.27812 (Git) Build type: Unknown Branch: LinkStage3 Hash: b8cd87c34a66.............. Python version: 3.6.9 Qt version: 5.9.5 Coin version: 4.0.0a OCC version: 7.5.1 Locale: English/UnitedStates (en_US)

MariwanJ commented 3 years ago

Ok. Strangely It was working for me. But there are many many bugs in that file. Don't know how it was working for me before. It is the way he wrote his files. Quite unstructured and complex to followup. I will let you know when I fix that.

MariwanJ commented 3 years ago

@projectcad Now, I tried 2 days to resolve the bugs that Nurbs had in the facedraw.. It is endless. I couldn't fix it. I don't know how it was working for me before really. I am giving up for now.. I need to take a break and come back to that another time.. Frustrating!