Why Expressions with “p1; p2; p3;…”?
Why Expressions with “p1; p2; p3;…”?
(OP)

Above is a component from PDW library. When defining expressions, is it necessary to say,
p1=A; p2=B; p3=C; ….
And then
A=X1; B=X2; C=X3; …. (Where X1, X2, X3, … are any corresponding values)
Why couldn’t it be as follows, directly specified by catalogue variable or a variable name?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks





RE: Why Expressions with “p1; p2; p3;…”?
Might have been a person setting these parts up that did not see the simpler way of doing it.
Regards,
Tomas
RE: Why Expressions with “p1; p2; p3;…”?
I’m wondering if it’s just a bad practice that could be avoided or if it’s necessary to have “P”s to avoid any issues or to make it easier later.
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
As i see CAD users, some will become power users and some will never.
they might both work equally hard but where one creates elegant models the other creates complex models with many many features.
I had one case a couple of years ago the shell of a mobile phone, where the user had extracted the original body three times and united to the original body.
The feature tree was more or less impossible to follow and understand. We more or less had to ignore the history and do local changes on top. the model went successfully into production.
Regards,
Tomas
RE: Why Expressions with “p1; p2; p3;…”?
What’s your take? What am I missing? Are sketch dimensions not stable as creating Datums?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
RE: Why Expressions with “p1; p2; p3;…”?
http://mechanism3ddesign.com/2016/10/siemens-nx-ex...
http://mechanism3ddesign.com/
RE: Why Expressions with “p1; p2; p3;…”?
You have
addendum circle: P1=120
dividing circle: P2=100
dedendum circle:p3=80
Isn’t it rather clear to have
Addendum_circle =120
Dividing_circle =100
Dedendum_circle =80
Why do you want to use P1, P2, P3….? Is it just because, it’s the default of NX?
Sorry, now I don’t have time to go through everything in your link. Please direct me if I’m missing something special.
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
At one point in time ( many many years ago, late 90-ies beginning of 2000) The NX Sketch had the issue that a dimension between two sketch objects could flip the objects from + to - ( due to some other model change), the objects swapped place, the dimension value stayed, then the sketcher simply accepted the new flipped position as the correct position. but the geometry was invalid.
Then constraining to datums was a more stable method.
i would guess that is what you see here.
(difficult to explain in words, i can draw an example.)
Regards
Tomas
RE: Why Expressions with “p1; p2; p3;…”?
For more information on this effect, see the following item:
https://en.wikipedia.org/wiki/Chirality_(mathemati...)
John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA
Siemens PLM:
UG/NX Museum:
The secret of life is not finding someone to live with
It's finding someone you can't live without
RE: Why Expressions with “p1; p2; p3;…”?
In NX, both Datum Planes, Sketches and almost every model construction are driven basically by Expressions in a transparent manner. If flipping happens, Expression vector would be the culprit. This would affect equally on both Datum Planes and Sketches. So I wonder if this flipping issue is still a possibility after many enhancements and fixes.
The way I understand, Sketches are fairly new to NX and most of the NX old-timers don’t use it to its potential. The other obvious question is, should we still continue with those old bullet-proofed bulky methods after years of R&D work?
Strangely Siemens guys are very silent or ignoring to comment. (I posted tis same question in NX Design Forum a week ago and didn’t get any comment)
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA
Siemens PLM:
UG/NX Museum:
The secret of life is not finding someone to live with
It's finding someone you can't live without
RE: Why Expressions with “p1; p2; p3;…”?
Basic curves are very popular choice than Sketches and most NX users/Cam programmes don’t know how to work with Sketches. They have some different ways of working than what is taught in NX training classes. Creating holes and Threads, Points, extrusions etc.
Anyway, getting back to the basic topic, Do you see any disadvantage in not creating expressions using P1=A; A=Value first and then defining P1 in sketch method vs. directly naming the sketch values?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA
Siemens PLM:
UG/NX Museum:
The secret of life is not finding someone to live with
It's finding someone you can't live without
RE: Why Expressions with “p1; p2; p3;…”?
It confirmed that it is easily could start a design from a simply defined sketch. Sadly the PDW Reuse Library is also built with some outdated/unfamiliar features that is not easy to follow. Hope those developers will see some sunshine soon.
The next question would be, do you think that it's necessary to make driving planes to control sketches as limits? Is it a just a habit from the past or is there a still valid reason? Have you encountered undesired flipping happening lately in NX or has it identified and fixed?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
"Basic curves are very popular choice than Sketches and most NX users/Cam programmes don’t know how to work with Sketches." This depend on where people had training, if they had it at all, how long they used other software that does not have sketches (I am curious what CAD software does not have sketch?), how good people are in adopting new behaviors that come with new software... and why nobody show them how good parametric design you can make with sketch, that is literally impossible without sketches.
If you like to use basic curves, do it, they exists and as you said some old timers who had problem adapting to sketches, still use it. I personally see basic curves as outdated and lot less useful than sketch functions, but I know that 3D sketch would be great upgrade to parametric design.
And why sketch is connected to plane... Can you tell me what software have sketch that is not connected to plane?
_____________________________
Enjoy your work and have fun!
RE: Why Expressions with “p1; p2; p3;…”?
Finally saw this thread, and since Toost asked for me to chime in...
There's no difference in the update behavior of the models in which expressions have been renamed, versus models in which the pXXX expressions reference user expressions. They both work identically, and there are pluses and minuses to each approach.
I don't have any first-hand knowledge of how the PDW parts you reference were created, but guessing based on what's there, I suspect that the basic parameters may have been prepared ahead of time and imported all at once, creating a bunch of consistent "User Expressions" up front to reference while modeling. This is a somewhat common technique when building a bunch of similar parts, or modular parts, when very consistent expression names are of primary importance.
Renaming the expressions directly certainly also works. The challenge is that these expressions are linked to the features that they drive, and that introduces some interesting behaviors when those features are deleted.
Generally speaking, when a feature is deleted, the expressions associated with that feature are cleaned up (deleted) as well, UNLESS those expressions are being referenced by other expressions, in which case the referenced expressions (only) are automatically preserved. But if, for instance, you had started a model with a nice sketch like this:
...and you'd gone to the trouble of naming all of the sketch expressions directly, as shown above, then you'd end up with a super-clean expressions list like this:
...and that looks awesome. For now.
Then, say you'd extruded that sketch, and in the process, had referenced the "height" expression in the End Distance expression (p6, here) of the Extrude feature:
Then you'd see that referencing relationship in the Expressions dialog like this, of course:
Now... Someday down the road, if you (or someone else) decides to create a different sketch here, like so:
...and reparent the Extrude feature to reference the second sketch, like this:
...and then delete the first sketch, then despite the fact that the Extrude is no longer referencing the first sketch, you'll actually still get the usual warning message about downstream effects:
...because that "height" expression (which is closely associated with the first sketch because the original sketch expression was renamed directly) is still being referenced by the Extrude feature. When you go ahead and choose OK here, the first sketch is deleted, along with ALMOST all of its expressions -- except "height", which was still being referenced by the Extrude. This leaves the Expressions list like this:
Now, there are a couple of choices lurking in here, as you probably see now:
- We think it's good to clean up feature expressions when we delete features. (So we generally do.)
- But we also think it's important to preserve that referenced expression. (So we have, obviously.)
- Those other named expressions may or may not still be relevant, but we don't know. (You've gone to the trouble of renaming them, but at the same time, you've not gone to the trouble of actually referencing them anywhere yet. So [for 20 years or so] we've chosen to go ahead and clean them up for you.)
SO...If those named expressions are important to you, it might make sense to create them as "user expressions" first (created directly, independent of any feature, either manually or by importing them) and then reference those user expressions. That way, they'll be sure to stick around until you manually delete them, and you won't find yourself trying to figure out which named expressions will be preserved and which will be deleted when a feature needs to go.
But you can choose how you want to work.
For what it's worth, we've taken this one step further in features other than sketches. While in most other feature dialogs, you can actually enter an expression name like this to create a new named expression:
And when you do that, we'll actually do this for you automatically:
For what it's worth.
Does that help a bit?
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
RE: Why Expressions with “p1; p2; p3;…”?
John says 1981, - it was 1991 ( I had the pleasure to do the local presentation and, - yes, we did had problems making a triangle fully constrained , some 25 years ago
quite some water has passed under the bridge since then and quite "a few" pieces of software use the same solver.
http://www.plm.automation.siemens.com/en_us/produc...
Regards,
Tomas
RE: Why Expressions with “p1; p2; p3;…”?
John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA
Siemens PLM:
UG/NX Museum:
The secret of life is not finding someone to live with
It's finding someone you can't live without
RE: Why Expressions with “p1; p2; p3;…”?
Glad that I asked! See, I learned that there is a reason for that madness.
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
Is it necessary to constrain sketch elements to datum planes?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
Not necessarily, though it's certainly the most common approach.
If you were really trying to avoid datums, you could build a sketch attached directly to the face of a solid, for instance, and constrain that sketch to the edges of that same face or other objects in the model.
But datums are very common, datums provide a layer of indirection that is often useful (they can be reattached to a new parent in many cases, or offset independent of the underlying solid), and datum axes are a nice, consistent anchor for directions, in particular.
And so, as usual in NX, there are several ways to skin the proverbial cat.
Does that help?
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
RE: Why Expressions with “p1; p2; p3;…”?
To be clear: (In case of a miscommunication)
Are you saying; If I’m to sketch a rectangle, it’s a good practice to have extra 4 boundary planes around where 4 sketch elements are constrained to.
Why isn’t it recommended if I directly dimension in the sketch? (Dimensionally constrained directly) Where could it fail?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V10.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: Why Expressions with “p1; p2; p3;…”?
No, that's certainly not necessary. I thought you were asking more about the placement plane.
Generally speaking, dimensions within the sketch will be quite stable. If you get a skittish one that tries to flip (more common 10-15 years ago, but much more rare these days...) then a strategic datum plane or axis may help nail it down.
But as general practice, would I constrain *everything* to a datum plane? Oh, no. Heavens, no.
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)