Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:

  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Reducing exported file size

tony_soares459tony_soares459 Member Posts: 57 ✭✭
edited July 18 in Community Support
I need to export an assembly for multibody simulation outside Onshape. I need the parts in individual STEP files and these should be as small as possible. Sadly, some files are exceedingly large. I can improve things by removing some geometric detail---fillets and chamfers being prime candidates---but this takes me only so far.

Any tips on how to tackle this? The offending parts can be over 20 MB in size and... I need to shrink them...  tenfold. Yeah. Are there specific geometry features that tend to massively bloat STEP files? Also---is there a way to automatically remove all the fillets (if not also chamfers) from a part for export? Any chance we might get this option in the future? :D

An observation: I know patterns tend to bloat files but often they are important and you can't simply delete them or suppress them for export. Do STEP files explicitly specify geometry for each pattern instance or do they specify it for one instance to then reference it for the other instances?

Thanks for whatever tips and bits you an share!

EDIT: I see now that I posted this in the wrong forum... If any of the moderators care to move this post to a more appropriate place, thanks in advance!

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,599
    edited July 18
    First question: why does the file size matter?

    Any neutral file format like STEP has no understanding of your design intent so every pattern instance is a duplicate. 

    You could write a custom feature to remove fillets fairly easily (chamfers not so much) but it probably wouldn’t work very reliably. 

    EDIT: I moved it for you 😀
  • Konstantin_ShKonstantin_Sh Member Posts: 20 PRO
    neutral file size basically depends on the number of faces and edges of geometry, some geometry elements are not desireble for simulation models - like tiny holes, cosmetic threads, splitted faces and generally the elements which are too big or too small to be sufficient for the certain simulation task, but in the end the file size of an appropriate simulation model can be still not so small as you need to get realistic results.
  • tony_soares459tony_soares459 Member Posts: 57 ✭✭
    Thank you both! I wish I could ignore file size. Sadly... I can't.

    For one, the larger the file, the slower the the geometry loads for simulation (generally speaking). This is a problem when you have many large STEP files. A delay of a 2 seconds is acceptable but a delay of 20 seconds is excessive for the type of simulation I'm doing.

    Also a concern, if I want to share the model, a 150-MB folder of STEP geometries will likely discourage people from downloading the model. 

    So I need the STEP files small to load faster and to take up only a modest amount of disk space if I go on to sharing it with others :) 
  • michael_mcclainmichael_mcclain Member Posts: 180 PRO
    @tony_soares459 Like Konstantin suggested you can go through the model and clean it up for simulation purposes. Use some of the direct-editing tools like delete face or replace face to get rid of unnecessary geometry to cut down on the number of geometric entities which will be exported.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,599
    Do it in a branch so you don’t mess up your model. 
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,418
    Thank you both! I wish I could ignore file size. Sadly... I can't.

    For one, the larger the file, the slower the the geometry loads for simulation (generally speaking). This is a problem when you have many large STEP files. A delay of a 2 seconds is acceptable but a delay of 20 seconds is excessive for the type of simulation I'm doing.

    Also a concern, if I want to share the model, a 150-MB folder of STEP geometries will likely discourage people from downloading the model. 

    So I need the STEP files small to load faster and to take up only a modest amount of disk space if I go on to sharing it with others :) 
    @tony_soares459 Maybe I'm stirring the pot on this one by following up, but I have a couple thoughts on this.

    I'm sorry that you find yourself in a situation where you have to think about these things.  This conversation is something we hoped to eliminate by creating Onshape.  From our point of view, having to worry about file size and storage is a very Old CAD thing to have to think about.  It shouldn't need to matter to you how much space your design takes up, that is something that we have tried to make our problem instead of yours.

    As far as the discussion of simulation goes, I think that what we're really trying to get at here is Model Complexity rather than File Size.  As you found in https://forum.onshape.com/discussion/12021/more-efficient-sketch-or-solid-patterns#latest , geometrically identical models can have very different storage requirements depending on how they were built.  I suspect, though, that the performance of your simulation software will not vary between those different STEP files.  The performance of the simulation software varies with Model Complexity, not File Size.  Trying to optimize file size using different modeling techniques to produce identical geometry should not have any effect on simulation performance, since the file is just a vehicle for the model, which has identical geometry in either case.

    As far as worrying about someone not wanting to download your designs because they are large, we built a robust permission-based sharing system to avoid engineers having to download and share their files over email/dropbox/flash drive.  With Onshape we are trying to promote the idea of having one source of truth instead of a bunch of files zooming around all over the place, complicating what the most recent version is, who has the current design, and whether the receiver of the design can even load the design once they have it.  Hopefully, downloading files can become a thing of the past.  Maybe your collaborator would like to receive an Onshape share instead of a STEP file?  Then they won't have to worry about whether your file will load into their system just to get a look at the design; instead, they can just look at the design at the source of truth.  There's even more power here than immediately apparent:  Let's say you are sharing with a few manufacturers to get some quotes on one of your designs.  You can share the design with those manufacturers without export permission, so they can see your design, spin it around, take measurements, and give you a quote, but not export a STEP file of the design.  You could then decide on a manufacturer and extend export permissions to that manufacturer while unsharing from the rest of the manufacturers. Now, only the company that you have decided on has access to your data, and you have an audit trail if some design is leaked.  In the Old CAD world, you had to give your data to every one of those manufacturers, and you may have no idea where to start if one of them leaked your design.
    Jake Rosenfeld - Modeling Team
  • AlexPittAlexPitt Member Posts: 4 PRO
    @Jake_Rosenfeld I don't think this conversation has gone away yet sadly. Trusted collaborators will sometimes need to work outside of Onshape, exporting models for use in other systems. 

    It would be great to have tools to facilitate geometry simplification because if anything, this is playing along with the "Single Source of Truth" philosophy.  It means that the primary "source of truth" can still be held securely within Onshape (with view only permissions let's say) and a simplified model easily created for export.

    Imagine if export options could be limited to a simplified "shrink-wrapped" model, stripped of internal detail.  Something akin to a 3D version of a hard copy PDF. A competitor couldn't then just load the exported model into say, Inventor and be "good-to-go"! 

    I'm dreaming of something like this... https://www.elysium-global.com/en/news/simplify-your-3d-models-collaborative-engineering-based-on-lightweight-cad-data/.  
  • john_mcclaryjohn_mcclary Member, Developers Posts: 2,148 PRO
    Either way, step files are relatively small and extremely compressable with .zip

    If you can subtract extra features for export in manufacturing. Then thoes features probably don't need to be in the model anyway.

    alternatively you could practice some new techniques during design by adding a checkbox config called "light weight"
    Then set the fluff to suppressed.

    Then once you get into an export frenzy it will just be a checkbox and you will be more confident in WHAT was suppressed (possibly it is just a delete face feature that lives at the bottom of the tree). Rather than having a computer guess what features you don't want today.

    Sounds like a scary thing to release step files for mfg or sim that may be missing something important that you didn't see the 'auto simplified' removed.
  • tony_soares459tony_soares459 Member Posts: 57 ✭✭
    Thanks all! To add some context:

    1. The STEP files are for simulation outside Onshape. The simulation doesn't run in the cloud. There is no manufacturing involved.

    2. Compression helps in sharing the model archive with others, but the concern is part that large files take longer to load during simulation. The simulation won't run with compressed files.

    Removing fillets and chamfers and unnecessary features helps, but doing this individually for hundreds of features across tens of part studios can take a day or even days to do. It works... and it's my best bet when I realize my STEP files are too large... but I do it wishing I didn't have to :)

    A "shrink-wrapped" model seems useful in some contexts, though here I very much need to preserve detail in the parts. I don't want hollow parts to come out solid (or, even worse, as plain surfaces without volume inside)... This would make it impossible to calculate inertial properties from the part geometries (something I do outside of Onshape).

    Thanks again for pitching in!
  • john_mcclaryjohn_mcclary Member, Developers Posts: 2,148 PRO
    Like jake said, file size shouldn't affect simulation. It is all model complexity.

    For the most part, being neutral format. If you draw the same part in another software the file should be a similar size. All a step is, is a description of every point, edge, face to be read and interpreted by any compatible software.

    As far as .zip goes, it is for sending thru email, or whatever. Naturally you will need to unzip at the destination and open in simulation. Zip takes a second or less to compress and uncompress. So it is a very quick alternative to manually deleting features. Because of the repetitive nature of a step file, the size gets compressed very small, I don't know the average ratio if you have tons of contours etc. But I think it is around 70% smaller or so.
Sign In or Register to comment.