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.

Export STL of Assembley with all parts in context

Hello,
I have a large assembly that uses many unique and standard parts. I would like to export the assembly as an STL with individual parts. I would like it that when I open the parts in another software like Blender that all the parts open where they should in the exact same place as in the assembly. Currently, all the unique parts that were made in a part studio open correctly in context however the non-unique parts are not there and the standard content all opens on the origin clumped together.

Is there any way to fix this? Perhaps a way to move the assembly to a part studio and automatically making all the parts unique? I would really prefer to not have to reassemble all the parts in a part studio manually if possible. 

Best Answer

  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    Answer ✓
    Create a new part studio in cotext.
    Do a transform->copy in place
    Select all parts

    Then export the part studio

Answers

  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    Answer ✓
    Create a new part studio in cotext.
    Do a transform->copy in place
    Select all parts

    Then export the part studio
  • christopher_starkechristopher_starke Member Posts: 9 EDU
    Wow thanks so much for the fast reply it worked perfectly!
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    Cool :)
  • rune_thorsen229rune_thorsen229 Member Posts: 182 EDU
    john_mcclary and christopher_starke
    Best way to select all parts in context?
    If I simply select the area of all parts, will I be sure that all parts have been selected?
    I'ts for the copy in place when creating a 3D print layout and for that purpose I'd also like to keep the partnames but apparently its not possible?.
  • rune_thorsen229rune_thorsen229 Member Posts: 182 EDU

    owen_sparksjack_heslin  or @NeilCooke could be interested in.

    I have this assembly 'PrintPlate'  As you can see I have given some parts  blue( PLA material) and others yellow (TPU material) appearance.

    Then I copy in context in printplate-part with the transform. Try update context 

    but as seen appearance is not consistent (yellow plate has become gray) with the assembly. Is it a bug?

    Secondly I will export this to a slicer for 3D printing (Cura) where I have to assign the two different materials to each part (long error prone process that has to be done with each change). What can facilitate this step.

    1. Have a way of exporting yellow parts to one STL and blue to another?

    2. Maintain coloring in the STL so it appears differently on the Cura plater?


    What are the possibilities?


  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    I just window select, 

    You loose part names because transform copy doesn't care about copying properties (i think )

    If that is true there may be a way to make a custom copy part that keeps the meta data '

    Ds that a true statement @MBartlett21
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    Believe all the parts you select an once in the part list will be added to the same export file. 
  • rune_thorsen229rune_thorsen229 Member Posts: 182 EDU
    edited March 2020
    john_mcclary thanks. As always you are right on. I would cosider "You loose part names because transform copy doesn't care about copying properties (i think )" as a bug.

    Did some testing because I needed to know and document it here: 
    Only parts currently with visibility 'on' in the assembly are transformed when selection (As should be expected).
    Invisible (buried parts) will be transformed by left to right selection and right to left selection (As may be expected). 
    A secondary left to right or right to left selection will NOT deselect (Useful but maybe not expected). 
    A buried part cannot be selected directly. (To do so toggle visibility in Assembly - update and modify 'Transform')
    Notice that part order may be totally scrambled with respect to the Assembly order (Really annoying taking into account the properties - bug. )
    Thanks again John.


  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    edited March 2020
    Hello.
    (1 STL Color)
    I don't believe STL files have colo(u)r as a property so not much Onshape can do here on that front.  (Hopefully there is a move away from STL soon as it's not a data rich format.  Makerbot's software for example can take proper CAD file types and has for years.  You can import an entire assembly and then drag individual parts onto several print beds.) We're long past due for slicers catching up with more sophisticated file types.

    (2 Copy Properties)
    There is an IR here to preserve meta-data when copying or patterning a part in a PartStudio.  I think it's a little harsh to call the lack of this data a bug.  The current implementation does exactly what we've told it to do, but we'd like it to go further in some situations.  The copy in place of an in-context edit is a great workaround, but in the long term we shouldn't be duplicating parts like this.  The new exploded views, erm, explode things, but a layout functionality along that sort of interface is where I feel we should be heading.  That way were referencing the actual parts, not dumb copies of them.

    (3 Placement)
    If it were important to me to have a print layout in CAD then I'd place a mate connector on each part on the face I want pointing down on the bed.  Next I'd have a layout sketch with corresponding locations, and finally a bunch of transforms driven by a configuration checkbox to either "show assembled" or "show as orientated on print bed".

    That's a lot of work though and I'd reiterate here that personally having printed thousands of parts I've never done that for real.  The reason is that a CAD software doesn't have a slicer built in.  Just about every print job I set up needed to be constrained for time.  (Say 8 hours  before I go home or 15 hours overnight.)  So I'd be constantly reordering the bed contents for desired material, strength or print time available.
    I could see this being different in a classroom environment for a standard exercise though but I'd still counter that the CAD software would not be my primary go-to for bed layout, that's what slicers are for.
    Cheers,
    Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    The transform copy isn't really a bug, I'm sure it is intended to output a clean model.
    That is the "normal" usage of transform/copy.

    I believe I have seen options in the feature script documentation to copy meta-data. but I'm not very keen on featurescript coding as I should be. ;p

    I will defer to the experts in this regard. That being said. if you can copy the meta-data, then a quick featurescript could be written to copy your parts how you expect them.

    As for part order, it should follow the selection order. Because we are window selecting.. yea, there will be randomness. Otherwise it is systematically processing each part in the order it was selected.
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    edited March 2020
    The transform copy isn't really a bug, I'm sure it is intended to output a clean model.
    That is the "normal" usage of transform/copy.

    I believe I have seen options in the feature script documentation to copy meta-data. but I'm not very keen on featurescript coding as I should be. ;p

    I will defer to the experts in this regard. That being said. if you can copy the meta-data, then a quick featurescript could be written to copy your parts how you expect them.

    As for part order, it should follow the selection order. Because we are window selecting.. yea, there will be randomness. Otherwise it is systematically processing each part in the order it was selected.
    Hi John.
    Featurescript has a native "set" method for properties, but not a "get" method.  This inhibits circular references but does limit us somewhat.  I believe there is a clever method involving an intermediate boolean operation to sidestep that but it's a bit of a workaround again. I'm pretty sure that was @MBartlett21 's work.
    ***edit, wrong it was SuperJake. See below for link.
    Owen S.

    Business Systems and Configuration Controller
    HWM-Water Ltd
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    I know you can't read a value and save it to a variable, but I thought there was a way to forward the values to the resulting body
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    Hi John.
    Featurescript has a native "set" method for properties, but not a "get" method.  This inhibits circular references but does limit us somewhat.  I believe there is a clever workaround involving a intermediate boolean operation to sidestep that but it's a bit of a workaround again. I'm pretty sure that was @MBartlett21 's work.
    Owen S.
    @owen_sparks
    You're giving me too much credit :D
    That was @Jake_Rosenfeld 's work: http://onsha.pe/documents/490b3f3a8dd5c84e1807bc65

    I am not sure if it works with in-context bodies though.
    @Jake_Rosenfeld would you know if we can do it?
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Doh, thanks MN and sorry Jake 2, I didn't mean to rob you of the glory.
    Owen S.

    Business Systems and Configuration Controller
    HWM-Water Ltd
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    "Super Jake" is definitely a first :)

    I will brainstorm how this might be done for in-context, but the approach this feature takes won't work so I'm not sure yet...
    Jake Rosenfeld - Modeling Team
Sign In or Register to comment.