cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Extrude feature creation

prnirgundh
1-Visitor

Extrude feature creation

Hello All,

Am having trouble creating rectangular section using PRO_E_SKETCHER. If i create 4 individual lines and add it using SectionEntityAdd then the feature will not get properly created. Its not being treated as rectangular entity but as 4 individual lines.

It will be really great if someone helps! Thanks in advance.!

Regards,

Pradhyumna


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
7 REPLIES 7

In an interactive session if you sketch a rectangle you end up with 4 individual lines. The Pro2dEntdef enumeration doesn't contain anything to resemble with a rectangle, therefor getting 4 individual lines is the expected result.

To be able to proceed with the feature creation check the output of the ProSectionSolve function. If is anything else than PRO_TK_NO_ERROR you can get details about what's wrong by verifying the ProWSecerror array(second argument of ProSectionSolve) Use ProSecerrorItemGet and ProSecerrorMsgGet functions to get informations about each of the errors.

Also, in ProFeatureCreate, you can set the ProFeatureCreateOptions argument to PRO_FEAT_CR_FIX_MODEL_ON_FAIL. This will put you in resolve mode and may give you indications about what is wrong.

Gabriel,

Thanks a lot for your suggestion. Will try it out.

I think i found a workaround. I constrained the end points of those 4 individual lines to "same point" and it worked fine.

Regards,

Pradhyumna

gkoch
12-Amethyst
(To:prnirgundh)

Hello Pradhyumna,

if you have been able to solve your issue with the answer from Gabriel, please mark his post as Correct Answer.

If your workaround is different, maybe you want to share the information about what else needs to be considered for the solution.

Thanks,

Gunter

Hi Gunter,

I tried ProSectionSolve function, but its giving PRO_TK_GENERAL_ERROR and its crashing when i use ProSecerrorItemGet and ProSecerrorMsgGet functions. Am unable to figure out the error in my code.

Workaround that I figured out is -

1. I first used ProSectionIntentManagerModeSet and set it true.

2. Then defined 4 individual lines in form of rectangle and added them to the section using ProSectionEntityAdd.

    For Ex: line1 - end1 = 10,10 & end2 = 10,110.           line2 - end1 = 10,110 & end2 = 110, 110.    

                line3 - end1 = 110,110 & end2 = 110, 10.       line4 - end1 = 110,10 & end2 = 10, 10  

     This makes all the 4 lines end points to be coincident on adjacent line end points.

3. Then I used ProSectionEntityGetSelected, ProArrayObjectAdd and ProSectionConstraintCreate (PRO_CONSTRAINT_SAME_POINT) to get a rectangular section.

This worked perfectly.

I also think we can eliminate step 3 if we use PRO_2D_POLYLINE in step 2 instead of PRO_2D_LINE. But have to explore.

Regards,

Pradhyumna

gkoch
12-Amethyst
(To:prnirgundh)

Hello Pradhyumna,

Thank you for the information! I am sure this will be helpful for other users in a similar situations.

Gunter

xd
12-Amethyst
12-Amethyst
(To:prnirgundh)

Thanks for your information, it helps me a lot.

prnirgundh
1-Visitor
(To:xd)

Hi xd,

If the solution is working fine, please mark the comment as correct answer.

Pradhyumna

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags