Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / dump a line shape into a file

dump a line shape into a file

dump a line shape into a file
Gan Lu 2012/10/29 21:53
Hi all, I\'m try to do a simple test, which builds a line through 2 points and then dump it into a file, named \'EdgeData\', as follows:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
gp_Pnt aPnt1(0,0,0);
gp_Pnt aPnt2(1,1,0);
Handle(Geom_TrimmedCurve) aSegment1 = GC_MakeSegment(aPnt1 , aPnt2);

TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1);

FSD_File f;
ShapeSchema *ssche = new ShapeSchema;

f.Open(\"EdgeData\", Storage_VSWrite);
PTColStd_TransientPersistentMap aMap;
Handle(PTopoDS_HShape) aPShape= MgtBRep::Translate(aEdge1, aMap, MgtBRep_WithoutTriangle);
Handle(Storage_Data) d= new Storage_Data;
d->AddRoot(\"ObjectName\", aPShape);

ssche->Write(f,d);
f.Close();
<<<<<<<<<<<<<<<<<<<<<
But it has a segment fault, and the error comes from the line ssche->Write(f,d). Can anyone please suggest how to solve it?

Many Thanks
Gan
Gan Lu 2012/10/29 22:24
Hi, the problem has been solved... I should define the ShapeSchema as: Handle(ShapeSchema) ssche = new ShapeSchema;
But what the format of the output file is it? My intention is to get the interpreted points and perhaps I can plot it through gnuplot.
Thanks!
 
 
Latest news
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map