AutodeskAILab / Fusion360GalleryDataset

Data, tools, and documentation of the Fusion 360 Gallery Dataset
Other
421 stars 51 forks source link

Are sketches inherently 2D? #64

Closed iftachg closed 3 years ago

iftachg commented 3 years ago

I have been working under the assumption that sketches are 2D but it does not seem like that is necessarily the case. For example, in object 127202_42451722_0000, Sketch1 You have two circles, 0ba7f88c-e321-11ea-bb0d-54bf646e7e1f and 0ba90a02-e321-11ea-8bd1-54bf646e7e1f which have different normals according to their worldGeometry objects ([0, 0, 0] and [-20, 0, 0] respectively).

For reference I extract the normals from the curve_obj.worldGeometry object as calculated in the reconstruct_sketch_curve method of sketch_extrude_importer.py

karldd commented 3 years ago

So it is possible in Fusion 360 to create a 3D sketch, but in practice they can't be used with extrude operations so they won't result in solid geometry in the dataset. It might be possible to have a sketch line that isn't used with an extrude operations, but I have yet to see one.

Sketches can be on planes in either the canonical XY, YZ, XZ orientations or on the planar face of an existing B-Rep.

Below are the two curves in question from 127202_42451722_0000. These are both on the same plane. image

Can you share how you are getting the normals? The -20,0,0 and 0,0,0 look like the circle center points: image

iftachg commented 3 years ago

The method reconstruct_sketch_curve various methods are used to create curve_obj objects, from which I get the normal using:

curve_obj.worldGeometry.normal

karldd commented 3 years ago

Inspecting curve_obj.worldGeometry.normal in the debugger after line 508, I get the following normal [0,0,1] for both circles. This appears correct to me.

image

So I'm not able to reproduce the -20,0,0 and 0,0,0 values you are seeing. Those do appear to be the circle center points however.

iftachg commented 3 years ago

Thank you, it was indeed a problem in my parsing.