Extended info about invalid shape

Technical discussions
Post Reply
Steve J
Posts: 3
Joined: Tue Oct 15, 2013 6:39 am

Extended info about invalid shape

Post by Steve J »

Hello all
I am building solids in my code somewhat similar to the Shape builder example, but I am getting false from IBRepShape_DG.IsValid(). Is there a way to get more specific information?
Thanks

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Extended info about invalid shape

Post by nickz »

Hello Steve
Thank you for getting us motivated. We had it on our to-do list for a while. We have coded some of it. In the next update call to IBRepShape_DG.IsValid() will log errors, if any. So if IsValid() returns false, get http://www.dynoinsight.com/Help/V6_0/In ... or_KC.aspx and check for messages.
There are more ways... I will write more when the update is out (tomorrow hopefully)
Cheers

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Extended info about invalid shape

Post by nickz »

The update is up.
Shape Builder > SolidBuilder has CheckValid() which demoes getting the error messages.

We have added messages for many other common errors. IsValid() also logs some trickier native OCCT errors like overlapping internal wires. The last message in the case returns a Googleable :) and searchable in OCC source code.

We will keep up with this in the coming updates and versions.

Construction problems can be tricky. If problems happen I recommend going slowly building face by face and see that appears on the screen. Try simplified shapes first to see what is causing problems.

Add a kind of printing/tracing for edges, vertices, curves. Edges and wires normally the tricky ones. Edges must be joined in a linked loop with CCW orientation (looking from outside) to make up a valid external wire. Internal wires (holes) must have the opposite CW orientation.

Edges must have at least one (3d or 2d) curve added. Ends of curve must coincide with vertices of the edge.

Try planar case first with simplified coordinates. Add few auxiliary lines and points to see the target in 3D first......

3D debugger is not officially supported yet, but it might help. Have a look at v5.2 examples of its use. This way you could dump edges, curves, wires.

I might have more in the next few days

Cheers

Post Reply