Skip to main content
1-Visitor
January 20, 2018
Question

How to confirm hole is removing material or not using toolkit

  • January 20, 2018
  • 3 replies
  • 11286 views

Hello

 

Creating a hole feature on part using toolkit. Placement of hole is defined by end user using GUI. Total three placement surfaces and two offset distances are provided by user as input. What we need to check is whether hole to be created will remove material or it will be located outside of the part boundary?

 

Main focus area for me is to identify what sign (+/-) should be used for offset distance provided by user in order to ensure material removal.

 

Feel free to ask in case of any query.

 

Regards

Ketan

 

3 replies

1-Visitor
January 20, 2018

Hi!

 

It largely depends on the specific task you want to accomplish.

Until more experienced answers, I will provide 3 quick, dirty and dumb solutions.

 

 

#1:

If the task  is to find whether the intersecting point of the axis of hole and placement plane is within the runtime boundaries of the placement surface then maybe take a look at TestExtObj.c to get some clues.

(Please be aware that everything seems overcomplicated in the tk docs, but there's a reason for it:

Creo is capable of handling not planar surfaces also, drilling through multiple volumes of different parts, etc.

So it seems complicated if a man just wants to drill a hole into a planar surface, but later on with more complicated surfaces this added complexity, will benefit us greatly.)

 

#2:

Maybe use rays for interference computing.

 

#3:

If you just want this for short-term testing purposes, then use the lumberjack solution: create the feature, chek if it fails, on failure get the element tree, modify value, regen, check

(yes it is horrible, but sometimes its necessary to create instant-deadd features because the underlying geommath in c is in the core of creo, and we can "access" it only in this rude way. For example, a sketch driven extrude must be first created, then getting its tree and adding the section handle, if I know correctly.)

 

If these methods don't suit you(or you find them too dumb), then I would start by reading through the ProSurface.h and ProSolid.h (or maybe the interference checkers etc.), maybe you will find a function which is more suited to your needs.

 

Cheers,

csaba

 

1-Visitor
January 22, 2018

Thank you so much for your detailed response on this...

 

We would not like to go with #3 as of now. For #1, I am yet to explore file in detail.

 

Regarding #2, we also though to find a point on surface and pass ray to identify whether it intersect with surfaces of part or not. We are not able to find how to come up with start point of ray passing (This is nothing but actual intersection of hole axis with primary placement reference). How to find point on surface with offset value provided by user on placement surface is making us confuse now.

Any idea how to travel on surface based on two different references at specific distance?

1-Visitor
January 22, 2018

Hi!

 

Until you can get more experienced answers: 

 

I might not understand the question, but given the user input, you should be able to create for instance the point (Its 3 DoFs are covered by user) and then you can use its data.

(Also, I must mention that coordinate systems mess up things a bit. In code, you have to always keep in mind which one are you using. Maybe we want asm's coordinatesys feature, but you can imagine, that if we're drawing on the screen, or we're doing something on a drawing we need to keep in mind the transformations.)

 

Other helpful files: TestSolid.c, AutoAxis.c (<-this one is actually awesome), ProSolid.h, User Guide's section dealing with features (their respective header files hold data)

 

Cheers,

Csaba

12-Amethyst
January 28, 2018

is it super important for efficiency reasons to verify this prior to making the feature? if you add the hole feature in it'd be pretty logical to test surface area of the primary placement surface or perhaps if the parts are not super complex, mass props obviously changes downwards when you add a hole and you could also inspect the message log which i beleive will complain about unattached features. then if the act appeared to not do anything then flip the dims. i guess though thinking out loud you have 4 potential options for the 2 offset dims (++,+-,-+,--) not sure how you would choose which one is the most logical.

HamsterNL
18-Opal
June 15, 2018

Can't you make a calculation of the mass before and after you have created the hole?

 

If the mass is the same, the hole feature is located outside your model.

If the mass is less, the hole feature is removing material.

1-Visitor
June 18, 2018
Guys, thank you for your response,,, I need to know (before hole creation it self) whether hole is going to remove material or not.
RPN
18-Opal
June 18, 2018

If you know it upfront, what will you do if there are more the one solutions? The user is responsible, because he selects the input. Even standard Creo functions will fail if you select a wrong input. You will need some hours, days or even weeks, to determine all valid solutions upfront.