New macro update, "Sketcher asset10"

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3440
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

New macro update, "Sketcher asset10"

Post by freedman »

Edit Updating to "Sketcher_asset10", Added support to flash Bodies and Objects. This really improves the view.

Edit: Updating the macro to "Sketcher_asset9".

My target is to make sketching and modeling easier, more structured, and to improve viewing.
I will start from the top and work my way down describing the tools.
Mover: This will move the sketch origin. We want to be able to move the sketch origin so we can draw sketches at the origin. The working plane to move an origin is to have a sketch open and then Enable the mover, then select a (stand alone) vertex (in the 3D) where origin will land. Then select the sketch you want to move, if you select the currently opened sketch "Click to move" will turn red, if you select other sketches it will turn yellow. If you want to move some other sketch to the currently opened sketch 0,0 location you can set the checkbox "Select vertex". You can also move back if you don't like the move.
Set views: Any object selected can have a added property view. When "store view" is clicked the current screen view is stored, if you want to use the stored views then set the Que-view checkbox and tree click the object. If you click on this button 4 times in a row the text will change to "Delete all", one more click and the macro will delete all the saved views. This allows you to start over saving views.
Que-view check box if checked, a single tree click on any object will result in the saved view showing, if there is no view saved the standard (FreeCAD) view is used.
Transparency: 100/0 % is the default. Depending on the check boxes below this will list different values. Clicking this button will toggle the settings between the two values shown.
Low contrast sets the toggle to 40/60
High contrast sets the toggle to 10/90
User settings displays what was stored from the "Store user transparency" button press below.
Clip to view applies the FreeCAD clip function, the button placed here makes for easy use.

Visual res: This sets the screen deviation to normal or high res. If a new sketch is created you can reclick one of the check boxes to refresh the entire model.
Extras:
Toggle Origin/Datum/Binder allows for single tree clicks to change visibility.
Sketch selection set visible will set any selected sketch to visible.
Flash objects works on object (not feature) selection, it will set the sketch/Body to semi-transparent and increase the line width to bold, all for about a second, then the visibilities and line width change back to what they were. I really like this feature for viewing, no more visually searching for sketches. Works even better when the model is viewed at high contrast.
All sketches Visibility off is easy to figure out, this is global.
Shade/ lines shows object lines or not,this is global.
Random color will randomize colors of Objects/Bodies, every 10th click all objects will be colored default grey,this is global.
3D Rotate only works while in Sketcher. Set to On to 3D rotate and set back to Off to use Sketcher normally.
Store user transparency will make a copy of the transparency settting for every object. The data will be restored when the button above "User setting" is clicked on. Best way to use this, if you have some special transparency settings then click this and they will be stored.



Let me know if there are any issues, I use this daily. I will post some examples later.
Thanks for answering all those forum questions so I could create this. :)
Attachments
Sketcher_asset10.FCMacro
(38.97 KiB) Downloaded 20 times
menu1.JPG
menu1.JPG (34.37 KiB) Viewed 655 times
Last edited by freedman on Sat Nov 06, 2021 9:21 pm, edited 4 times in total.
freedman
Veteran
Posts: 3440
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: New macro, "Sketcher asset1"

Post by freedman »

Updating the macro. I play with visibility a bunch and I found what I think is the ultimate. I also tested and modified the macro so it would work in PartWB. I think it's fast and hopefully bug free at this point. Here are some macro features.

1) Single tree click on a sketch or PartWB object makes all the 3D go to a (kind-of) wireframe and then I want the Sketch/object to be outstanding so I color the lines Blue and make the line width 6.0. The screen toggles back to normal after 1 second.
This really pops the sketch/object, especially those imported STEP files where you have a ridiculous numbered tree list of objects. I test with an imported 150 object STEP file. I bring in a STEP and do a random color and then click objects and give the important ones usable names.

2) In the Transparency section the button "View" is a toggle of listed visibilities, this button works with the check boxes below it, the check boxes have three selection states, one or the other or both off. Every state will change the View list percentages. The coolest thing here is if you select an object (sketch or PartWB) and then toggle using the High contrast setting for instance, one click you see your selection at 90% and all other objects at 10%, another click and you see your selection at 10% and all other object at 90%. See the pic below. I really like this......

3) It takes some time to get used to but Auto Expand/Collapse of Part/Body/feature sure takes a lot of work out of modeling.

The macro targets the selected document so if you don't see things working make sure you have the correct document selected.

I updated the instructions (post #1), I colored red the changes from the previous macro.

The macro is in the first post.
Attachments
2pic.png
2pic.png (556.46 KiB) Viewed 655 times
Post Reply