Export to STEP problem

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
flim
Posts: 56
Joined: Mon May 07, 2018 8:51 am

Export to STEP problem

Post by flim »

I have a simple model, the result is not good.

I have two bodies, the MainBody is body like watch case, I simplified it as a sketch for crown distance, which is 19mm.

I create the crown in another body, then I export to STEP. In Rhino 6 I import the STEP but it looks wrong. If I model the crown from origin (0,0,0), the export is good. I guess there is bug in STEP export? or I need to tweak the setting?
Attachments
exportproblem.png
exportproblem.png (289.78 KiB) Viewed 3245 times
exportproblem.step
(13.8 KiB) Downloaded 53 times
exportproblem.FCStd
(13.64 KiB) Downloaded 37 times
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: Export to STEP problem

Post by chrisb »

flim wrote: Thu Aug 23, 2018 1:53 pm I guess there is bug in STEP export? or I need to tweak the setting?
You didn't tell us much about your version. See the IMPORTANT link above on how to do so. I guess it's not the most recent. Please try the current 0.18, there have been changes made to the exports.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
flim
Posts: 56
Joined: Mon May 07, 2018 8:51 am

Re: Export to STEP problem

Post by flim »

I am using 0.18 14426 (Git), I keep update everyday.
OS: Windows 10 64-bit 1803
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Export to STEP problem

Post by NormandC »

You are really making it hard for us to help. Neither your FCStd nor step file display any kind of issue in FreeCAD. I do not have Rhino. You mention

flim wrote: Thu Aug 23, 2018 1:53 pm If I model the crown from origin (0,0,0), the export is good.
From what origin: the document's? Your FCStd file shows the Crown body's placement to be at (0, 0, 0).

Do you expect us to play with its placement then export to STEP?

EDIT: I opened "exportproblem.FCStd", then I imported "exportproblem.step" in the same document. The new shape is exactly at the same position as the Crown body, and it is identical.
flim
Posts: 56
Joined: Mon May 07, 2018 8:51 am

Re: Export to STEP problem

Post by flim »

The origin means the Body origin, sorry for misleading.

I create a new FC document and made two identical bodies, Crown001 is copy and paste from Crown. only the distance between the body and the body origin is different.

I export both bodies to STEP file, Crown and Crown001, then import to Rhino. Crown import correctly, but Crown001 is not.

Edit:
I think it is better to included the STEP export of Crown001 from Rhino, so you can see how the model looks like in Rhino.
Attachments
Crown001 from Rhino.stp
(51.25 KiB) Downloaded 40 times
STEP to Rhino.jpg
STEP to Rhino.jpg (41.03 KiB) Viewed 3171 times
Crown001.step
(10.94 KiB) Downloaded 45 times
Crown.step
(10.72 KiB) Downloaded 31 times
STEP test.FCStd
(15.78 KiB) Downloaded 38 times
flim
Posts: 56
Joined: Mon May 07, 2018 8:51 am

Re: Export to STEP problem

Post by flim »

NormandC wrote: Sat Aug 25, 2018 9:54 pm From what origin: the document's? Your FCStd file shows the Crown body's placement to be at (0, 0, 0).

Do you expect us to play with its placement then export to STEP?

EDIT: I opened "exportproblem.FCStd", then I imported "exportproblem.step" in the same document. The new shape is exactly at the same position as the Crown body, and it is identical.
I have some difficulty to explain as I am still new using FreeCAD. I include a picture of the origin I refer to, it is the base "Origin", the first item under the Body name, the Revolution is away from the Base X 19mm. The STEP is export from the Body, so the placement is same as expected.
Attachments
BodyPlacement.png
BodyPlacement.png (55.03 KiB) Viewed 3140 times
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: Export to STEP problem

Post by chrisb »

I have opened both step files in FreeCAD and they have different positions. Perhaps it is a Rhino problem?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
flim
Posts: 56
Joined: Mon May 07, 2018 8:51 am

Re: Export to STEP problem

Post by flim »

