Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Perhaps I may have inquired on this years ago, but I am wanting to find the center of gravity points for a series of sketches which will be strung together as a reference for a Swept Blend.
I do not own BMX so I can't directly enter the needed points in the model.
Is there a best way of determining the sketch center of gravities and place the corresponding point in the sketch?
In the past I used a work around in which I had to solve for each of the X, Y and Z values with an extrude to each section and separately enter the X,Y and Z values. In Creo 7 it is seeming to be more of a challenge, but I likely eventually will figure out how to use the slow method.
By any chance is there a quicker way to do this?
Solved! Go to Solution.
Nice demo!
As your video demonstrates, if the sketch in question lies on a plane that cuts other solids in the model, then the use of solid extrude and section properties will affect the apparent location of the sketch centroid.
One "improvement" I can think of is to use mass properties analysis feature:
and apply this analysis to symmetrically extruded and capped quilt to obtain the X,Y,Z coordinates of its COG:
In this example, in generally similar way that you show in the video, I generate point representation of the COG of SKETCH1. The relations are inside the point COG1 (offset-coordinate-system type) and use the parameters from the mass properties analysis feature DUMMY_MASS_PROP1 - which is applied to the quilt DUMMY_VOLUME1.
Last thing I'd like to mention is that you can then turn this into an UDF or use the copy and paste-special (+advanced reference configuration) functions to easily generate the COGs for other sketch sections in your part model:
You can get x-section CGs using x-section mass properties. Then you can use those coordinates to get your points.
Is that where you are going or Am I completely out in left field?
Screen shot is Creo 4.
Hi Stephen,
That is what I'd like to do. When you do this you can view where the center of gravity is, but you can't place a physical point off of the display (unless you have BMX). The slow road from that point is to copy and paste each X, Y and Z value so that you can place a CSYS. Once the CSYS is placed you can go into a sketch on the needed plane and reference the CSYS that has the X, Y and Z cut and paste values. This is quite tedious.
You should not have to copy and paste the coordinates when using transforms between reference frames (Csys of Cartesian for x,y,z system). You can use the info measure transform matrix relative to an existing csys in your model. You can save the transform file (.trf) and then use this to place or move a newly created csys to represent the COG. This will semi automate the process without having the BMX module.
measure transform matrix:
After you measure the transform, open the info window and you can save the matrix from within the info window.
Example to create a csys from file using the matrix you have saved:
Tbraxton: Your suggestion sounds very interesting, it might save a lot of time but I'm having a hard time piecing this method together.
I have a set of cross sectional sketches to start with. I would like to place a center of gravity point within each of the shown sketches.
How do you combine measure and combine to place a point within each of the cross sectional sketches? It sounds like this method would place an adjusted CSYS which would be fine because it would be easy to reference. I also would have no problem with independently extruding each of the cross sections if a volume would be necessary, but it would be great if it wasn't. I just don't know how this would work together and if I am missing something to make this work.
Since my last post I have discovered how to get what I need long hand by using relations, but I would absolutely entertain anything that would save time in comparison to the method I used.
In order to generate a transform matrix, 2 csys are needed for each transform. This may be the source of confusion for both if us. I am not clear on the order of operations for your use case. If you are attempting to place a centroid on each sketch section prior to the creation of solid geometry, then using a transform may not be helpful.
How often are you using this approach to modeling something? If it is something you use often there are some options to create some more automation such that each sketch you add to a model could be used to semi automate the creation of a cog csys using relations.
I have enclosed a model that uses an analysis feature and relations to place a cog csys at the centroid of a sketch offset in 3 dimensions from the default csys in a part. This Creo 4 model demonstrates how to create parametric csys for each sketch section. You will have to create some extra solid geometry to use the analysis feature. It does not use the transform files. If you elaborate on why you need the centroid of each sketch and how it is used, then there may be other options.
Here are the relations used to place the cog csys using parameters from the section mass props analysis feature. You should add the $ character before each offset dim so negative values will be valid, I only have it on one of them as shown below.
Tbraxton: Thank you for sharing your file. It does help in seeing what you would expect to see in a model tree using the transform method. I'm seeing but not understanding how each of the MKR are generated. I'm also not understanding how this ties to the COG point placement with each cross section.
Evidently the SECTION_PROP_1 was tied to your above relation values and perhaps is involved with the placement of your COG CSYS.
I attempted to follow the procedure of the 1st COG CSYS that you created off the combination of sketch, transform value and extrude. I thought that what I would need to do is move the extrude to just after another datum plane and sketch that I created after the MKR2 and extrude the 2nd sketch. When I moved the extrude the SECTION_PROP_1 shows failure and I am not seeing how the MKR2 would tie to the next section. I am thinking that somehow another SECTION_PROP should generate, but I'm not sure whether the COG CSYS would automatically populate to the next SECTION_PROP.
I'm just not sure how this all ties together but I'm quite curious as to how this works.
For what it's worth, in the way I worked through the perhaps longer way of doing this I generated a secondary COG_CSYS similar to the way you did, and generated a extrude of each sketch (from my above string of cross sections) with the one extrude and the floating COG_CSYS and in what I did I used a different relation value set.
$d319=mp_cg_x("","prt_csys_def","")
$d320=mp_cg_y("","prt_csys_def","")
$d321=mp_cg_z("","prt_csys_def","")
To update each cross section I had to go to File/Prepare/Model Properties and calculate mass properties each time I changed the individual sketch that was extruded.
Ignore all of the MKR features they are not relevant; you can delete all of them if you like.
I did not use any transform analysis features to create the model I posted above, so you can set aside the transform measure for this discussion.
I used the section property measurement to obtain the coordinates of the cog with respect to the def part csys in the model.
Section_PROP_1 calculates the location of the cog for sketch 1 and is always regenerated so it will update when sketch 1 is modified.
The CS_COG_SK1 is controlled by feature parameters in the analysis feature calculating the section properties.
To replicate my example, use these steps.
To get the cog for any section you need 3 features:
1) The sketched datum curve
2) An extrusion of the sketch to create solid geom required by the analysis feature. Use the extrude on both sides of the plane to ensure the cog is in the sketch plane
3) Cross section properties analysis using the part def csys as reference; In the feature tab select the parameters for the x,y,z coordinates of the cog result so they are available for use in relations
4) A csys offset from the part default csys; You then control the x,y,z offset dimensions using the parameters from feature 3 (analysis feature)
This can be extended for any number of sections as required.
Your use of parameters may be problematic. I think the parameters names (e.g. mp_cg_x) you are using are model parameters. If they are model parameters, then they are influenced by all solid geometry in the model and with multiple extrusions in a part are potentially problematic when trying to update the cog for a given section. You can probably get around this with multi body functionality in Creo 7+ but I would ignore that until you get a working solution.
A short video clarifying some of the nuanced details in my example model.
Nice demo!
As your video demonstrates, if the sketch in question lies on a plane that cuts other solids in the model, then the use of solid extrude and section properties will affect the apparent location of the sketch centroid.
One "improvement" I can think of is to use mass properties analysis feature:
and apply this analysis to symmetrically extruded and capped quilt to obtain the X,Y,Z coordinates of its COG:
In this example, in generally similar way that you show in the video, I generate point representation of the COG of SKETCH1. The relations are inside the point COG1 (offset-coordinate-system type) and use the parameters from the mass properties analysis feature DUMMY_MASS_PROP1 - which is applied to the quilt DUMMY_VOLUME1.
Last thing I'd like to mention is that you can then turn this into an UDF or use the copy and paste-special (+advanced reference configuration) functions to easily generate the COGs for other sketch sections in your part model:
Pausob: I am starting to review the method that you shared. My point was generated in a random location as an offset coordinate system. I believe I created a good Mass Properties Feature. I entered the values that you showed me in the relations box. Likely I entered something wrong as I am getting the below error.
Any idea what I might have missed?
Hi @pimm, I assume your mass-properties analysis feature of the capped quilt is called MASS_PROP_1 ?
Then I see there is the ":" symbol missing in your relations.
Syntax for recalling into relations the value of a parameter with name [PARAMETER_NAME] from a feature called [FEATURE_NAME] and with ID of [FEATURE_ID] is:
[PARAMETER_NAME]:FID_[FEATURE_NAME]
or
[PARAMETER_NAME]:FID_[FEATURE_ID]
(often the system will convert the name to the ID for you)
Another thing I'd recommend is putting these relations within the point feature. From your screenshot, I see you are writing them at the part level; it should work, but IMO, not appropriate as these are details internal to the COG feature. Or in other words, if you were to delete this point, then these relations should also disappear. That will happen automatically if you write the relations at the feature level. But that is a matter of preference, for sure. Maybe it's better to have them all at the part level because although they clutter up the relations, they are "easier to find" later on.
Pausob: Thank you, I see that I am missing the ":" between XCOG and FID.
When I plugged in the ":" the equation worked, and it moved my PNT0 point.
I'm not sure about what happened in regards to the relation being made in the "part" mode instead of the "feature" mode. I thought that I initiated it in the manner you showed. Perhaps it reverted to a default value.
Unfortunately (or fortunately depending on the point of view) I will be taking another vacation week after today so I likely will need to pick this up from New Years. (I like to save my vacation days towards the end of the year).
Sorry about that. I will pick this up again at that time. The good thing with this exercise is that I am learning some new techniques. I rarely have touched relations, so I understand the concept, but am not good with the application.
Thank you and have a Happy New Year!
Pausob: At last today I had time to fully try out your suggested method for finding volume center points of sketches. The initial relations entry was awkward but the copy and paste special entered quickly and it transferred over to all of the sketches I tried. Thanks so much for your help!
Sorry for being so slow to check back. This time around my delay was due to losing my brother to Covid. Not a great way to end and start a new year.
I would like to try converting this to a UDF as per your suggestion, I will tackle this at another time as I don't understand UDF's very well.
Thanks again!
Thank you for your help. I want to try this out but things all of a sudden got busier at work.
Your method differs a little from the one I used.
The one thing that I am still curious about is what gets done with the 2nd section and beyond. Do you still retain the COG datum that you created or do you make another datum and extrude?
In the method I used I can only have one extrude and I retain the same Csys that I created.
You can extend the use of the same group of features for as many sections as you need. The cog for each section will be retained.
Addition of a second section:
Tbraxton: Sorry for the long delay between replies. Things got busy and then I was on vacation for a week.
I've gone through your method and have discovered how to create the analysis feature. (This should have been easy)
So I have another sketched section which is symmetrically extruded, an analysis feature and another random CSYS. In order for me to place the 2nd CSYS do I need to make another relation which would have different d??? values and for every new section would I need to make a new relation?
Thanks for your help!
For each sketch you will need:
DTM Plane
Sketch
Extrude
Analysis
Csys
You will need to add the relations to place the csys as well. If you use copy/paste special, you can replicate the last 3 features of the group in seconds by using a newly created sketch plane and sketch as the reference when pasting. When you use paste special, it should create the new relations for you as well.
Tbraxton: Am I doing this the way you are suggesting?
This is what I have copied (the last 3 features)
This is pasting these special.
Here are the options for pasting. (I chose the default)
This method unfortunately doesn't appear to paste the added relations. Am I missing something obvious?
One observation is that the special pasted CSYS is in the previously created CSYS location, but it isn't driven to any new relational location.
Not exactly. When using paste special you need to select the advanced reference configuration option. This will enable the selection of new references for the pasted features.
Unselect dependent copy option and select the adv config option. You will then be prompted for the new references.
I tried this with another section sketch off of a plane inline to the 1st cross section. Using the Advanced reference configuration worked perfectly.
I tried this on another section sketch that I tilted to not be inline with the other 2 sections and this unfortunately doesn't appear to work. In the end the new CSYS was located on one of the default planes.
Am I correct that this method only works on sections that are inline with the orientation of the initial CSYS?
Sorry for the trouble; just trying to verify to see if this would work for our locked style parts.
The issue is that the relations only control the position and not the orientation of the csys features. This is why it is not working for your latest test case, no control of the rotational DOF (degrees of freedom) of the cog csys.
This technique is extensible to the general case of the CSYS having 6 DOF (3 linear, 3 angular) defined relative to a reference frame. You need to build it so that all 6 DOF are parametric. All of the DOF do not necessarily need to be defined by relations but certainly could be.
Ok, so correct me if I'm wrong; to continue with the relational parametrics on the tilted sketch I would need to reference the tilted sketch's CSYS instead of the default?
If so the good thing is that you still could use this method to define placements of any orientation, and it still would parametrically update.
Also, correct me if I'm wrong but all the CSYS that were created will dissolve when you build a swept blend solid through all of the sketch sections? If so it's still not a huge deal as the CSYS could just be redirected by just referencing the default CSYS instead of the relation I'm thinking.
Once you have nonparallel planes for the sketches you have a potential problem. The potential issue would be that your section properties are no longer only dependent on a single sketch (and extrusion). I mentioned this in the video above. You need to consider this in the general sense as it may render this approach useless for your purpose. I can think of several ways around it, but it would be a bit convoluted.
Your original stated goal was to generate a trajectory for use with a swept blend. I am still not clear on the workflow that requires this trajectory through the COG of each sketch. Is it required that the trajectory lies on the cog of each section?
I will answer your queries posted above:
to continue with the relational parametrics on the tilted sketch I would need to reference the tilted sketch's CSYS instead of the default? No, you would locate and orient relative to the def csys, same as the others
all the CSYS that were created will dissolve when you build a swept blend solid through all of the sketch sections? No, the csys of each sketch cog will still be present.
Tbraxton: Oh the convolutions that you have to go through to get the same very simple functionality as you would by having the BMX extension. It took me some time to go through the prove out process in your suggested method. When I understood how to save the analysis feature, when you shared how to easily string sections to add on I thought this was going to be the perfect solution. It is unfortunate that most of our parts have twists to them, otherwise this would be exactly what I was looking for.
As is I learned a few helpful things in regards to getting more out of the Creo software, this method also likely will help others out there, so thank you!
If you use the mass prop analysis of a quilt as @pausob suggested, then it should work for the general case. By limiting the domain of the mass props calc to a quilt you will not have the issue of intersecting sections of solid geometry. You will need to create a mass prop analysis feature and generate the params for location and orientation of the COG relative to the default csys. Use these options and you will have the parameters needed to support the general problem and both locate and orient each COG in space.
Hi @pimm and @tbraxton, I am curious - I posted a message towards a solution suited to what you are trying to solve: you have the cross-section sketches already defined; they lie on non-parallel sketch planes, and you wish to generate their centroids in a parametric fashion but you don't have the BMX.
I am wondering if you saw my earlier message in this thread? In it I show that using the mass-properties analysis feature (and not the cross-section mass properties analysis feature) will allow you to generate the COG points and that while the method is similar what is shown in the video of @tbraxton, it will not be subject to the problems of generating and analyzing solid volumes in your model - for example, incorrect overall mass properties, or cross-section planes going through unintended solid volumes leading to wrong centroids...
Pausob: Unfortunately I got pulled away a couple weeks back so I haven't had the time to evaluate the method that you shared. I will try out your method and see if this answers what I am looking for.
Thanks everyone for your help!