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 / Size of faceting.

Size of faceting.

Size of faceting.
Vishwanath 2008/08/22 10:41
Hi,

Does anybody know about how to control the size of facets when we export STL file from IGES or STEP or any other file format. Is there any size parameter where we can change the size of facets of STL.


Thanks
Vishwanath.
Pawel 2008/12/01 01:06
You could use something like this:

StlAPI_Writer writer;
writer.RelativeMode() = Standard_False;
writer.SetDeflection(deflection);

Pawel
Game Milky 2012/10/30 12:20

Dear Pawel,

I have above codes posted by you! I have the same problem of refining STL file

Standard_Real deflection=0.00001;
Standard_Real coefficient=1;
          StlAPI_Writer myStlWriter;
          myStlWriter.RelativeMode() = Standard_False;
          myStlWriter.SetCoefficient(coefficient);
          myStlWriter.SetDeflection(deflection);
          myStlWriter.Write(shape, "simmant-3.stl");
          Handle(StlMesh_Mesh) myMesh = RWStl::ReadFile(OSD_Path("simmant-3.stl"));


I don't see any error but no output too! I wait for long but wouldn't find any output

What is wrong with it, anybody can help

Regards

Game
Pawel 2012/10/30 12:42
Hi Game,

your deflection value: 0.00001 is VERY low. Choosing 1/100th of a micron might result in rather long computation times. Try adjusting this.

Pawel
Game Milky 2012/11/01 20:11
     
Dear Pawel,

Thank you very much! It works now but have still some problems!

I try to experiment how     StlAPI_Writer works by changing deflection value and type of input CAD data (i am using IGES as an output)
I figure out three problems (cases) as below
1. Changing deflection value has no effect on written stl file
2. Works well for some CAD files (Iges) before sewing
3. After sewing, some patches are triangulated very fine and some very course and finally the output stl is very bad.

Both cases happened to my case!

What would be the case! It seems that, if i do not use sewing, the StlAPI_Writer works well.
I used the default StlAPI_Writer to write stl file, and compared with original file (Iges) in some domain of the object, there are even more than 40mm deference!
Is there a better way to write stl file, specially after sewing!

Regards

Game



some time doesn't have any change what ever change in deflection you made! For some data files, it work well.

For my case, I write an stl file after using sewing algorithm, and some patches are triangulated very fine, and some very course, and it looks really very ugly. I try to experiment
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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