Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia Macro: Rotate Part in Assy W.R.T. given axis with stop at intersection

Status
Not open for further replies.

jagandeep

Automotive
May 27, 2013
82
IN
Hello Friends
I want to create Macro to Rotate Part Instance in Assy W.R.T. given axis with stop at intersection. Is it possible. Please guide me.

Thanks
 
Replies continue below

Recommended for you

Hello Jagandeep
Yes, it is possible to programmatically rotate a Part in an Assembly. You may start recording a macro and use the [Manipulation] command to see how this can be done.
What do you mean by "... with stop at intersection"?

-GEL
Imposible is nothing.
 
That means I don't want to rotate it to specific angle but until there's no interference with other part in the assembly same as we can do manually by manipulate command with clash detection set to on and with respect to already applied constraints. As a result we can only translate/ rotate part until there's no clashing with other parts in assy.

Is it possible somehow ??
 
Hello Jagandeep,
Basic Concept
Two parts A, B are in collision if they have a common volume ie C = A∩B ≠ 0

You may follow the following conceptual pseudo code:
0. Define an angle increment ∆φ=0.5 deg , accuracy level Cmin=1E-9 and φ=0 deg
1. Rotate part A by φ = φ + ∆φ
2. Calculate C=A∩B (with the aid of CATIA)
3. If (C = 0 And φ < 360deg) Then φ = φ + ∆φ, Goto 1
Else
If C > Cmin Then ∆φ = ∆φ/2, φ = φ - ∆φ ,Goto 1
Else Return

In my humble opinion, this is also how CATIA faces the collision problem. Due to this, in some singular cases the parts instead of colliding are jumping one over the other.
I hope it helps.

-GEL
Imposible is nothing.
 
Oh, I thought there's some built in way to do the same. Anyway thanks i have to do it on my own.
 
hi jagan
there is an option in assy environment of catia which is "Stop manipulate on clash"
In "Move" toolbar you will find this command, select this before you use Manipulation command to move parts or products in your assembly for interference check.
Also there will be a check box in Manipulation dialog box "With respect to constraints", keep it checked. So whenver there is clash between parts you are moving,
it will stop the movement.
Hope it helps. I will try to create a macro if possible.[smile]
 
Actually I have to do this for 100 times in an Assy(i.e. to rotate part about 100 axes). So I am thinking of automating the same.
 
I was thinking if you can have a macro to create a rotation for 100 axes.
Which means now you have got 100 bodies at 100 different angles.
We can use another macro which will save each body as new part file.
Now u can use these parts inside a product for individual or as per your requirement for clash analysis.

vikt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top