How to get a single entity from 3D object (STEP)
Moderators: SDS, support, admin
-
- Posts: 8
- Joined: 28 Jan 2022, 15:35
How to get a single entity from 3D object (STEP)
Hello everyone!
I have a question:
How to get a single entity like line, arc, b-spline, or cylindrical surface, conical surface etc. from the 3D object (STEP).
I have 3D (STEP) file on the screen and it is displayed properly.
Code in C++ (Builder 2009).
Thank you for any help!
Greetings,
Mariusz
I have a question:
How to get a single entity like line, arc, b-spline, or cylindrical surface, conical surface etc. from the 3D object (STEP).
I have 3D (STEP) file on the screen and it is displayed properly.
Code in C++ (Builder 2009).
Code: Select all
void __fastcall TformMain::mOpenSTEPClick(TObject *Sender)
{
OpenDialog1->Filter = "STEP Files(*.stp, *.step)|*.stp;*.step";
if(OpenDialog1->Execute())
{
CloseNavigators();
//Loading TsgDrawingNavigator *FsgPaintBox;
FsgPaintBox->Picture->LoadFromFile(OpenDialog1->FileName);
FsgPaintBox->BeginUpdate();
try
{
((TsgCADImage *)(FsgPaintBox->Picture->Graphic))->CustomDraw = false;
FsgPaintBox->FitToSize();
}
__finally
{
FsgPaintBox->EndUpdate();
}
//Loading Tsg3DDrawingNavigator *stepDrawingNavigator;
if(LoadedCADImage)
{
if(stepDrawingNavigator->Empty() && (stepDrawingNavigator->LoadFromImage == NULL))
{
//first time loaded
try
{
Screen->Cursor = crHourGlass;
stepDrawingNavigator->LoadFromConverter(LoadedCADImage->Converter, LoadedCADImage);
}
__finally
{
Screen->Cursor = crDefault;
}
}
else
{
//next time loaded
if(stepDrawingNavigator->LoadFromImage != NULL)
{
LoadViewFromCADImage(LoadedCADImage,stepDrawingNavigator);
}
}
Tsg3DShowingStyles style;
style << ssSmoothShading << ssLighting;
stepDrawingNavigator->ShowingStyle = style;
stepDrawingNavigator->FitToSize();
FsgPaintBox->Visible = false;
stepDrawingNavigator->Visible = true; //only 3D visible
//TESTS:
int entitiesCount;
String entityName;
TsgDXFEntity *entity;
entitiesCount = LoadedCADImage->Converter->Counts[csEntities];
//entitiesCount in case of very big STEP file = 1 (why?)
for(int i=0; i<entitiesCount; i++)
{
entity = LoadedCADImage->Entities[i]; //this is siome general entity (some single block) (why?)
if(entity)
{
entityName = entity->Name;
entityName = entity->EntName();
}
}
}
}
}
//---------------------------------------------------------------------------
Thank you for any help!
Greetings,
Mariusz
Re: How to get a single entity from 3D object (STEP)
Hi Mariusz,
Unfortunately it is not possible at the moment. We are working on 3D improvement at the moment. Stay tuned to get the news about CAD VCL.
Maria.
Unfortunately it is not possible at the moment. We are working on 3D improvement at the moment. Stay tuned to get the news about CAD VCL.
Maria.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 8
- Joined: 28 Jan 2022, 15:35
Re: How to get a single entity from 3D object (STEP)
Thank you Maria for the reply!
Im wondering - if there is a possibility to get some STEP entities not directly from the TsgDrawingNavigator or Tsg3DDrawingNavigator...
If you know some - please let me know.
Kind regards,
Mariusz
Im wondering - if there is a possibility to get some STEP entities not directly from the TsgDrawingNavigator or Tsg3DDrawingNavigator...
If you know some - please let me know.
Kind regards,
Mariusz
Re: How to get a single entity from 3D object (STEP)
Unfortunately, there is no such possibility for now. But 3D formats are one of our priorities at the moment, so I passed the info to our r&d team.
Maria
Maria
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support