bzsmooth command format help

Hi,

I'm trying to use this command in Draw and I can't work out the format.

I see the help info:
Draw:
> help bzsmooth
bzsmooth : bzsmooth cname tol degree option [fic]

and from GeomliteTest_ApproxCommands I can see that there are 3 methods/options: -GR, -PR and (unnamed? possibly -VA) method 3. Is there any information what these options do?

[fic] seems to be a file of the points to import: is there an example or format available?

Without the file ref the gui pick points with mouse works fine and creates a 3d curve

The file import option calls PointsByFile (also from GeomliteTest_ApproxCommands):
//=======================================================================
//function : PointsByFile
//=======================================================================
static void PointsByFile(Handle(AppDef_HArray1OfMultiPointConstraint)& MPC,
Handle(AppParCurves_HArray1OfConstraintCouple)& TABofCC,
std::ifstream& iFile,
Draw_Interpretor& di)

I get an exception when I try this:
Draw[3]> bzsmooth oc1 0 3 -PR iFile.txt 6 2d
An exception was caught 000002B022C70120 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x0000000000000010 during 'READ' operation
where the iFile.txt looks like this:
27.0 1.0
28.0 3.5
28.7 5.4
29.7 7.6
30.9 10.0
31.8 12.6

Any help or pointers greatly appreciated!

I'm using the 7.8.0 pre-compiled windows occt-vc143-64 version

Cheers,
David

Attachments: 
Dmitrii Pasukhin's picture

Hello, it is an old functionality. There are no documentation for that. But the content of your file should be started from "2d" or "3d" it should be inside your file. Any more details unfortunately will request you to debug or write your own realisation.

Best regards, Dmitrii.

gkv311 n's picture

The only file sample that could be found in tests is bug30442_points.txt (from opencascade-dataset-7.8.0.zip) used by neighbor command bsmooth:

3
3d
0 0 0
6000 6000 6000
9000 1000 3000

Number of points, 3d format, followed by per point coordinates.

From test case tests\bugs\mesh\bug30442:

pload MODELING VISUALIZATION
#bsmooth aSmoothCurve 1.0 [locate_data_file bug30442_points.txt]
bzsmooth aSmoothCurve 1.0 8 -GR [locate_data_file bug30442_points.txt]

circle aCircle 0 0 0 1 1 1 20

mkedge aSpineEdge aSmoothCurve
mkedge aProfileEdge aCircle

wire aSpineWire aSpineEdge
wire aProfileWire aProfileEdge

pipe result aSpineWire aProfileWire

vinit View1
vdisplay result
vsetdispmode 1
vfit

Looks like a very old command that nobody used for a while...

David Noake's picture

Thanks Dmitrii and gkv311