Created
March 24, 2020 18:00
-
-
Save jeromerobert/7635e1ff4f209f3862a80b5abbcfd5e2 to your computer and use it in GitHub Desktop.
Revisions
-
jeromerobert created this gist
Mar 24, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #include <STEPControl_Writer.hxx> #include <STEPConstruct.hxx> #include <XSControl_WorkSession.hxx> #include <XSControl_TransferWriter.hxx> #include <StepRepr_RepresentationItem.hxx> #include <TCollection_HAsciiString.hxx> /** Set the name of a TopoDS_Shape in a .step file */ void setName(STEPControl_Writer & writer, const TopoDS_Shape & shape, const char * name) { auto fp = writer.WS()->TransferWriter()->FinderProcess(); auto repr = STEPConstruct::FindEntity(fp, shape); repr->SetName(new TCollection_HAsciiString(name)); }