Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
hi all,
I want to creat the curve which can modify flexibly.
Now i use curve througth points (UDF), but the points were created by "offset coordinate system", it's not convenient to move the points ,only can modify the offset value.
I know that the style module can creat free curve (B spline), and modify the curve soft point by 3D dragger ,but i can't find the toolkit user's guide mention "creat style curve".
if anyone know that ,please teach me , thank you!!
Solved! Go to Solution.
I do not think that you can create a Style feature curve via Toolkit.
So we have different approaches to create features in Toolkit
1.) the oldest existing method is (used always as workaround when no other options exist) is to use UDF (ProUdfCreate)- Toolkit can create all features (and group of features) which could be inserted by UDF library. So if you could not create a meaningful UDF library of Style curve (means which could be used to insert via the udf in Creo UI )- then you will be not able to manage this task with Toolkit
2.) another option to create a feature is to use the Feature Element tree. So you can create only feature where we have a header definition file. (ProFeatureCreate or the new one ProFeatureWithoptionsCreate)
For simulations features
ProAnalysis.h,ProAsmcomp.h,ProBeltFeat.h,ProChamfer.h,ProContact3dFeat.h,ProDamperFeat.h,ProDesignatedArea.h,ProSurfReg.h
Manufactoring:
ProNcseq.h,ProNcseqElem.h,ProProcstep.h,ProFixture.h,ProToolElem.h,ProWcell.h,ProValue.h
Sheetmetal:
ProSmtFlangeWall.h,ProSmtFlatWall.h,ProSmtForm.h,ProSmtPunchQuilt.h
And regular Creo features:
ProDraft.h,ProDtmAxis.h,ProDtmCrv.h,ProDtmCsys.h,ProDtmPln.h,ProDtmPnt.h,ProElemId.h,ProExtrude.h,ProFeatIntr.h,,ProFlatSrf.h,ProForeignCurve.h,ProHole.h,.h,ProMerge.h,ProMirror.h,ProMove.h,ProPattern.h,ProReplace.h,ProRevolve.h,ProRib.h,ProRound.h,ProShell.h,ProSolidify.h,ProStdSection.h,ProSweep.h,ProThicken.h,ProTrim.h
So as we can see there is unfortunately no header for the Style feature type!
So for example using ProFeatureCreate and the ProDtmPnt.h header you can create t Datum points / datum points array - but this will require a significant more intensive programming work to implement the same what you could do already with the UDF. Here of course you can dynamically vary the number of the points and it is possible to implement some further logic to handle/edit the points via Toolkit. For example, to select some elements and then recalculate internally the point dimensions.
Further you can use then the ProDtmCurv.h to create the curve based on the points created /modified via Toolkit. But for all points mention here the complexity for the implementation will be significantly higher
3.)you can create a feature also using the import feature - ProImportFeatCreate where you can define ProIntfDataSource of your feature. You can use one of the file formats or define directly the interface data in the IntfDataSource structure – but I think this is only applicable for solids , surface/quilts and edges but not for curves (I am not 100% sure)
4.) the last option ( to mention here for the sake of completeness) is to create a curv via equitation – We can use ProForeignCurve.h to define a curv feature with particlar mathematical behavior. In this case we will define a callback function which will be called by Toolkit and will calculate the x,y,z coordinate of each curv point , but also the first and the second derivation on this point.
I do not think that you can create a Style feature curve via Toolkit.
So we have different approaches to create features in Toolkit
1.) the oldest existing method is (used always as workaround when no other options exist) is to use UDF (ProUdfCreate)- Toolkit can create all features (and group of features) which could be inserted by UDF library. So if you could not create a meaningful UDF library of Style curve (means which could be used to insert via the udf in Creo UI )- then you will be not able to manage this task with Toolkit
2.) another option to create a feature is to use the Feature Element tree. So you can create only feature where we have a header definition file. (ProFeatureCreate or the new one ProFeatureWithoptionsCreate)
For simulations features
ProAnalysis.h,ProAsmcomp.h,ProBeltFeat.h,ProChamfer.h,ProContact3dFeat.h,ProDamperFeat.h,ProDesignatedArea.h,ProSurfReg.h
Manufactoring:
ProNcseq.h,ProNcseqElem.h,ProProcstep.h,ProFixture.h,ProToolElem.h,ProWcell.h,ProValue.h
Sheetmetal:
ProSmtFlangeWall.h,ProSmtFlatWall.h,ProSmtForm.h,ProSmtPunchQuilt.h
And regular Creo features:
ProDraft.h,ProDtmAxis.h,ProDtmCrv.h,ProDtmCsys.h,ProDtmPln.h,ProDtmPnt.h,ProElemId.h,ProExtrude.h,ProFeatIntr.h,,ProFlatSrf.h,ProForeignCurve.h,ProHole.h,.h,ProMerge.h,ProMirror.h,ProMove.h,ProPattern.h,ProReplace.h,ProRevolve.h,ProRib.h,ProRound.h,ProShell.h,ProSolidify.h,ProStdSection.h,ProSweep.h,ProThicken.h,ProTrim.h
So as we can see there is unfortunately no header for the Style feature type!
So for example using ProFeatureCreate and the ProDtmPnt.h header you can create t Datum points / datum points array - but this will require a significant more intensive programming work to implement the same what you could do already with the UDF. Here of course you can dynamically vary the number of the points and it is possible to implement some further logic to handle/edit the points via Toolkit. For example, to select some elements and then recalculate internally the point dimensions.
Further you can use then the ProDtmCurv.h to create the curve based on the points created /modified via Toolkit. But for all points mention here the complexity for the implementation will be significantly higher
3.)you can create a feature also using the import feature - ProImportFeatCreate where you can define ProIntfDataSource of your feature. You can use one of the file formats or define directly the interface data in the IntfDataSource structure – but I think this is only applicable for solids , surface/quilts and edges but not for curves (I am not 100% sure)
4.) the last option ( to mention here for the sake of completeness) is to create a curv via equitation – We can use ProForeignCurve.h to define a curv feature with particlar mathematical behavior. In this case we will define a callback function which will be called by Toolkit and will calculate the x,y,z coordinate of each curv point , but also the first and the second derivation on this point.
Thank you for your reply.
Unfortunately, creating the style curve by UDF can't assign the soft point's location.
Finally, i use my old version :
1.Creat the datum point by element tree.
2.Creat curve through point by UDF
the UDF is not flexible when creating curve through point,because the point number is fix by each UDF.
hope that can supply the curve through point element tree in future.