Giter Site home page Giter Site logo

Comments (4)

ChrisWu1997 avatar ChrisWu1997 commented on June 3, 2024

Thanks for pointing this out! The parsing of arc did bother me a lot.

Your understanding of the arc definition is correct. I think the problem comes from parsing data from onshape. When extracting data from onshape, the way that I determine arc is to query the midpoint (see here).

I re-parse this example and printout the midpoint, which gives [-0.043971567347481526, -0.18829072000371472, 0.0]. This suggests it's on the large half of the circle, so it's regarded as a major arc in the final parsed data.

Therefore, I think either I incorrectly use the API to get the midpoint, or I get the wrong edge_id when parsing edge loop of a face. I need more time to review the code, but I'll let you know once I fixe this bug.

from deepcad.

JoeLambourne avatar JoeLambourne commented on June 3, 2024

Thank you for looking. Calling evEdgeTangentLine looks like it should work. Maybe a bug in OnShape. Arcs are notoriously bad for bugs in CAD systems. Is there a way to get the start and end parameter value of the arc without using the arcLengthParameterization option. The bug might be in the OnShape arc length computation.

from deepcad.

ChrisWu1997 avatar ChrisWu1997 commented on June 3, 2024

After taking a deeper look, I think both the data parsing and arc interpretation are correct. The misunderstanding comes from the definition of sketch profile.

The sketch is composed of multiple profiles, each is a region enclosed by one or more edge loops. And we did not merge those profiles, even though they are extruded by the same extrusion operation (following the convention of onshape API). What you visualized above is just one profile JSa of the entity Sketch 5.

See below for illustration. If you search for the major arc JSF in the json file, you will find it appears in both profiles JSa and JSO.

image

from deepcad.

JoeLambourne avatar JoeLambourne commented on June 3, 2024

@ChrisWu1997,

Thank you for the detailed explanation. This makes a lot of sense. Yes. he shape I'm expecting will be the union of all the profiles extruded by that operation. Let's close this as the solution is going to be to perform some post processing.

from deepcad.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.