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.

Handling large STP files

mischlmischl Member Posts: 28 ✭✭
hello all

I am working with OS for a while and it is still awesome. 
The only point where I constantly struggle is the import and handling of step files.

We work with electronic pcb's (printed circuit boards).Example:


The stp file is 37.3 MB.
mostly they come from altium. similar discussion, but not knowing about the data volume there: https://forum.onshape.com/discussion/3737/step-file-import-from-altium

Questions:
1. can this volume generally be handled in OS? the model appears after a certain time but is very slow or not to handle. sometimes chrome become unresponsive or crashes... if it is the wrong tool, ok.

1.1 if not: because we only need some specific points and objects for mechanical adapting, what would be an efficient way to reduce objects of the stp file? 1.2 for example the ethernet connector is builded very accurate with all its details even inside. but only the cover would be enough. but how to reduce to the hull only?

I thought about stl-files, but:
1.3 the same problem of too detailed files. so same question: how to reduce them?
1.4 OS can't import them. perhaps soon:  https://forum.onshape.com/discussion/533/how-to-import-stl-files/p4

1.5 imported the model twice, approximately 75 MB. deleted them both, but the document list still says it is 79 MB. will them not be deleted once?

thanks in advance for any hints.
cheers

pcb.png 155.9K

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,307
    Seems like an awful lot of detail for a PCB - do you really need the pin-outs? See if there is a simplified output option from Altium. Having said that the faces are all prismatic so Onshape should be able to handle it no problem. 

    The Document size increases because Onshape records each step. Copy the Document to remove this history.
    Senior Director, Technical Services, EMEAI
  • mischlmischl Member Posts: 28 ✭✭
    Thank you Neil for the answers.

    Yep, there are output options at altium: https://techdocs.altium.com/display/ADOH/Step+Exports

    So I exported only what i need and imported it with the 'Import file to Part Studios only (flatten)' option. Otherwise I got a lot of unnecessary tabs.
    In the assembly they should be all parts stick together. now how to group the several parts in the Part Studio to one piece? Boolean does not work, fixing them in the assembly is not the prefered way.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,307
    To keep your top level assembly tree uncluttered, make a subassembly.

    Create a new assembly, insert the entire PCB Part Studio into it, fix the board, then Group all the parts together. Then insert your new PCB subassembly into your top level assembly.
    Senior Director, Technical Services, EMEAI
  • mischlmischl Member Posts: 28 ✭✭
    sounds straight and logically - thanks for this basic help
  • mischlmischl Member Posts: 28 ✭✭
    when I was writing the last comment I have tried it and it seemed to work very well.
    In the meantime I spoted two other things:
    - beside the several parts there is a categorie 'Surfaces' at the end with 517 entities presenting an USB port connector. At the insert into Part Studio they are not available at all.
    - I have tried to import another step file of 5.3 MB. a very basic design: only a flat plate with holes and cutouts. I got only the file info tab but no step itself after. when checking with a free online step viewer I can see it correct.

    thanks in advance
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,307
    You are right, surfaces do not show in assemblies. The step files could be badly exported or Onshape is unable to read them. You should open a ticket and we can look at them to see what the issue is. 

    5.3MB does sound a lot for a board with holes. Did you try Parasolid? That would be more compatible. 
    Senior Director, Technical Services, EMEAI
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited May 2016
    I bring in surfaces and solids using parasolids "x_b".

    I choose flatten to part studio. Not sure about assemblies as I don't use them yet.

    Stp is a human readable file format, it's big. x_b is binary (compressed)(zipped) and you'll find it's more portable.

    My last export into OS using x_b, the colors matched the sending CAD colors. What a treat.

    If I was working with that pcb, I'd grab 10 surfaces representing the board, highest components and connector interfaces. I would never allow something like that into a layout. You'd kill any CAD system with that thing. 



  • mbattistellombattistello Member, Developers Posts: 51 ✭✭
    Interesting discussion on using OnShape for PCB modelling. Im working on something similar using the PCB IDF format. The application uses the IDF files to generate the 3D models inside of OnShape. The user uploads the IDF files and then the application uses them to build the board, map in components from its library, and then import into OnShape. I have a development version working. If you can share IDF versions of your board Id be interested in trying them out to see how it loads. 

    I have had good success with STP files 10MB+. See the below image for a Arduino board I imported. (Ignore the couple erroneous component mappings that are showing up) I run the import using APIs behind the scenes. It generates 3 tabs - imported step file reference, assembly, and a flattened parts.


  • mischlmischl Member Posts: 28 ✭✭
    @billy
    thank you for sharing your knowledge. parasolid sounds good, but is not an export option in the program at the moment.
    how would you 'grab' the relevant surfaces? modelling from scratch in OS or ....?

    @mbattistello
    cool that you started posting your first comment on this topic.
    i've checked: IDF is an export option. it seems that all data will be exported so we are not so eager to share it because it is a customer work under a non disclosure agreement.
    sounds interesting. will your app become available to any? when?
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited May 2016
    mischl

    That's a great question.

    in SW:
    you highlight the faces, click on save-as, pick x_b, and it allows you to save the selection list.



    in OS:
    one would think this would export the selection list, it doesn't it exports the solid. Not sure how you deconstruct solids into surfaces inside OS. I don't think you can do this in OS.



  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited May 2016
    Everybody here will handle this differently. If the pcb was going into an iWatch, I'd import the whole PCB into CAD bcause it's very important to get it really tight. If I'm packaging wifi pcb's going into an emi case for airplanes, I'd simplify the pcb's. Or, Pcb's inside a VME card cage, I'd simplify them. An arduino, I'd simplify it.

    IDF files are pretty & dangerous.


    Here's a thought.

    Your design 10mBytes:


    My design 1kByte:






    I just stuck an image on top of a simple extrude.

    I'm very mindful of what enters my layouts, assemblies or part studios. What ever method you choose to design. IDF files are not friendly to CAD systems and can bring your system down to a crawl. I don't care what system it is.


  • mischlmischl Member Posts: 28 ✭✭
    @billy: thank you for sharing your knowledge with a newby, it led my the right direction.

    today morning (western europe) I was able to import my 37MB file from a third party - which I can't strip down at the export somewhere because it is not me - to import in an blank sheet and handle it veeery careful and step by step, all time waiting until the processing command has finished.
    it resultet in 7368 surfaces (nothing else). I could select the board and plug layouts needed for the mechanical adapter plate - the reason why we are in OS. ok just one of them.
    first I used only lines, later I found out that interfaces were also possible (gray areas).
    then exported them to a parasolid thanks @billy 's hint. resulted in 1.2MB, seems ever to be a x_t and no x_b option.
    imported it in another blank sheet:

    stripped to what I need basically: baseboard with outline, mounting holes and the front of  the connectors (looks like the houses in the old west with tall frontsides and not much behind, but it is fine). still very responsive to handle.

    another option would be to draw the baseboard by myself, look for the step-files of the connectors online (industrial standards) and place them. It took a bit longer for this insight..

    cool! I have now two ways straight forward:
    - shrink our own designs at the export level to a minimized step file
    - massage external step files in OS for reduction

    i know it's only online cad, but i like it

  • mischlmischl Member Posts: 28 ✭✭
    hmmm, I deleted some parts left and tought I could then easily import it into an assembly, but it does not appear for the import.
    what is the way now? at the end, it must be mated there with other components.
  • mbattistellombattistello Member, Developers Posts: 51 ✭✭
    Ive experienced many of the concerns with the IDF files and imports into CAD packages. I built a light weight tool that dealt with some boards that had 1000s of holes that would bring CAD to its knees. Ive also had cases where users dont necessarily want the components mapped to 3D models. Let me know if you thought having the following 3 options on importing IDF files would cover most use cases and provide value as an app in OnShape.

    1. Full import & automated mapping of components to full 3D models - Heaviest of import but I have seen where ECAD/MCAD users want to get a picture of the board with actual components so they can do renderings, run mechanical & thermal simulations, and get rapid prototypes of the boards made.
    2. Full import & placeholder "cubes" for components - Slightly lighter than #1 as the components would come in as boxes based on the keepouts defined in the IDF files.
    3. Board & cube components w/option for additional filtering/restrictions - Same as #2 but with filter options on holes, based on diameters and type, and with options to skip creation of cube component keep outs.

    -Marc
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited May 2016
    mischi-

    Why don't you share the model with me. We'll version it, branch it and let me take a stab at it. billc@rndengineering.com

    Do you see all those holes going through the pcb? The vias, these are probably not needed for your design. I'd remove all those dots.

    Drawing over something is a perfectly valid polygon reduction technique and it's fast. 

    Here's a bolt from McMaster Carr, now most people love the thread. To me it's an ever changing plane that sweeps around in space. This requires a ton of polygons to render on your screen. To me it doesn't matter to my design and doesn't help my product get any better, therefore the helical sweep must go away. These threads only tax my computer's resources therefore I'll elect to remove them.

    McMaster Carr bolt:


    One feature, a simple extrude:

    I'll add a chamfer to make the bolt look some what appealing and then add this to my library for use.


    So one bolt reduced down into less polygons. Big deal. But if you use this in a 150 places, it's significant. Some will say that you can't see the threads when it's threaded into a block but video boards have to render it weather seen or unseen. They've been working on culling unseen polygons, but it take longer to decide weather or not to render it vs. just displaying it. Most CAD companies just render every polygon. OS appears to working on polygon density based on geometry to effect performance. I think their display looks great. Better than my desktop solution. But I think we still need to help them keep our layouts clean and polygon free.

    Most people don't care what ends up in their designs and then they complain that it takes 10 minutes to load a project or 5 minutes to save an assembly. I have no pity for these engineers.

    It's good to know squares render really fast, cylinders take longer and spheres take the longest. When looking at an object on the screen look at it's geometry and know what it takes to render it. I think this is a good thing for an engineer to know.

    I had a friend modeling the hole in a aircraft fuselage by cutting a hole through a thin solid representing the sheet metal skin of the aircraft. After 1,000 holes the CAD system came to a halt. I explained to him what a cylinder to cylinder intersection was and how this intersection had to be computed for each hole requiring a ton of cpu resources. It wasn't the CAD systems fault the computer kept crashing. At the end of the day I convinced him that a point located at the intersection of a vector and a cylinder was all he needed. How many rivets does an airplane have? Do you see the problem?

    Displaying a perforated panel has been a nightmare for CAD, spaceclaim identified these rendered patterns and repeated the results versus recomputing each hole through the plate in the rendering algorithms. The result was the fastest perforated plate render algorithm on the market. Who cares right?

    There's a lot going on to get that pretty picture on the screen. I guess I'm just trying to make you aware of some of the issues so you can build a really great design layout.




  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited May 2016

    Got your shared doc, thanks

    wow, you’ve really stripped this down! You did a great job. The only thing I would add is maybe a surface or 2 for PCB component heights. The PCB, I would have chosen the other side so I could mount the PCB more easily and you’d know the distance from the pcb to the connectors, which might be critical in your design. In OS you might want to add mate connectors to each connector so you can quickly attach things to the PCB.

    can you post the original model inside Onshape so I can strip down the original?


  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited May 2016
    Ok, here's something to discuss.

    Here's a tessellated view of your stripped down model:



    See each through hole and how it jacks up the tessellation count:



    Remove the holes and drastically reduce polygon count:


    When you buy a video board, read the box, it'll say how many polygons it can render per second. 30 frames per second for the eye to see smooth motion and you'll need 40,000,000 polygons/sec. Nvidea makes the best video processors with the highest display rates.

    My little 2lbs computer has a crappy intel graphics processor. I stopped using openGL 8 years ago when the 1st intel based macbooks came out. This forces me to watch what I'm doing. I don't believe a CAD system should handle all the stuff people throw at it and really wish people understood what's going on. One of the nice things about OS and webGL, I get graphics acceleration. Yahoo, let's party!



  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    marc-

    I guess these guys that write IDF translators try to get it look right. For many that's all that matters. Then for those who know, we understand those looks come at an extreme cost.

    PTC had shrink wrap 
    SW allowed assemblies to be saved as exterior faces only

    But no body can beat me picking at the model and creating what I want. I'm not sure this can be canned into an algorithm. I think it's an educational thing.


  • mlml Member Posts: 53 PRO
    ok, only surfaces = no parts, so no import into an assembly.

    @billy: how did you reduce the holes inside the board in OS?
    i was now able to strip down by myself
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    The short answer-

    I didn't.

    Surfaces can be trimmed and CAD doesn't show the surface inside the trimmed boundary. So, to remove those holes from your surface I just untrimmed the holes from the surface. You can't do this yet in OS.

    In solids you could extrude surface to surface which removes the holes then surface the model without the holes.

    There's a lot of games you can play to reduce geometry down to something more manageable.

    Remember this:
    points
    lines
    arcs
    splines
    surfaces
    trimmed surfaces

    That's it, all the geometry you'll ever need.




  • Object_MageObject_Mage Member Posts: 13 EDU
    mischl said:
    when I was writing the last comment I have tried it and it seemed to work very well.
    In the meantime I spoted two other things:
    - beside the several parts there is a categorie 'Surfaces' at the end with 517 entities presenting an USB port connector. At the insert into Part Studio they are not available at all.
    - I have tried to import another step file of 5.3 MB. a very basic design: only a flat plate with holes and cutouts. I got only the file info tab but no step itself after. when checking with a free online step viewer I can see it correct.

    thanks in advance
    I'm having the same problem with thousands of surfaces coming from a altium STEP file 
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,307
    @kai_gull check the output options from altium - they may be set to surfaces only? If not I would try speaking to their support team. 
    Senior Director, Technical Services, EMEAI
  • mischlmischl Member Posts: 28 ✭✭
    we select only what is really necessary (parts and holes; the board seems always be included in the export) to keep the export as simple as possible (also simple bodies) and straight. not every via, connector pin and 0201 resistor are important for the mechanical integration. then we use this export settings in Altium:


    here is the documentation from Altium about STEP Export-Import: https://www.altium.com/documentation/18.1/display/ADES/((STEP+Export-Import))_AD
  • Object_MageObject_Mage Member Posts: 13 EDU
    Looks like the app no longer exists. It worked great though. 
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,307
    Fix PCB is here: https://www.onshape.com/features/custom-features

    @Object_Mage it wouldn’t hurt to speak with them. If you share an example with me or support we can take a look at where the problem lies. Don’t assume their export is perfect. 
    Senior Director, Technical Services, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,307
    @Object_Mage - I see Altium can export in Parasolid - that would make more sense. Please try that and post back. If the import is still bad, it is likely coming from their end and you should share the file with support.

    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.