Results 1 to 10 of 10

Thread: Looking for an OpenSCAD like 3D display component

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by gcarreno View Post
    The 3D representation is just a nice visual aid for the person doing the box, just like here: http://www.makercase.com/.
    Wait only now did I realize that you need this only for boxes and not more complex 3D objects.
    This actually makes things a lot easier because such box can be composed either from 6 individual images (each image for each box face) or one image representing extruded box which can then simply be projected onto the box for rendering.

    So if I understood you correctly you are making a software tor designing these 3D boxes right?

  2. #2
    Quote Originally Posted by SilverWarior View Post
    Wait only now did I realize that you need this only for boxes and not more complex 3D objects.
    This actually makes things a lot easier because such box can be composed either from 6 individual images (each image for each box face) or one image representing extruded box which can then simply be projected onto the box for rendering.
    I think you almost got it. The "almost" is due to the fact that the box can have less than 6 sides.

    Let's say you want to make a lid-less box. This would have only 5 sides.

    Let's also say that this lid-less box has internal separators, one vertical, one horizontal. Now you have a lid-less box that has 4 compartments in it.

    Let's also say that those separators are lower than the top of the box, because you want to have a slide in lid.

    Hope this makes it clearer.

    So in terms of the 3D model, I'm thinking I can have the 2D contour of each side with the ply thickness extruded.
    Translate said sides/separators into a box and then spit out a 3D model.
    The "skin" is pretty much a single colour. Don't know if a map on it or just a material.
    Well, these are the basic premises you use in OpenSCAD. Don't really know if this can work in a "generic" 3D Model Viewer context.

    Quote Originally Posted by SilverWarior View Post
    So if I understood you correctly you are making a software [to design] these 3D boxes right?
    Pretty much.

    You start by setting the units: mm/inch.
    Thickness of the laser safe plywood: most common is 3mm or 6mm.
    Then you set if measurements are inside or outside.
    You then input Width, Height, Length of the box.
    Decide on what type/size the "notches" will be.
    This will give you a TreeView of your Box as root and the Sides as children.
    You can add separators, and these will show on the TreeView as well.
    You can then select each of those nodes on the TreeView and manipulate further.

    Once you're happy with your design, you export to SVG. What this software exports is a bi-dimensional vector image of the sides and/or separators.
    If you're happy with the layout exported it's just a 4 step thing: Import into InkScape; Export to DXF; Import into Laser Software; Cut.

    Since I'm not really into doing a DXF exporter, you need use InkScape to export your DXF.
    Most, if not all, laser cutter software works with a DXF importer.
    Unfortunately the commercial laser cutters come with proprietary software and each one has it's own obscure/proprietary internal format.

    My HackSpace goes through many of such box designs, and it's a PITA to then have to mess around inside InkScape (Not really a box design tool) to customise the generic 6 side box that most of the online helpers produce.

    That's my main drive, anyway

  3. #3
    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.

  4. #4
    Quote Originally Posted by phibermon View Post
    (My engine has DXF import/export and STL import capabilites - but it's not yet released.)
    I really hope I can use these thing in the future. How's it progressing anyway?


    Quote Originally Posted by phibermon View Post
    But to save you some time and give you the toolkit you crave - what you want to use is :

    GLScene.
    Ok, this looks like a good suggestion, I'll have a good rummage through.


    Quote Originally Posted by phibermon View Post
    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
    That's how I usually work, one step at a time.

    And YES, will definitely report back!

    Quote Originally Posted by phibermon View Post
    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.
    Thanks for this tip, this is great stuff and it gives me something tangible to begin working on.

    Thank you very much @phibernon!!

    Cheers,
    Gus

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
  •