usnistgov / stp2x3d Goto Github PK
View Code? Open in Web Editor NEWTranslator from STEP format to X3D format
License: Other
Translator from STEP format to X3D format
License: Other
It would be possibile to have metadata (GENERAL_PROPERTY) in X3D?
Could STP2X3D generate a separate file output with these information ?
here the file
http://davidemercanti.altervista.org/sources/1M001934.stp
When running the make command, I get the following error:
/home/ec2-user/environment/STP2X3D/STP2X3D/STEP_Reader.cpp: In member function ‘std::wstring STEP_Reader::GetName(const TDF_Label&) const’:
/home/ec2-user/environment/STP2X3D/STP2X3D/STEP_Reader.cpp:229:26: error: ‘class TCollection_ExtendedString’ has no member named ‘ToWideString’; did you mean ‘ToExtString’?
wstring name = nameText.ToWideString();
^~~~~~~~~~~~
ToExtString
make[2]: *** [STP2X3D/CMakeFiles/STP2X3D.dir/STEP_Reader.cpp.o] Error 1
make[1]: *** [STP2X3D/CMakeFiles/STP2X3D.dir/all] Error 2
make: *** [all] Error 2
I have installed OCCT 7.4.0, and I am running cmake 3.18 on AWS Linux 2.
I compiled the latest STP2X3D (VS2022+OCC7.6), and tested the file "nist_ctc_01_asme1_ap242.stp". The html generated by the STP2X3D only displays the CAD model, and does not display the corresponding GD&T data. But the strange thing is, using the "STEP File Analyzer and Viewer" can display the correct GD&T information. The attached file is the file I teste.
nist_ctc_01_asme1_ap242.zip
How can I solve the problem? Thank you
Thanks for your work on this tool, generally I'm getting great results, but occasionally I'm having issues with rough geometry on the output, despite the file size being quite small (3MB)
Checking the NIST SFA gui - low medium high options correspond to --quality flag of 4, 7 & 9 vs. range 1 - 10 available in STP2X3D.cpp.
Can you please advise if it output precision is limited by this range (and could be modified), or if this is a limitation of OCCT?
NB: I haven't tried using STP2X3D (not permitted to install Cmake at work), so just using the NIST SFA gui.
Hello,
I have used this source code to convert STEP file to X3D. The output which I got from this code and the STEP analyzer looks different. Did I miss anything ?
My HTML file snapshot once I ran the code.
Can you please check and suggest me changes if anything ? Also for me the dimensions are extra Tesellated Shapes ( Edge with Blue color) whereas for NIST viewer it is expected and also able to read datum there.
Regards,
Onkar
I noticed that colors are handled differently by m_colorTool->GetInstanceColor compared to Quantity_ColorRGBA::ColorToHex which seems more correct to me (compared to the usual implementations)
Is it possible to use Quantity_ColorRGBA::ColorToHex intead of GetInstanceColor?
R G B as single are =>.0024 .1619 .0222 but this is not true when using ColorToHex that returns correctly 087029FF
I found a problem with the name of some instances
in this Step file : Example
the name of the nodes contains special characters "LIFT-O-MAT®_2389SO300N_1" .
This name seems to break the flow of writing in the string when you get to the transform section. The file remains incomplete.
In stp2x3d.cpp the following include file is mentioned
#include "GDT_Item.h"
also used in Step_Reader.cpp
where do I find this and related files?
Thanks
Static Link to https://www.x3dom.org/x3dom/release/x3dom.js is broken in generated HTML-file.
Better a new commandline parameter, perhaps one wants the script/css on a local place.
I'm getting the following error when using the make command:
/home/ec2-user/environment/STP2X3D/STP2X3D/OCCLib.h:21:10: fatal error: Poly.hxx: No such file or directory
#include <Poly.hxx>
^~~~~~~~~~
compilation terminated.
make[2]: *** [STP2X3D/CMakeFiles/STP2X3D.dir/Component.cpp.o] Error 1
make[1]: *** [STP2X3D/CMakeFiles/STP2X3D.dir/all] Error 2
make: *** [all] Error 2
I've installed OCCT 7.4.0 successfully, and my includes are located in the following directory:
/usr/local/include/opencascade
How can I point to the right directory for the header files? I am installing on Linux.
environment:
project create by cmake-gui
when I build the project,it was stopped by error LNK1104:can not open file stdc++fs.lib。
Is there anyone can help me?
Hi.
In this model
http://davidemercanti.altervista.org/sources/1M001934.stp
Why the shape 9211204001 was built with only one material?
I would have expected to find 2 shapes with 2 different colors coded with different IndexedFaceSet
something like this:
Is it possible to add a Ubuntu 20.04 LTS build to the releases? The reason I am asking is beacuse I am not able to do it myself, as I dont understand how OCCT works.
The ap242 STP format model, GDT does not display correctly.
The STP model download address for AP242.
https://www.nist.gov/system/files/documents/noindex/2023/02/22/NIST_CTC_STEP_PMI.zip
Reading a STEP file..
Tessellating..
Writing an X3D file..
Indent Count
indent 1 - 1
Number of Materials: 2
Number of Shapes: 1
MinXYZ: -0.1043 -0.0008 -0.0398
MaxXYZ: 0.1031 0.1495 0.0387
STEP to X3D completed!
Total time elapsed: 10 minutes 26 seconds
the file is 17216kB.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.