Welcome to the COE Discussion Forum! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.

 

The COE 2008 Fall Industry Workshops

Experience two days of industry-focused education and hands-on training on the Dassault PLM solutions suite of products.  All education featured at the workshop is developed by and for users of CATIA®, ENOVIA®, DELMIA® and SIMULIA®.
 

Automotive
Oct. 15-16
Troy, Michigan

Aerospace & Defense
Oct. 27-28
Wichita, Kansas

Register by October 10 and Save $100


Forum Highlight: CATIA V6

 

Get Answers to Your V6 Questions
Dassault Systèmes answers user questions about CATIA V6.  Discuss these answers and propose new questions with end users from around the world in the CATIA V6 Forum.

COE DISCUSSION FORUM
Subject: Generic Utility Parts?

You are not authorized to post a reply.   
Author Messages
THUNDERLASSE

12 Jun 2006 02:46 PM
Hello,

I am searching for list of what "generic utility parts" are neede to create really advanced Powercopies (or UDF's, if you like).

Generic utility part is a name that I picked out from KBE best practises document, shortly it is a powercopy/UDF that makes a subtask that is needed in many other powercopies/UDF's. Typically these are needed when dealing with unpredictable behauviour in mathematical modelling of curves/surfaces/planes; polarity of these is not easily understood by user of powercopy/UDF.

My list of GUP's is following, what else you would need:
- Surface normal flipper, feature that flips input surface normal to closer surface side of driving input point.

- Longer curve selector in 3Dcurve offset, feature that selects from two possible result curves of 3D-curve offsets the longer one (outer curve)


I understood that Ian is working with Curve polarity issue... were you able to make it so refined that it makes a "GUP"

BR,
Lasse
NEVJOHNSON

12 Jun 2006 02:56 PM
Lasse,

I have encounter a few similar situations requiring the use of utility parts.

These mainly relate to projection issues.

Given that at times more than one solution can exist to say the projection of a curve.

Or possibly more than one solution when intersecting surfaces.

Also possible problems when projections fail due to no surface directly below or normal to say a line or point.

Also expecting geometry in a certain orientation but it is not. Some idiot deciding to model a part that would ideally be in Z but it is in Y.

Also another I have created in the past is a check to find out what type of surface you are dealing with.

Is it planar in the area that you are working on?

Not sure if any of this helps but just my experiences of trying to built robust UDFs

Regards

Nev
IPHILLIPS

21 Jun 2006 06:20 AM
For robust UDFs I use several LOW level items to build up the next level. Usually one or more are included in a rule/formula/reaction/loop etc.

For example.
- Switch: Manual switch to swap parent A to parent B
- Autoswitch: Automatically switch from parent A to B if <condition>
- Operation Check: gives Go/Nogo on things like projections
- Extract Coordinates
- Varying number of parents
- Varying number of children
- On the fly geometry
- Measuring

I think Lasse that what you are referring to is one step higher than those.
1 Low level Rule text entries (above)
2 Rule/UDFs: Single feature level.
3 Complex Rulke/UDFs: Multiple Features. More specialised.

Ian Phillips. FORCEFIVE AG, Munich, Germany
THUNDERLASSE

22 Jun 2006 04:06 AM
Hi,

hmmm.... yeah kind of; what I actualy try to do is to make KBE easier and more reachable for larger audience by creating some Basic building blocks to for example powercopy creation; my goal is that I have a set of tools that cover some typical difficult cases of Robust powercopy creation. then creation of fairly intelligen t powercopy would not just be "start from scratch" and "use your experience", but instantiate powercopies and use those powercopies to do certain clever subtasks... like template based design when building templates for template based design.



BR,
Lasse
IPHILLIPS

22 Jun 2006 04:53 AM
I have often though about making a tool that plugs all of the bits together from a simple interface.

But anyway, I think that a manual method to plug the bits together would be do-able. But you'd need a bit pf KWA experience.

Ian Phillips. FORCEFIVE AG, Munich, Germany
THUNDERLASSE

04 Jul 2006 07:36 AM
Hi,

Here is something useful; we had a long discussion with Ian how to evaluate if two curves are "same directional" or "opposite directional"; obiously this is not a topic with single good answer, but here is best I was able to figure out:

- Since two curves can be in space in several ways, they can be closed and starting points can be in different points, a simple study of start and end point measurement might not be enough.

- So (with a bit of help from mr.Phillips) here is something that creates three little tangency vectors to both curves (to 25%, 50%, 75% of curve length, since curve ends are more propably ...curved ) and compares if two or more of these tangency vector pairs are opposite directional (space angle >90deg)

- To use this you need two curves, inverted curve (of second curve) and one Curve Parameter. (Ian; I decided not to use your Inverse by split-assemble trick, because I think this is easier for users to understand)

- If all tangency points are exactly perpendicular, then this uses original curve.

=> For me this is a typical element that can beused in many UDF/Powercopy solutions where curve orientation might be problematic.

Cool isn't it
Lasse

/*Rule created by lpurma 04.07.2006*/

/*define points*/
let P1A (point)
let P2A (point)
let P3A (point)
let P1B (point)
let P2B (point)
let P3B (point)
let L1A (line)
let L2A (line)
let L3A (line)
let L1B (line)
let L2B (line)
let L3B (line)

P1A=pointoncurveRatio(Input_curves\Curve1 ,centerofgravity(Input_curves\Curve1 ) ,0.25,true)
P2A=pointoncurveRatio(Input_curves\Curve1 ,centerofgravity(Input_curves\Curve1 ) ,0.5,true)
P3A=pointoncurveRatio(Input_curves\Curve1 ,centerofgravity(Input_curves\Curve1 ) ,0.75,true)

P1B=pointoncurveRatio(Input_curves\Curve2 ,centerofgravity(Input_curves\Curve2 ) ,0.25,true)
P2B=pointoncurveRatio(Input_curves\Curve2 ,centerofgravity(Input_curves\Curve2 ) ,0.5,true)
P3B=pointoncurveRatio(Input_curves\Curve2 ,centerofgravity(Input_curves\Curve2 ) ,0.75,true)


L1A=linetangent(Input_curves\Curve1 ,P1A,0mm,0.1mm,true)
L2A=linetangent(Input_curves\Curve1 ,P2A,0mm,0.1mm,true)
L3A=linetangent(Input_curves\Curve1 ,P3A,0mm,0.1mm,true)
L1B=linetangent(Input_curves\Curve2 ,P1B,0mm,0.1mm,true)
L2B=linetangent(Input_curves\Curve2 ,P2B,0mm,0.1mm,true)
L3B=linetangent(Input_curves\Curve2 ,P3B,0mm,0.1mm,true)


/*Study if 2/3 or more lines are same directional*/

if angle(L1A,L1B)>90deg and angle(L2A,L2B) >90deg
{
Output_Curve2 =Inverted_curve\help_elements\Inverted_Curve2
}
else if angle(L1A,L1B)>90deg and angle(L3A,L3B) >90deg
{
Output_Curve2 =Inverted_curve\help_elements\Inverted_Curve2
}
else if angle(L2A,L2B)>90deg and angle(L3A,L3B) >90deg
{
Output_Curve2 =Inverted_curve\help_elements\Inverted_Curve2
}
else
{
Output_Curve2 =Input_curves\Curve2
}


THUNDERLASSE

04 Jul 2006 08:23 AM
!!!

Stupidest thing ever; I created that part descriped on my previous mail AND I NEVER SAVED IT!

Luckily I pasted my Rule here, so it is easy to recreate it; Once again one more benefit of sharing the knowledge!


Lasse
COE-FORUM-USER

04 Jul 2006 09:29 AM
Hello,

a small advise about your rule : each time centerofgravity is called, the center of gravity is computed and a point is created for it... So it is far better (faster, lighter) to "factorize code" :
...
let center1 (Point)
...

center1 = centerofgravity(Input_curves\Curve1 )
P1A=pointoncurveRatio(Input_curves\Curve1 ,center1 ,0.25,true)
P2A=pointoncurveRatio(Input_curves\Curve1 ,center1 ,0.5,true)
P3A=pointoncurveRatio(Input_curves\Curve1 ,center1,0.75,true)
...

A good example anyway...
THUNDERLASSE

05 Jul 2006 02:44 AM
Hi DS developer,

Thanks; that is obiously a neat thing to add!

by the way; need for this additional point is a bit ...weird. How would I be able to set it to "default(Extremity)" as in interactive creation?

BR,
Lasse
THUNDERLASSE

14 Jul 2006 04:59 AM
Ian,

How in the heck do you handle following items on your list of low level tools:

- Varying number of parents
- Varying number of children
- On the fly geometry

... especially how you handle these when instantiating Powercopies/UDF's?

Can you give an example?

I have one case where I created a powercopy which creates a tube/hose/cable through several inpt points; there my solution was to create as many powercopies as there were possible input points => user needs first to select first which powercopy to instantiate, (named like "cable through n points") then gets corret number of inputs... I would relly like to see something much more elegant where depending user selection need for input points adapt.

Also I have made an ER to DS about possibility to have access to contextual on the fly creation of simple elements from powercopy instantiation, but no answer from there... do you have a good bypass?


BR,
Lasse
BPRASAD


14 Jul 2006 11:22 AM
I am not sure whether or not you have used "List" function with Query("String","") and object->Children (V5R16).
It can promote "generalization" -- and help you in aggregating the following:
- Varying number of parents
- Varying number of children
- Varying number of parts or features
into a number of "named but sorted lists." You can then use the appropriate List functions (in KWA) to manipulate various elements of the those named sorted lists in a conditional "if statements" or loop.

Brian

Brian Prasad
COE-DPC/KBE Chairperson
THUNDERLASSE

14 Jul 2006 01:51 PM
Hi Brian,

...erm sounds interesting, but I didn't understand a word... could you simplify to some example where this could be used?

BR,
Lasse
COE-FORUM-USER

20 Jul 2006 03:57 AM
Lasse, about your previous question on extremity, I think that for pointoncurve and pointoncurveRatio, if NULL is given in place of point argument, one of the extremity is used. Did not check it...
IPHILLIPS

23 Jul 2006 03:37 AM
Varying number of children:
Up til R16 I have used Loops.
Varying number of parents:
EG a join all curves in a G-Set, this list can vary.
Reaction and Rule. (see other Thread)

Handling these pre R16 is not very nice to do though.

To create a "Point on curve" in a Rule requests a Start point unlike GSD which will take the default end. This is a problem if you have not got a point. Entering a NULL instead works well! No more centre-of-gravity workaround needed!

Lasse, I like your method of backing up all of your data to the COE forum! It can save you lots of hard disk space.

Ian Phillips. FORCEFIVE AG, Munich, Germany
You are not authorized to post a reply.
Forums > COE Forums > KBE > Generic Utility Parts?



ActiveForums 3.6

    

401 North Michigan Avenue, Chicago, IL 60611-4267 | (312) 321-5153 | (800) COE-CALL (U.S.)