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.

QRCode won't extrude because of barely touching corner?

david_fortdavid_fort Member Posts: 8 EDU
Hi, I've been following forum post discussions for 3d printing a QR code, and I'm having trouble getting it to extrude.  The problem is when 2 corners just barely touch (or perhaps just barely don't touch.  I have a simplified sketch here:

https://cad.onshape.com/documents/96ada4d75a553d60de01a62d/w/3f4e7228e0a5580651a67e7d/e/5d63281ff5b877635dc3d1c3?renderMode=0&uiState=664b70dae0801b6760e1aecb

which illustrates the issue.

The "preview" of the extrusion looks ok, but it goes "red" and the extrude error message says, "failed to extrude selections, check input".

This is the sketch:


and this is what I'm trying to extrude:


Any suggestions for how to get this to extrude?
(other than changing the sketch to put some distance between the 2 corners that just barely touch)

Comments

  • S1monS1mon Member Posts: 2,989 PRO
    There either needs to be a gap or overlap. You can’t have shapes sharing just a point in 2D (which would turn into an edge in 3D). 
  • _anton_anton Member, Onshape Employees Posts: 410
    Yep, this is unsupported. Search the forum for "nonmanifold geometry".

    We do have a QR code feature: https://forum.onshape.com/discussion/22768/qr-code-feature
  • david_fortdavid_fort Member Posts: 8 EDU
    edited May 20
    Thanks. I saw the QR generation feature and that is really great, but it doesn't produce the same QR code picture that I was given.
    (I don't understand that.  The one I have and the one that generates both give the same text when I scan them.  I've tried the various "error correction" choices, and have tried a number of online QR code generators, all with the same effect: My QR code has more squares than any of these do).

    (edit: I think I have a "model 2 version 4" QR code, which means it is 33x33 according to:
    https://www.keyence.com/ss/products/auto_id/codereader/basic_2d/qr.jsp#:~:text=QR codes are classified into,larger version contains greater data.
    )

    I have the QR as a .png, and converted it to SVG using Inkscape.

    I'll try fiddling with the conversion parameters in Inkscape.  Maybe I can get it to round the corners a bit.

    Management summary: I agree the problem is the 2d picture results in a non-manifold geometry because there is overlap of "one point" at the corner in the sketch.
  • _anton_anton Member, Onshape Employees Posts: 410
    You can fiddle with the options here if you want to narrow down the difference: https://www.nayuki.io/page/qr-code-generator-library

    Best explanation I can see is that your code was generated at a higher version ("version" just determines the pixel count). Another thing to check is that the text is exactly identical; a small change can lead to a totally different QR code.
  • david_fortdavid_fort Member Posts: 8 EDU
    boom! that qr generator has the needed options to replicate!
    Error correction:Low Medium Quartile High
    Output format:Bitmap Vector
    Border: modules
    Scale: pixels per module
    Colors:Light = , dark = 
    Version range:Minimum = 4, maximum = 20
    Mask pattern: (−1 for automatic, 0 to 7 for manual)
    Boost ECC:   no
    Statistics:QR Code version = 4, mask pattern = 0, character count = 8, encoding mode = numeric, error correction = level M, data bits = 41.


    now I still have a non-manifold picture, but at least I know how to generate it from scratch.  :-)
  • david_fortdavid_fort Member Posts: 8 EDU
    I'm very much in the shallow end of the onshape pool, and was mostly wading into this QR thing as a way to learn more about onshape and now I'm thinking about digging into your FeatureScript to make MIN_VERSION 4 (to get 33 squares) or maybe bring that out on the UI.

    Might be a fun education.  I've already learned more about QR than I planned, swimming around in the deep end of onshape might be good too.

    Thanks for your help!
  • _anton_anton Member, Onshape Employees Posts: 410
    So I initially resisted adding a min-version field to the feature (because why would it be needed), but I've added it now. See if you can use it to produce the same QR code at version 4?
  • david_fortdavid_fort Member Posts: 8 EDU
    I'm sure I did not plagiarize the FeatureScript in the "right" way, but with some cutting and pasting,


    that is the "version 4" code for 00007539 with 33 blocks.

  • david_fortdavid_fort Member Posts: 8 EDU
    yep. works very nice.
    (and I agree, "why would you need it?". It is just a way to make the QR code more complicated than necessary.  In my case, I'm just trying to match a QR code that someone else made with version 4.  I don't know why they did.  The version 2 version scans to the same text, so . . . maybe their software isn't as clever to automatically find the minimum version that can encode the text).

    Thanks!
Sign In or Register to comment.