Home
Reply
Contributor
bryn
Posts: 20

Small body, faceter options

Hi

 

I have BODY with small dimensions (e.g. 0.5 x 0.5 x 0.5 cube).

 

When running the FacetBody function, I see no influence of some (at least one) of the parameters. If I set the max_edge_length to anything below 1 there is now influence.

 

Infact, the options object converts the max_edge_length to integer values, which becomes clear with following code:

 

    facet_options_precise options;
    options.get_expert_options().set_max_edge_length( 1.5 );
    cerr << "max_edge_length " << options.get_max_edge_length() << endl;

--> outputs 1.0

    options.get_expert_options().set_max_edge_length( 0.05 );
    cerr << "max_edge_length " << options.get_max_edge_length() << endl;

--> outputs 0.0

 

 

Must I scale all my objects to have a certain size, or is there a global scaling parameter or flag?

Is this a bug?

 

Thanks a lot

 

Best regards

Bryn

 

Spatial Employee
asdf
Posts: 93

Re: Small body, faceter options

Hi Bryn

 

This looks like  a bug to me.  I haven't reproduced it, but I have a workaround.

 

Please try using

 

options.set_max_edge_length( 1.5 );   // change suitably if desired max edge length isn't 1.5

 

rather than

 

options.get_expert_options().set_max_edge_length( 1.5).

 

The intent of the method get_expert_options is to allow people using -- say facet_options_visualization -- to control other parameters too.  If you are using facet_options_precise which already has a set_max_edge_length function, there is no need to use get_expert_options.  I have tried the workaround and I know it works.  I will look into why you didn't get the same result the other way.  That should have worked too.

 

Eric

 

Contributor
bryn
Posts: 20

Re: Small body, faceter options

Hi Eric

 

Thanks. That worked.

 

Best regards

Bryn