Skip to main content
10-Marble
July 21, 2022
Solved

iterate sketch and its relations

  • July 21, 2022
  • 3 replies
  • 5431 views

Hello, I have a sketch that contains some reference dimensions, for this particular sketch, in the sketch relations that are then used to drive a sketch dimension in the same sketch.  This represents a circular reference which can be resolved through iteration.  When I regenerate multiple times (less than 10 is usually sufficient), the sketch geometry is resolved.  So my question is, is there a way to program in the extra regenerations, or is there another way to program the iterations to resolve the sketch?

Best answer by JZ_4696753

I think we have converged on understanding the problem.  What you helped me understand is all the dimensions must be fully evaluated prior to using the sketch for the revolve feature, which makes complete sense now.  The core problem that remains is how to evaluate sd23 and sd27?  In truth, I was fully expecting to be able to use the power of CAD to be able to resolve the two reference dimensions with a fully-constrained sketch.  Although this looks to have gone as far as it can, I thought of a workaround.  Instead of using relations to solve for my geometry, I created an upstream datum curve using an equation that relates the flow channel section thickness to the radial distance from the rotation axis to the center of the section.  With the curve created upstream from my sketch, it can be used to graphically set the section thickness.  This allows the part to regenerate without issue.  Thank you for causing me to think out of the box, which was required for this particular problem.  The updated part file is attached.

3 replies

tbraxton
22-Sapphire II
July 21, 2022

Generally you should avoid circular references. 

 

Without an understanding of the algorithm required it is hard to recommend the best option to deal with this.

 

Review this thread on an iterative geometry problem. The approach may be applicable to your problem as well.

 

https://community.ptc.com/t5/3D-Part-Assembly-Design/How-to-create-multiple-shapes-with-relation-for-a-burning/m-p/618846#M66540 

10-Marble
August 5, 2022

Thanks for the suggestion.  I looked through and cannot tell if this would help my case.  But I also uploaded an example part if you wanted to see exactly what is happening in my case and what might possibly eliminate the error messages in the console.

19-Tanzanite
July 22, 2022

Maybe you could reformulate your relations to utilise the SOLVE block and thus find the values of the inter-dependent dimensions simultaneously.   See PTC help on:

 

About Simultaneous Equations 

10-Marble
August 5, 2022

Does the solve block interact with my sketch as it is solving?  I have attached an example part in another comment to my OP that attempts to explain the scenario.

19-Tanzanite
August 5, 2022

Not sure, never had to use the SOLVE block 😀   But from the help documentation, it sounds like something that would could be used in our case; though I don't actually know what you are trying to do - and I can't find this "example part" you attached.

I can take a look, so maybe repost it here - but if it is made in anything newer than Creo4, then I won't be able to look at it.

10-Marble
August 5, 2022

Maybe my question was too vague.  I have attached a test part in an attempt to convey by example.  In this testpart, some sketch dimensions and relations are driven by a parameter "diameter".  This represents a revolved flow channel, where the inlet is a pipe, and the outlet is an annulus.  What is special about this geometry is there are some sketch features (construction circles that are dimensioned with the aim of achieving a constant area through the flow channel.  But the dimensions, that set the flow channel cross section, are themselves driven by relations that are driven by other sketch dimensions.  This represents a circular reference that is unavoidable.  Although the model looks to resolve correctly, even in real-time when dragging sketch entities, there are errors that show up in the console.  Normally, I would ignore these errors, but this model is being used to drive some Ansys simulations and Workbench does not like a parametric Creo model that throws regeneration errors.

tbraxton
22-Sapphire II
August 5, 2022

I do not see a part uploaded by you in this thread. It sounds like it is an order if operations issue with the dependency of the relations and that can likely be dealt with. Check again on the parts upload, note that I think you have to compress the part into a .zip or equivalent to upload, also let us know what version of Creo you are working in.

10-Marble
August 8, 2022

Should be attached to this message.  This was done in Creo 4.0.