Home
Home
Map
Map
Download
OS++
Down
Load
Doco A
Doco_A
Videos
Youtube
Chat
Chat
News
News
Shop
Shop

OS++ index page (and this is a quick stub)

TLDR; OS++ is an 3d modelling language which runs under openscad

What is OS++;

OS++ is an object orientated 3d modelling language which runs under the openscad program. It replaces the standard_openscad code with it’s own primaries and methods, like a parasite virus.

Why use? - If openscad_standard can do everything that OS++ can, why bother with it?

I built the OS++ library for myself. After 2-3 years of testing I find that

  1. I can easily read my 2 year old OS++ code and debug it.
  2. Old code still renders in latest framework.

My standard Openscad code on the other hand tends to devolve into a nightmare hellscape of absolute translates, mystical modules and magic numbers. Perhaps I am a bad Openscad coder. Perhaps I am just a bad coder, full stop. However, OS++ get rid of all that, despite my best worst coding. Everything is orientated relative to other objects. Hence it is an object orientated language. In short, my more complex code has become read/write rather than write once and start again if I need to make a fundamental change a few years later.

Why is it called OS++; ?

In the C programming language, to increase a variable called C by one, the syntax is C++; C++ is an object orientated language based on C. ie C plus 1. OS++ is an object orientated language based on OpenScad. Hence OS++. ie OpenScad plus 1. Also the domain was available.

How is OS++ a new language? (It runs in Openscad, produces the same output. Surely it’s just a derivative of openscad_standard?)

It’s a fair point, but let’s do an analogy. You can represent all maths with roman numerals (I VI, XXX). Or Arabic / Indian numerals (1,6,30). They are both “the language of maths” and they both achieve the same thing. So is one is the derivative of the other? No, Because the Arabic number system includes the idea of nothing. Someone saw nothing, put a ring around it and called it zero. That single idea changed the way we think and do maths. OS++ has concepts and ideas that change the way I think and therefore code. Hence it is a different language, even if it describes the same thing.

What advances have you put into this new language

TLDR; Do you have a Youtube direct link that explains OS++?

Video that shows you a coffeespoon being made from scratch

https://www.youtube.com/watch?v=FztlySocXYw

Playlist of videos to show how os++ works

https://www.youtube.com/@osvideo/playlists

Let’s do an example in pseudo code.

//Your designing a "wheel and axle" for a small car.  You define two cylinders (cones)
 Cylinder_wheel=[Orientation, Length, Diameter_of cylinder];
 Cylinder_axis=[Orientation, Length, Diameter_of cylinder];

//Next you write a module/method to render the primary shapes in your model
 [
 Anchor point is at X=0,Y=0,Z=0.
 Render "Cylinder_axis" such that the anchor point is in the middle of the Axle

 Anchor point is moved to the 0(start/beginning) point of the Axle
 Render "Cylinder_wheel" such that the anchor point is in the middle of wheel

 Anchor point is moved to the L(Last/end) point of the Axle
 Render "Cylinder_wheel" such that the anchor point is in the middle of wheel
 ]

You render your model and it comes out fine, the wheels are on the end of the axle. Job done. Time to surf the net. But the boss comes down and tells you the axle needs to be double the length.

Here is the important part.

You only need to tweek the primaries. The method, with it’s relative position for the wheels does not need to be changed. ie the wheels are relative to the axle not an absolute value. You have created a rule that says the wheel has to be on the end of the axle and the wheel has to have the axle at it’s centre. It would be a strange car otherwise.

Effectively you have a hierarchy, The axial denotes the position of the wheels. The wheels could denote the tyres. The types denote the pressure values and thread patterns etc. A change in one effects the position of all the objects below the hierarchy. Simple huh? Now write a program to articulate that method. That’s OS++; Where an openscad_standard absolute “Translate” is about as welcome as a “Goto” in Rust. But don’t worry I am not a monster. You can still use absolute translates, if you must.

Pseudo code? really? What about actual real code? Okay click the screen shot link Screenshot And to download the source code pseudo_code.scad Of course, you will need openscad and the OS++ framework for it to render.

Tell me something about you?

I have worked a significant part of my life, as a Production DBA, in the city. That essentially makes me an “anti programmer”. A Production DBA wants a stable, reliable system up 24x7x365 so they can enjoy their weekends and nights in peace. Hopefully without that phone call. In short I just want it to work. On the other hand, A programmer will add instability to the system with their “forever change” and “all nighters” to beat management deadlines. Unfortunately DBAs are vastly outnumbered by the forces of instability in the corporate world. And so our lives seem to be full of saying the word “no”. Especially to new and idealistic programmers with their new religion.

