Change origin in STEP file

I have a general problem: I have STEP files whose origin is wrong from a usage point of view.

I need to create a program to move the origin. Is it possible with Eyeshot?

0

Comments

4 comments
Date Votes
  • Can you do this with Eyeshot ? Yes

    Do you need to create a program just for that ? No, any software that can read and write STEP should be able to do so (from those I know they all can)

    0
  • Thanks for the answer.

    I don't have the other program. The other person exports the original STEP file but he does not know at that time what origin I need. My idea is to do it with Eyeshot and same time I learn to use Eyeshot. :-)

    0
  • Here's a very simple read and write file for step

     private void LoadStepFile(string filepath)
     {
                // load file settings
                devDept.Eyeshot.Translators.ReadSTEP readFile = new devDept.Eyeshot.Translators.ReadSTEP(filepath);

                // load the file
                readFile.DoWork();

                // add entities to the design viewer
                readFile.AddToScene(design1);
    }

    private void SaveStepFile(string filepath)
    {
        // Save file settings
        devDept.Eyeshot.Translators.WriteSTEP writeFile = new devDept.Eyeshot.Translators.WriteSTEP(new devDept.Eyeshot.Translators.WriteFileParams(design1), filepath);

        // Save the file
        writeFile.DoWork();
    }        

    As for the change in origin  well you don't change an origin, you move object to place them where you want relative to the origin.

    You would then transform the position of all the entities in the Design1.Entities. Theses are object of type "Entity"

    and you have 4 main way to move them :

    1 - the transform. This is big one. It allows every transformation your can think of, rotation, translation, mirror, scale...

    https://documentation.devdept.com/2023/topic_0000000000002B19.html

    2 - the translate. This just move in x,y,z the entity (there is other override for different parameter options depending on your needs)

    https://documentation.devdept.com/2023/topic_0000000000002B1E.html

    3 - the rotate. pretty self explanatory, again couple override with different parameter options

    https://documentation.devdept.com/2023/topic_0000000000002B1E.html

    4 - the scale. 

    https://documentation.devdept.com/2023/topic_0000000000002B23.html

    0
  • Thank you very much. :-)

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post