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"?
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.
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.
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.
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.