Ticket #3834 - Loss of coordinate systems during .stp (AP214) import/export
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Ticket #3834 - Loss of coordinate systems during .stp (AP214) import/export
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Hello,
iam new to FreeCAD and run into an issue.
I have one Part with multiple coordinate systems to build a millingtool.
The coordinate systems be called PCS,MCS,CSW.
If i set them and export them to .stp (AP214) they got lost.
Also if i set them in a other CAD-System they will not be imported.
Thanks for usefull suggestions.
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Hello,
iam new to FreeCAD and run into an issue.
I have one Part with multiple coordinate systems to build a millingtool.
The coordinate systems be called PCS,MCS,CSW.
If i set them and export them to .stp (AP214) they got lost.
Also if i set them in a other CAD-System they will not be imported.
Thanks for usefull suggestions.
Last edited by Kunda1 on Fri Oct 04, 2019 12:58 am, edited 1 time in total.
Reason: Added ticket number to thread title
Reason: Added ticket number to thread title
Re: Loss of coordinate systems during .stp (AP214) import/export
Where and how do you set your coordinate systems? Is a "coordinate system" a special entity in the STEP format?If i set them and export them to .stp (AP214) they got lost.
Also if i set them in a other CAD-System they will not be imported.
Re: Loss of coordinate systems during .stp (AP214) import/export
Source is Siemens NX12
Exporting them from NX to .stp and reimporting to NX works fine.
Importing the .stp to FreeCAD, they are gone.
Maybe the Siteadmin can move this to the right Topic.
Example STEP File added.
Picture shows 3 different coordinate systems.Exporting them from NX to .stp and reimporting to NX works fine.
Importing the .stp to FreeCAD, they are gone.
Maybe the Siteadmin can move this to the right Topic.
Example STEP File added.
- Attachments
-
- model2.stp
- Step with named coordinate systems PCS,MCS,CSW -> #4082=AXIS2_PLACEMENT_3D('MCS',#5744,#4567,#4568);
- (369.86 KiB) Downloaded 71 times
-
- Export.stp
- (48.92 KiB) Downloaded 43 times
Last edited by whocares on Wed Feb 13, 2019 8:55 am, edited 2 times in total.
Re: Loss of coordinate systems during .stp (AP214) import/export
This is not a announcements or new Feature(s).
So you should ask in the help forum or if it is a bug in the open discussion forum. Also add your (example) step file.
So you should ask in the help forum or if it is a bug in the open discussion forum. Also add your (example) step file.
Re: Loss of coordinate systems during .stp (AP214) import/export
it seems the method is supported in OCC STEP kernel
https://www.opencascade.com/doc/occt-6. ... ement.html
Re: Loss of coordinate systems during .stp (AP214) import/export
When opening the file in a text editor then you will find a few hundred AXIS2_PLACEMENT_3D elements but only three of them has names. So, I guess it's up to the application to only consider them.
Nevertheless, the ignorance of the AXIS2_PLACEMENT_3D is not a bug but might be a feature to implement for v0.19 (if even possible).
Nevertheless, the ignorance of the AXIS2_PLACEMENT_3D is not a bug but might be a feature to implement for v0.19 (if even possible).
Re: Loss of coordinate systems during .stp (AP214) import/export
Thank you for your Response.wmayer wrote: ↑Wed Feb 13, 2019 11:05 am When opening the file in a text editor then you will find a few hundred AXIS2_PLACEMENT_3D elements but only three of them has names. So, I guess it's up to the application to only consider them.
Nevertheless, the ignorance of the AXIS2_PLACEMENT_3D is not a bug but might be a feature to implement for v0.19 (if even possible).
Iam not that familiar with FreeCAD, CATIA exports these DatumPlanes the same Way.
I have added an Example Step File with only the DatumPlanes in it.
Maybe its usefull.
- Attachments
-
- DatumPlaneOnly.stp
- (3.55 KiB) Downloaded 53 times
Re: Loss of coordinate systems during .stp (AP214) import/export
I found a way to find the named placements:
The question however is what does OCCT's OCAF framework with them? I am not sure that the objects are transferred from the STEP model to the OCAF document. And this makes it tricky to add them to a FreeCAD document.
Btw, the file Export.stp shows the data of the screen shot you posted. Also it contains 45 AXIS2_PLACEMENT_3D objects but none of them has the labels "PCS", "MCS" or "CSW". Would it be possible to upload the STEP file that is shown in the screen shot that includes the named AXIS2_PLACEMENT_3D objects?
Thanks!
Code: Select all
Handle(Interface_InterfaceModel) Model = aReader.Reader().Model();
Standard_Integer nb = Model->NbEntities();
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(Standard_Transient) enti = Model->Value(i);
if (enti->IsKind(STANDARD_TYPE(StepGeom_Placement))) {
Handle(StepGeom_Placement) plm = Handle(StepGeom_Placement)::DownCast(enti);
if (plm->Name()->Length() > 0) {
// do something with it
}
}
}
Btw, the file Export.stp shows the data of the screen shot you posted. Also it contains 45 AXIS2_PLACEMENT_3D objects but none of them has the labels "PCS", "MCS" or "CSW". Would it be possible to upload the STEP file that is shown in the screen shot that includes the named AXIS2_PLACEMENT_3D objects?
Thanks!
Re: Loss of coordinate systems during .stp (AP214) import/export
Example uploaded.
Thank you for the effort.
Thank you for the effort.
- Attachments
-
- exportwithnamedplanes.stp
- (35.06 KiB) Downloaded 58 times
Re: Loss of coordinate systems during .stp (AP214) import/export
Here is a code snippet to add the placements after loading the file:
It respects only the position but not the orientation.
Code: Select all
plm=App.ActiveDocument.addObject("App::Placement","CSW")
plm.Placement.Base=App.Vector(31.8244952147467,33.7921260930763,-162.824495214746)
plm=App.ActiveDocument.addObject("App::Placement","MCS")
plm.Placement.Base=App.Vector(15.925,31.8500000000002,-82.48178698)
plm=App.ActiveDocument.addObject("App::Placement","PCS")
plm.Placement.Base=App.Vector(7.105427357601E-15,1.04449782156735E-12,1.4210854715202E-13)