Replace sketch with expression?
Replace sketch with expression?
(OP)
I have a model that have 10 different "start" sketches. I choose one of theese depending on which configuration I want to have in the final product. All other features in the model are the same and this works really well but I'm wondering if it's possible to have an expression that chooses the sketch? It would be really good if I just have an expression where I just enter a number between 1-10 and the feature selects the sketch according to this. Is this possible?
NX 7.5
NX 7.5





RE: Replace sketch with expression?
By editing section in, for example, extrude/revolve or...?
RE: Replace sketch with expression?
RE: Replace sketch with expression?
1. Create a small body (extrude or revolve) in a position that ensures it to always be within an area/volume that are common for all the sketches (so that you can use boolean unite to unite the revolves from your sketches thus "consuming" this small body completely). This gives you an "body ID" that is constant regardless of which features you add/subtract to/from it.
2. Create a revolve and unite for all your 10 sketches respectively, uniting them to your body (1).
3. Use suppression by expression to suppress/unsuppress your revolve and unite for each sketch.
4. Generate IF / ELSE expressions for each of these suppression by expression sets allowing for you to have an specific expression that you can give value 1-10 depending on which set you would like to use.
For example: IF(start_sketch_nr = 1)(1) ELSE (0) where start_sketch_nr is your expression determining which "sketch" to use.
Tip:
Use your, existing, first revolve to create your body (1) and thereafter create new revolves for the sketches. This way you won't need to reassociate your following, already created, features...
Please excuse me if I'm unclear or if I'm describing obvious things. I don't know what level your modeling skills are at. :)
Best regards
/Lars