Question about IGES/IGS Exporting

Hello,

I am currently working on a project where I am exporting curve data to a .igs file and I was wondering if there is an option available in Trelis to prevent it from exporting duplicate curves?

For example, if I create a simple 2-d geometry (.jou below) I will have a total of 6 curves in the Trelis model, but anytime I export it as a .igs file it will export a total of 8 curves with two of the curves being duplicated. This is not such an issue for smaller models, but once I export models with 10000+ curves it can become pretty time consuming to remove the duplicates at a later stage.

If anyone could provide a solution or some incite as to why this is happening it would be greatly appreciated!

Here is the sample journal script:

[code]# --------- ASSEMBLY AND PIN CELL INPUT PARAMETERS --------- #
#{Num_Pins = 1}
#{Num_Pin_Subregions = 4}
#{Wide_Outer_Assembly_Gap_Thickness = 0.95250}
#{Can_Thickness = 0.20320}
#{Inner_Water_Gap_Thickness = 0.20066}
#{Narrow_Outer_Assembly_Gap_Thickness = 0.47498}
#{Pin_Pitch = 1.6256}
#{Pin_Diameter = 1.06426}
#{Cladding_Thickness = 0.08128}
#{Can_Curvature_Radius = 0.8}
#{Total_Assembly_Pitch = 18.24000}

--------- INITIALIZE ASSEMBLY PARAMETERS ---------

#{Inner_Assembly_Pitch = Pin_PitchNum_Pins}
#{Inner_Wall_Pitch = Inner_Assembly_Pitch + 2
Inner_Water_Gap_Thickness}
#{Outer_Wall_Pitch = Inner_Wall_Pitch + 2*Can_Thickness}
#{Outer_Circle_Radius = Can_Curvature_Radius + Can_Thickness}

--------- CREATE PIN CELL(S) ------------

#{i = 1}
#{body_num = 1}

create surface circle radius {Pin_Diameter/2}
create surface circle radius {Pin_Diameter/2 + 2*Cladding_Thickness}
subtract body {body_num} from body {body_num + 1}
compress all
create surface circle radius {Pin_Diameter/2}
body {body_num} rename ‘B_{i}Cladding’
surface all in body {body_num} rename 'S
{i}Cladding’
body {body_num + 1} rename 'B
{i}Fuel’
surface all in body {body_num + 1} rename 'S
{i}Fuel’
create group 'G
{i}Pin_Cell’
group 'G
{i}Pin_Cell’ add surface in body {body_num}
group 'G
{i}_Pin_Cell’ add surface in body {body_num + 1}

--------- CREATE INNER ASSEMBLY WATER REGION ---------

#{body_num = body_num + 2}
#{starting_body_num = body_num}
#{starting_innerassembly_num = body_num}

create surface rectangle width {Inner_Wall_Pitch}

subtract surface in group all from surface in body {starting_body_num} imprint keep
delete body {starting_body_num}
compress all

delete surface all keep_lower_geometry
color curve all black
merge all
compress all

export iges “test.igs” overwrite[/code]

This might be a bug. A work-around is to stitch the surface so at the solid modeling level there are no duplicate. When merging, the curves get consolidated from what you can see, but in the solid modeler, both curves are still there. What can be done is to substitute stitching for merging:


compress all #renumbers entities starting at 1.
stitch body all
color curve all black

Then the export should not have duplicate curves.

Thank you for the quick reply.

I just tested the stitch command, but I’m not sure if it will work for what I need exactly. Since I am only interested in exporting the curve data if I stitch the bodies together before using the ‘delete surface all keep_lower_geometry’ command, it actually removes most of the curve data along with the surfaces.

It’s okay though. I just didn’t know if I was making a mistake or if it was an issue with trelis itself. For now I can just write a simple script to remove the duplicate data from the .igs file after it is exported.

After looking into this issue further, it turns out this is a bug in how we export the file. In your example, it appears that you only have 6 curves, but in reality you actually have 8. Two of the curves are merged, and apparently we are not respecting that merge on export. We will submit a bug request to fix this. Thanks for bringing it to our attention.