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.

Options

imported dxf problems

mlml Member Posts: 53 PRO
edited July 2016 in Community Support
hi all

i have a simple structure (d-sub 9 pin) imported from another programm we use in electronic engineering: https://cad.onshape.com/documents/150b4b8582755bae310054ab/w/e7f86ea4d976b93e892239e1/e/ae4e6be500f0024054ffe3f8

the endpoints of the arcs and lines are not coincident so i cant work further on with:
- select all and drag
- extrude

why are they not coincident? yep, i found some other post with the same problem, but no solution.
even if i would - there are other, more complicated structures with many more points - how could i select the two appropriate points to set them coincident?

after, is there a way to group them together?

best

Answers

  • Options
    lougallolougallo Member, Moderator, Onshape Employees, Developers Posts: 2,001
    @ml DXF does not come in with constraints.  I looked at the model and it was just not touching in one of the corners.  Typically you can pick one vertex and drag it off and back to the endpoint.  In most cases you can so some cleanup and fix it.  We do not yet have a block function but you could window select and fix the entire sketch.  Moving it would require to window select again and use the transform sketch from the context menu.

    Lou Gallo / PD/UX - Support - Community / Onshape, Inc.
  • Options
    mlml Member Posts: 53 PRO
    thank you for the answer - but i am not pleased with it at the moment.

    - do get facts: what is the distance in mm at the corners now which are not touching? i am not able to zoom so deep to see and measure it. 
    - please be aware, that other cad tools shows it as closed. what is the difference in onshape?
    - how can i easy select the two endpoints? if i drag a rectangle over it, they are not selected... each separately is boring and needs to separate one first that they are distinguished

    because we will need this in future more often, we look for a less manual process.
    will try to solve it in featurescript, hoping you can give me hand.

    best

  • Options
    dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    Hi, ml.

    I feel your pain. I ran into this problem importing DXF as well.  The problem is generally caused by rounding error. Here's how it happens:

    (1) Original DXF contains lines and arcs. ( as opposed to LWPOLYLINE)
    (2) DXF specifies arcs using center point and begin/end angle.
    (3) the lines specifiy end and start point, which are in the file to crazy precision 1.0000024 or whatever.
    (4) the arcs do NOT specify the end points. math is required to compute the start and end points based on the start/end angles.
    (5) the math from 4a produces a slight mismatch when computed. The mismatch means the points do not match up.

    If you have access to change the original DXF, you can fix the problem if you change it to use LMPOLYLINES.  These can have both lines and arcs, but more importantly, the arcs in this format are specified in a strange 'bulge' syntax.  It specifies the endpoints, so there is no rounding error.

    I solved this problem when i needed to import a bunch of DXFs for this profile generator.  I ended up writing some routines that convert DXF files into FeatureScript code that is guaranteed not to have any mis-alignments. The featurescript code produces a sketch.

     I've considered releasing it as an app. Would it be helpful to you?


  • Options
    mlml Member Posts: 53 PRO
    thank you for the explanation. now i am able to understand it.

    for sure the app would be helpful. i expect it would cost and it would be ready somewhere in the future....


  • Options
    dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    PM me if you are interested and maybe I can do a couple of samples for you...
Sign In or Register to comment.