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.

How to Constrain and Entire Imported Sketch Element (dwg)

matthew_stacymatthew_stacy Member Posts: 487 PRO
@NeilCooke created a nifty video demonstrating how to insert a dxf/dwg file into a sketch (https://www.onshape.com/en/resource-center/tech-tips/tech-tip-turning-your-2d-drawings-into-3d ).  All good.  But is there a way to constrain the entire sketch once it has been transformed to the proper location?  I'm seeing a lot of blue there!

I was hoping to just do a Box Select and Fix.  But that is insufficient to constrain an entire sketch.

Suggestions?

Answers

  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭
    interesting. You're right, box select seems to grab lines, but not their endpoints. With imports, I just never bothered trying. Blue is usually bad when it's also halfway related to other stuff before it which could change it in unexpected ways. If you're importing a dxf, it won't have any external references (other than which plane it's placed on), so the blue isn't really a concern for me, though I know it can feel strange leaving it after a career of forcing yourself to make all sketches black.
    I'd also really love for Onshape to roll out some kind of sketch block functionality which could be used to create a library of recurring sketch items to be placed into sketches, preferably also grouped together somehow, so you can't accidentally modify the group. I can think of some workarounds for this, perhaps with Featurescript, but it's not the same.
    Evan Reese
  • matthew_stacymatthew_stacy Member Posts: 487 PRO
    @Evan_Reese, I appreciate your comments and consideration.

    However, fully constrained sketches are too deeply ingrained in my core to ignore.  Zero DoF or bust!  If I can construct other sketches/surfaces/solids from it then it needs to be black. 

    From what I observe this anomaly is specific to imported dwg/dxf geometry inserted into a sketch.  BOX SELECT > FIX will fully constrain native Onshape sketch entities.  But it will only partially constrain imported dwg/dxf geometry.  Imported vertices seem to be omitted from the BOX SELECT and must be selected individually.

    Consider the following example:
    After inserting the DXF 22 mouse clicks are required to fully constrain the sketch:
    • ONE click (and drag) to box select all of the line segments and arcs
    • TWENTY clicks to select individual vertices
    • ONE click to FIX the 21 entities selected

    There is a standing offer on the table for an icy cold microbrew (or several) to the first clever Onshaper to devise a clever solution to this (in full compliance with CDC guidelines for distancing and hygene).  All you have to do is beat 22 keystrokes by a significant margin ... and come to Reno to collect.
  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭
    If you're looking for that extra assurance that it will never change, you could insert it into its own part studio, make a version, then derive that sketch into your working part studio, referencing the version. I wouldn't bother, but you could.
    Evan Reese
  • steve_shubinsteve_shubin Member Posts: 1,096 ✭✭✭✭
    edited November 2020
    @matthew_stacy

    SEE POST BELOW



  • steve_shubinsteve_shubin Member Posts: 1,096 ✭✭✭✭
    edited November 2020
    @matthew_stacy


    Extrude your imported DWG down
    Select top plane
    Select use tool
    Select top face of part

    You now have a fully constrained sketch


  • steve_shubinsteve_shubin Member Posts: 1,096 ✭✭✭✭
  • steve_shubinsteve_shubin Member Posts: 1,096 ✭✭✭✭
    edited November 2020
    @matthew_stacy

    If you don’t like having the unconstrained imported DWG sketch in the same document, and as the first feature


    Then —

    Extrude unconstrained DWG

    Export part

    Import part into new document

    Select top plane

    Employ USE tool



  • matthew_stacymatthew_stacy Member Posts: 487 PRO
    @Evan_Reese, I concur with your assessment.  Inserting the dxf in a new Part Studio, versioning, and then using the Derive Part tool to insert the versioned sketch into the original Part Studio is  way too cumbersome and clunky even for me.  At the very least it is a more elaborate sequence than I can craft into a sentence without violating myriad rules of grammar.

    @steve_shubin, I appreciate your suggestion but the sketch into which the DWG was originally inserted is still under-constrained and vulnerable to corruption. 

    In my opinion, fully constrained sketches are a fundamental building block for robust 3d models.  This is even more important in the context of Onshape's unrivaled collaboration capabilities.

    The beer stays in the fridge for now.
  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭
    I think in steve's instance he's using the export/re-import step to essentially lock it down.
    Evan Reese
  • matthew_stacymatthew_stacy Member Posts: 487 PRO
    @Evan_Reese, right you are.  Or rather, right @steve_shubin is.  Steve's approach does indeed provide a degree of isolation, but crikey!  That's a pretty elaborate dance to achieve my end result.  So far 22 mouse clicks isn't looking that bad.  Or at least not as horrible as it originally seemed. 
  • steve_shubinsteve_shubin Member Posts: 1,096 ✭✭✭✭
    edited November 2020
    @matthew_stacy
    @Evan_Reese

    Here’s the sequence
    unfortunately when I make longer GIFs, I get dropped frames. So ...

    But this is exactly how long it took to do what I did

    One way this will come in handy is if you are working with very involved DWG’s or DXF’s. This will definitely save you time




  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭
    I'm still in favor of just leaving the blue sketch alone (label it "NO EDIT" if that makes you feel better) and continuing to bug Onshape to add sketch blocks.
    Evan Reese
  • PrachiPrachi Member, OS Professional Posts: 262 ✭✭✭
    +1 for sketch blocks
    Big time saver on some projects
  • bryan_lagrangebryan_lagrange Member, User Group Leader Posts: 834 ✭✭✭✭✭
    It would be nice for Onshape to have a command similar to Solid Edge's relationship assistant command. Highlight the sketch entities, select the type of relationships and dimensions you want added. select the x/y datum and dimensions and relationships are added.

    sketch entity:

    relationship assistant constraints selected
    relationship dimensions selected
    resulting sketch
    Bryan Lagrange
    Twitter: @BryanLAGdesign

Sign In or Register to comment.