chrisb wrote: Sun Aug 26, 2018 5:32 pm I have opened both step files in FreeCAD and they have different positions. Perhaps it is a Rhino problem?
Both Crown.step and Crown001.step are export from the STEP test.FCStd, I export the body one by one. Then import both step file in Rhino, the Crown.step imported correctly but Crown001.step did not. The distant between the Origin and object influence the result. For instance Crown body only 1mm from the Origin, but Crown001 is 5mm. Please check the sketch for the origin, not the feature.

I create the Crown001 in Onshape and export to STEP, Rhino can import the step correctly, I attach the Onshape version of STEP file.
Attachments
STEP from Onshape.step
(11.57 KiB) Downloaded 34 times
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: Export to STEP problem

Post by chrisb »

I have compared the internals of the bodies and the stepfiles:
  • Internal FreeCAD representation
    The sequence of elements of Body is as expected and follows the tree top down
    The sequence of elements of Body001 is disordered, e.g. the origin follows after Revolution, ... However, thy seem to be properly linked so that shouldn't raise a problem.
  • Step files
    - of course we have some differences of 4, because Crown001 is moved 4mm to the right
    - of course there are some rounding differences of the order e-12, that's perfectly normal
    - there are some deviations of the order e-5, which might be too much to be explained with usual rounding issues
    - I found structural differences. In the files #XXX refers to th einternal numbers, I had to replace them in order to be able to compare. I have to confess that I don't know the STEP format, but I guess that a SPHERICAL_SURFACE is somehow different from SURFACE_OF_REVOLUTION
    Crown:

    Code: Select all

    PCURVE('',#XXX,#XXX);
    SPHERICAL_SURFACE('',#XXX,10.);
    AXIS2_PLACEMENT_3D('',#XXX,#XXX,#XXX);
    CARTESIAN_POINT('',(-6.,2.397672949325E-008,0.E+000));
    DIRECTION('',(-1.,-0.E+000,-0.E+000));
    DIRECTION('',(0.E+000,1.,0.E+000));
    DEFINITIONAL_REPRESENTATION('',(#XXX),#XXX);
    LINE('',#XXX,#XXX);
    CARTESIAN_POINT('',(-0.E+000,-1.346703237226));
    VECTOR('',#XXX,1.);
    DIRECTION('',(-1.,0.E+000));
    
    Crown001:

    Code: Select all

    SURFACE_OF_REVOLUTION('',#XXX,#XXX);
    CIRCLE('',#XXX,10.);
    AXIS2_PLACEMENT_3D('',#XXX,#XXX,#XXX);
    CARTESIAN_POINT('',(-2.,-3.892980010644E-005,0.E+000));
    DIRECTION('',(0.E+000,0.E+000,1.));
    DIRECTION('',(1.,0.E+000,0.E+000));
    AXIS1_PLACEMENT('',#XXX,#XXX);
    CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
    DIRECTION('',(1.,0.E+000,0.E+000));
    DEFINITIONAL_REPRESENTATION('',(#XXX),#XXX);
    LINE('',#XXX,#XXX);
    CARTESIAN_POINT('',(0.E+000,0.224097528764));
    VECTOR('',#XXX,1.);
    DIRECTION('',(1.,0.E+000));
    
    And further down (with no idea what it means):
    Crown: ADVANCED_FACE('',(#XXX),#XXX,.T.);
    Crown001: ADVANCED_FACE('',(#XXX),#XXX,.F.);
From my point of view we have the following situation:
  • Copying in FreeCAD changes the order of XML elements, this is probably no problem
  • Export of seemingly equivalent FreeCAD objects can generate STEP files of different structure.
  • Both can be reimported into FreeCAD without issues, which lets me assume, that both are correct
  • Rhino can import one of these structures correctly, but not the other
@flim: Can you please change your model:
- Remove Crown001
- Create a Draft->Clone of Body
- Move the clone 4mm towards +X
- Retry the Step export.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
flim
Posts: 56
Joined: Mon May 07, 2018 8:51 am

Re: Export to STEP problem

Post by flim »

I created a Draft->Clone of Crown body, move 4mm toward X, export to STEP, Rhino import the STEP correctly.

I attach the new step file and FreeCAD file
Attachments
DraftClone.step
(10.77 KiB) Downloaded 48 times
CloneBody STEP test.FCStd
(11.41 KiB) Downloaded 37 times
Post Reply