I am also vexed by dev people reinventing the wheel for their own narcissistic reasons. And then expecting the rest of the world to drop their extensive & hard won knowledge of the old wheel, by deprecating it. I appreciate that ideas develop and change. But I see the use of the deprecated label as an abuse of power. Which is a bit rich coming from me.

So, I wrote OS++. I did not set out to do so. But now that I am here, I have tried to remove some of my development pet peeves. In short

  1. Rule of Reliability - I want old code to “just work” on the latest OS++ framework. Guaranteed.
  2. Rule of Quality & Understanding - I want to enforce high standards on a professional, but be easy going on a bumbling Amateur. In the same code base.
  3. Rule of flexibility - I want a frame work to allow new ideas to grow, as new fads and religions do. And yet allow the causal heretic to just get stuff done.
  4. Rule of brevity and clarity - I want a quick and compact way to code. Which I can still easily read, 3 years later.
  5. Rule of ubiquity and consistency - I want a framework that rewards coders, who have taken the time to learn a concept, by reusing that concept. Again and again … and again.

At times I felt that I wanted it bigger on the inside, than it was on the outside. But I am quite happy with the resulting framework. Hopefully you will be to.

Enjoy.


Got an OS++ model, How do I run it?

TLDR; Do you have a direct youtube video that explains this? https://www.youtube.com/watch?v=x6xyGrS6qLY

In other words. You have a OS++ model that you have downloaded off the internet along with the STL. You want to tweek the STL by recompiling the source. But the source requires the OS++ frame work to render. What is the quickest way to get it to render? So you can tweek the primaries?

Youtube walk through

Instuctions

  1. Ensure you have openscad installed and working on your pc. https://openscad.org/
  2. Download the OS++ framework http://osplusplus.org/2022standard/download_2022code.tar.Z
  3. Uncompress and untar the files into a home directory
  4. Copy the OS++ file you want to render, into the directory created by step2
  5. Open the file up using openscad
  6. Render by pressing F6 or F5 in openscad (F6 for 3dmodels, F5 for colours)

If you get the below errormessage in your console

WARNING: Can’t open include file ‘z_lib/OS++20221031.scad’.

You have not copied the OS++ file into the correct directory. You need to copy the file into the “root” directory of the OS++ framework. That “root” directory should have a subdirectory called ./z_lib ./z_lib contain all the framework libraries Yes this works in windows.


Site summary (added to bottom of every page)

Web links    
 The_Download = UNIX - The_Download - OS++ Framework
 The_Download = Windows - The_Download - OS++ Framework
 Front_door = OSplusplus.org
 2022standard = OSplusplus.org/2022standard
 Grade EG = OSplusplus.org/2022standard/Professional
 Doco = OSplusplus.org/2022doco/
 Terms & datatypes = OSplusplus.org/2022term/
  =  
 Youtube Channel = https://www.youtube.com/channel/UC5GqhceNMLX4iDNClEWT0Fg
Code map    (Download page)
 Examples = /Example_lucky_dice_succinct_v2_0_0.scad
 Templates (Use this) = /Template_minimal_v1_2_0.scad
 Templates (too long) = /Template_verbose_v1_1_0.scad
 Project_template (Use this) = /project_template
 Libs root = /z_lib/
 3rd party code = /z_lib/addon
 Cuboid = /z_lib/lib_cuboid
 Cones = /z_lib/lib_cone
 Spheres = /z_lib/lib_sphere
 Cone Maths = /z_lib/L0_cone
 Cone Math/Cyl = /z_lib/L0_cone/z_ref_Cyl
 Libs_unit_test = In directories above
   
Hard_code_learning (Play/Learn by example)
  Download 2022standard, Uncompress, untar.
  Open Openscad (AppImage 2021.01-x86_64).
  Load Learn_Hard1A_v1_0_0.scad
  Press F6. Nothing happens.
  unRem block, Press F6 and render.
  See code example come to life.
  Change parms. Destroy code. Reload. Repeat.
Procedure for use
  Download 2022standard,uncompress,untar.
  Delete all files in root except template
  Copy template to new file name
  Edit new filename
   
Author
 Stephen George
 3rd March 2023
Contribute (LOL)    
 Buy me a coffee =
 Talk to me = Sure! Buy me a coffee. I think there is a message feature on the coffee site.
 Bugs & Finance = TBA
 RFC = TBA