Page 1 of 1

What determines the SW direction when converting to Dxf?

Posted: Tue Dec 21, 2021 1:30 am
by Ömür Tokman
Hello guys,
have a good day,
What determines the SW direction when converting to Dxf?
most of the time it is different from the view I set.
Is there a way to save as I set it?
2021-12-21_09-26-56.png

Re: What determines the SW direction when converting to Dxf?

Posted: Tue Dec 21, 2021 6:39 am
by Frank_Oostendorp
To avoid to have to change DXF orientation, we sketch on the front plane, in the view orientation we prefer for the DXF, having the optional special surface of the sheet metal towards you.

Re: What determines the SW direction when converting to Dxf?

Posted: Tue Dec 21, 2021 9:09 am
by Ömür Tokman
Frank_Oostendorp wrote: Tue Dec 21, 2021 6:39 am To avoid to have to change DXF orientation, we sketch on the front plane, in the view orientation we prefer for the DXF, having the optional special surface of the sheet metal towards you.
I determine the flat pattern surface, there is no problem in that. (macro) .
If you pay attention to the drawing, it rotates clockwise. I want to prevent this.
2021-12-21_17-02-50.jpg
edit:
Additionally, that's not the method I'm talking about. yes, it is determined in this way and results in the correct output, but it is necessary to deal with each part individually. I am getting dxf from the assembly with the help of a macro.
2021-12-21_17-16-46.png
2021-12-21_17-16-21.png

Re: What determines the SW direction when converting to Dxf?

Posted: Tue Dec 21, 2021 12:05 pm
by jcapriotti
Edit the "Flat-Pattern" feature. There is a "fixed" face selection you can change. This will drive the "up" side shown when exporting, yours is most likely on the back face which is flipping it over. Unfortunately, I don't believe there is a way to control the rotation except as in the export dialogue to define an X-Y direction.

Re: What determines the SW direction when converting to Dxf?

Posted: Wed Dec 22, 2021 1:19 am
by Ömür Tokman
jcapriotti wrote: Tue Dec 21, 2021 12:05 pm Edit the "Flat-Pattern" feature. There is a "fixed" face selection you can change. This will drive the "up" side shown when exporting, yours is most likely on the back face which is flipping it over. Unfortunately, I don't believe there is a way to control the rotation except as in the export dialogue to define an X-Y direction.
Hi @jcapriotti Thank you for the answer, the face is in the right direction. there is no problem with that, i was just looking for a way for xy.

Re: What determines the SW direction when converting to Dxf?

Posted: Wed Dec 22, 2021 5:44 am
by gupta9665
Ömür Tokman wrote: Wed Dec 22, 2021 1:19 am Hi @jcapriotti Thank you for the answer, the face is in the right direction. there is no problem with that, i was just looking for a way for xy.
Alignment array takes care of the XYZ
Alignment Array.PNG

Re: What determines the SW direction when converting to Dxf?

Posted: Wed Dec 22, 2021 1:34 pm
by Ömür Tokman
then as i understand i need to start drawing by calculating yxz in order to position flat pattern correctly.

Re: What determines the SW direction when converting to Dxf?

Posted: Thu Dec 23, 2021 4:21 am
by Frank_Oostendorp
By sketching on the front plane, or importing an existing DXF and rotate this in the desired rotated angle, and extrude the sheet, we always have the desired result of side and angle in the exported DXF of the front surface of the unfolded sheet metal part. No need to do anything more.

Re: What determines the SW direction when converting to Dxf?

Posted: Sat Aug 10, 2024 2:50 pm
by Joe Soo
Hi, everyone,
Is it possible by assign a new coordinate system having its X-axis aligned with the edge which to be horizontal in the DXF output?

ChatGPT generated the code below:
'Define the coordinate system name (should match the one in your parts)
coordSystemName = "CoordSys1" ' Adjust this name as needed

'Set the export options
Set swExportMgr = flatPattern.GetExportFlatPatternData
dxfOptions = swExportFlatPatternToDXF
swExportMgr.SetOutputType dxfOptions
swExportMgr.SetCoordinateSystem coordSystemName

However, I am not able to make it works.
I am not a macro guy, hope someone can help out if it is possible by Modify the "Export flat patterns from SOLIDWORKS part or assembly components".
It is useful for sheet metal SS304 which having a grain direction requirement.
Thanks