MariwanJ / Design456

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

Tweak modification #6

Closed carlopav closed 3 years ago

carlopav commented 3 years ago

Tweak command was modified to set the SubElements mode to the default for Draft Move command

carlopav commented 3 years ago

let me know if you can use it!

MariwanJ commented 3 years ago

I tried that .. There is some strange happening after first time you use the function on an object. I must try it more .. but I am trying to make Magnet function (123D Design have it). It should move an object and rotate it to the surface you click. My problem: I still didn't figure out how to get info of the surface vertexes after mouse click. I am experimenting at the moment. Having that function, I could make every function I have more interactive.

carlopav commented 3 years ago

Let me know... I never used 123d so i'm Sorry i cant help you much.

My problem: I still didn't figure out how to get info of the surface vertexes after mouse click. I am experimenting at the moment.

Try Gui.Selection.getSelectionEx() It should output a list of selection objects that contain also the selected subelements. If the subelement Is a face you can ask for Vertexes and you get them. Mind that you could have to multiply their placements with getGlobalPlacement... This can be tricky

MariwanJ commented 3 years ago

Thanks I will try that.