[x3d-public] file converter based on pythonocc; Viewpoint viewAll

Don Brutzman brutzman at nps.edu
Tue Jun 9 07:23:50 PDT 2020


On 6/9/2020 7:06 AM, Don Brutzman wrote:
[...]
> the X3D model could certainly use a default Viewpoint, for that matter the following construct would be great for many models:

     <Viewpoint viewAll="true" description="show me whatcha got"/>

We came up with this potential approach during last week's X3D Working Group teleconference.  Precomputation of viewpoint distance is a complex matter that often is not possible at authoring time when assembling multiple models together, so it is a common and necessary use case that X3D currently lacks.

* 23.4.4 NavigationInfo VIEWALL (or Viewpoint viewAll) should be a required navigation behaviour
   https://www.web3d.org/member-only/mantis/view.php?id=1194

> On 5/14/2020 4:03 PM, Andreas Plesch wrote:
>> It turns out that step can embed full unicode in these \X escape sequences, directives. So this has better naming and a bit specular:
>>
>> https://nbviewer.jupyter.org/github/andreasplesch/OCCToX3D/blob/3b05f7e4ff2777bdb2b08f5c487b714de2be4936/notebooks/rc_buggy_front_suspension.ipynb
>> [...]
>>     With that a large model like this front suspension loads. It is 30MB so it will take a bit:
>> [...]

compelling screenshot attached.

>>     Press 'a' to zoom to all.

aha, didn't see that earlier.  Viewpoint viewAll comments remain relevant, this X3DOM-provided nonstandard hotkey demonstrates it.

However the hotkey shifted perspective to a completely different axis which was undesirable.  Better behavior is to "fit" the model to the screen, by zooming in/out along current axis, pointed at centerOfRotation matching center of bounding box for the model.  This is described pretty precisely in the Mantis issue, we should be able to craft agreeable specification prose.

>>     Apparently, step files can contain strange naming of model parts. The only choice is probably to preserve as they are.

Very good, it will be good to start looking at examples of STEP naming and metadata.  Am ready to start looking at support in X3dTidy stylesheet for converting such constructs into structured X3D MetadataSet collections.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BuggyFrontSuspensionPythonOccJupyterX3dom.png
Type: image/png
Size: 271264 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200609/37a78989/attachment-0001.png>


More information about the x3d-public mailing list