Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Metadata in X3d #13

Open
merco opened this issue Oct 22, 2023 · 4 comments
Open

Model Metadata in X3d #13

merco opened this issue Oct 22, 2023 · 4 comments

Comments

@merco
Copy link

merco commented Oct 22, 2023

It would be possibile to have metadata (GENERAL_PROPERTY) in X3D?

Could STP2X3D generate a separate file output with these information ?

immagine

here the file
http://davidemercanti.altervista.org/sources/1M001934.stp

@soonjokwon
Copy link
Collaborator

It might be possible to get those information from the STEP file.
For now, we do not have plans to officially include the function to export a separate file for those information.
Please refer to the source codes related to STEP file import which will give you a hint how to get those information.
I'll be happy to answer your follow-up questions.

@merco
Copy link
Author

merco commented Oct 24, 2023

Thank you. I've built source code with VS2019.
However, it is not clear to me which OCC object to use to read the GENERAL_PROPERTY associated with a component.
Can you help me with some example links?

@soonjokwon
Copy link
Collaborator

Consider using "StepBasic_GeneralProperty".
See "STEP_Data.cpp" for traversing STEP instances.

Here's an example of getting id, name, and description of an instance of a general property.

#include <StepBasic_GeneralProperty.hxx>
...
...
Handle(StepBasic_GeneralProperty) gp = Handle(StepBasic_GeneralProperty)::DownCast(entity);
string id = gp->Id()->ToCString();
string name = gp->Name()->ToCString();
string desc = gp->Description()->ToCString();

@merco
Copy link
Author

merco commented Oct 25, 2023

Thank you.
Ok I can get the names traversing entities... but It is not clear to me how to recover the value of the property and know which instance it is connected to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants