Detailed Info Panel for selected entities

Next
 From:  mkdm
7868.1 
Hi Michael and all,

In order to write, or at least to attempt to write :), a script that can show a detailed info panel for the selected entities,
some questions came to my mind :

1) How to retrieve the number of control points of an entity, whatever the type of the entities (curves, surfaces, poly-surfaces)

2) What's the Api call that's the right entry point to deeply query the structure of the entities ?
For example : navigate, with the Api, from a selected poly-surface, and get all of the parts from which it's composed : styles, surfaces, lines, control points...

3) Is there a way, trough the Api, to get the length of an edge ?
And therefore to consequently retrieve the overall length of the edges of the whole object ?

While i attempt, in my free time, to write something as described, i honestly hope that someone who best knows
Moi and its Api, wishes to write this script :)

Nice day,

Marco.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7868.2 In reply to 7868.1 
Hi Marco, I do want to implement a detailed info panel built in to MoI in the future, right now it will probably be fairly limited to do with a script though.


> 1) How to retrieve the number of control points of an entity, whatever the type of
> the entities (curves, surfaces, poly-surfaces)

Sorry there is not currently any mechanism in the script interface set up to access the control points of objects.


> 2) What's the Api call that's the right entry point to deeply query the
> structure of the entities ?
> For example : navigate, with the Api, from a selected poly-surface, and get all of
> the parts from which it's composed : styles, surfaces, lines, control points...

You can find what's currently available in the moi.idl file (see here: http://moi3d.com/wiki/Scripting) - look for "interface IMoiGeomObject" and everything defined inside of there is what's available on every object. Then curves extend that with the stuff under "interface IMoiCurve" and there are similar extensions for breps and faces.


> 3) Is there a way, trough the Api, to get the length of an edge ?
> And therefore to consequently retrieve the overall length of the edges
> of the whole object ?

An edge has the same interface as IMoiCurve, and there's a .getLength() method that you can call on either curves or edges for that. To get all edges of a BRep, call brep.getEdges() which returns an object list of all the edges in the BRep.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  mkdm
7868.3 In reply to 7868.2 
Thank you Michael for your detailed reply.

The fact that there's not any mechanism to access the control points of objects,
discourages me a bit, 'cause i had thought to write some kinds of funny scripts to play with them.
But, if i think about it, if that were been the case , probably many others would have written this kind of scripts.

Anyway, i'm glad to know that the future versions of Moi will be provided by a detailed info panel.

Meantime i'll play with the docs available in http://moi3d.com/wiki/Scripting, and into the moi.idl file.

Thanks again,

Marco.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All