Select face by expression
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Select face by expression
Is there a notion in FreeCAD of using some code to selection faces and edges, rather than by name ?
Coming from SideFX Houdini, I'm used to just throw some code in a point wrangle when I need a feature that doesn't exist, and I'm looking for something that feels that way in FreeCAD.
Coming from SideFX Houdini, I'm used to just throw some code in a point wrangle when I need a feature that doesn't exist, and I'm looking for something that feels that way in FreeCAD.
Re: Select face by expression
You can throw in some Python code in the Python console.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Select face by expression
Can you try to better explain what exactly you're trying to achieve? Ideally give an example.
Re: Select face by expression
You can save any Python code as a macro, see the FreeCAD macro tool
Like openbrain said,explain what you mean. Your post doesn't make sense at least not to me.
Re: Select face by expression
You can write a macro that will take as input a selected edge, compute all face normals, check which one are in a defined deviation tolerance, and extrude them. Just a bit of Python, maths and FC API.
Re: Select face by expression
Can a macro be executed at a certain point in the workflow, like any other feature ?
Re: Select face by expression
Your explanation is still rather short. Do you want to perform the select via code? And how is the direction given? And how do you provide the angular deviation?
Please note that we have absolutely no idea what you are modeling, what you want to have in the end, and I dare to say, most people here don't know SideFX Houdini. At least the name sounds like a magician's trick.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Select face by expression
Sort of. You can create a so-called 'scripted object' that will appear in the tree as a feature and define a specific behavior.
In your case looks possible to have such an object with a property holding the edge defining the direction, and another one a list of child objects (and eventually another for deviation tolerance, another for extrude length,...) and implementing your wanted behavior.