Step export, additional coordinate systems for DIN4003

Hi everybody.

My goal is to make a valid DIN4003 step export of a milling tool.
The tool exists of one compound which holds 2 solid for CUT and NOCUT layers.
I implemented this via the TopoDS_Shape classes.
Both TopoDS_Shape and the step output works fine.

But to make it DIN4003 compliant i need to include some additional coordinate systems per compound.
Something like "Mounting Coordinate System" (MCS).
(The MCS is the reference point of the tool which gets mounted on a holder.)
It should be linked to the compound.
The coordinate system is represented by a AXIS2_PLACEMENT_3 entity

Here are my questions

1. How can i implement such a coordinate system and link it to the compound ?
2. How can i create Layers on which these coordinate systems ar placed on

Here the code which should be the final result.
I need to create the entity #1370 and #512 (I created those manually)

#512 = PRESENTATION_LAYER_ASSIGNMENT('Layer 66','visible',(#1370));

#1423=SHAPE_REPRESENTATION('',(#1422,...,#1370),#1408);
    #1422=AXIS2_PLACEMENT_3D('',#1419,#1420,#1421);
        #1419=CARTESIAN_POINT('',(0.E0,0.E0,0.E0));
        #1420=DIRECTION('',(0.E0,0.E0,1.E0));
        #1421=DIRECTION('',(1.E0,0.E0,0.E0));
    #1370=AXIS2_PLACEMENT_3D('MCS',#1367,#1368,#1369);
        #1367=CARTESIAN_POINT('',(0.E0,-4.2E1,0.E0));
        #1368=DIRECTION('',(0.E0,-1.E0,0.E0));
        #1369=DIRECTION('',(1.E0,0.E0,0.E0));

    #1408=(GEOMETRIC_REPRESENTATION_CONTEXT(3)...

 

Many thanks for your help

Forum supervisor's picture

Hello Stefan,

You might probably try using XCAF document that would define a proper assembly structure,and the corersponding writing API (STEPCAFControl_Writer).

It might be also possible to write some specific code to achieve teh goal - please, contact us for an offer.

Best regards,

Forum supervisor

Stefan Rosenmayer's picture

Hello,

thanks for the answer.

I already use those CAF classes and they produce a complete and valid assembly structure.

(Validated by various CAD/CAM systems)

I simply need to insert additional AXIS2_PLACEMENT_3 entities on specific layers.

Forum supervisor's picture

Yes, exactly, Stefan,

You need to write a specific code to properly insert additional entities into the model, and we can help you with that.

Please, do not hesitate to contact us for further proposals.

Best regards,

Forum supervisor