Results 1 to 10 of 10

Thread: Looking for an OpenSCAD like 3D display component

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Engines/Frameworks - model viewers - these are all more or less pointless for what you want to do. Your entire object is dynamic - potential open sides, compartments - adjustable heights.

    It's a 3D representation of real-time parameters - not a viewer for 'static' data which is what 3D rendering engines focus on.

    You're working to a level where there's not really any abstractions that would save you time.

    Yes sure - you can use an engine to give you an 3D accelerated view - manage your window, input etc or an engine to render things in software should that be your desire.

    But what you're doing is so simple you'd not really be slowed down much by using a basic OpenGL template.

    (My engine has DXF import/export and STL import capabilites - but it's not yet released.)

    But to save you some time and give you the toolkit you crave - what you want to use is :

    GLScene.

    Yeah it means GL support is required (but you're drawing such simple geometry that even the built in software GL rendering of windows or MESA under posix systems will be fine - so it's not restricting your app to requiring actual 3D hardware) it's all wrapped up nicely with Lazarus/Delphi - it was pretty much designed for this exact kind of abstract design in mind and the integration with Lazarus/Delphi lets you use already existing widgets/components/apps like you're no doubt already familiar with.

    As far as rendering the data is concerned - construct it dynamically from scratch - perhaps use a unit cube you can quickly transform to create compartment walls and so forth.

    But you're going to have interlocking parts in the compartments? slits from where sliding panels extrude?

    You want to take your paremeters, construct the vector data directly in a flat array, upload it into a VBO - bish bash bosh. render - done.

    Perhaps you want to be able to click on the model, drag bits around and all that jazz - GLscene has all the maths functions and helper functions to easily handle picking/ray-casting if you so desire.

    Get GLScene, get it setup with Lazarus/Delphi - whatever you use, have a look at some examples or just take one of the examples, put a scene viewer on a form.

    Start from there.

    Width/Height/Length - editboxes or whatever your app design is - then from those numbers, construct the 6 points of the cube in an array, then construct the 12 triangles, two for each face, upload the data to a VBO render in the sceneview. (you can also use the GLU Tesselator if you want to ignore thinking about triangles, just make 6 faces and pump the data into the tesselator - GLScene probably has a wrapper already for it - but it's trivial stuff and the documentation is online)

    Add each feature incrementally cause your design is custom and there's no road-map for where you're going.

    Let us know how you get on, we'll always try to help

    Oh and use GLScene from SVN/GIT whatever versioning system they're using - the stuff on the site will probably be very out of date - they suck at updating their site so much it's not even funny - but GLScene itself is maintained.
    Last edited by phibermon; 08-10-2016 at 08:16 AM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •