Search found 13 matches

by eNano
Thu May 08, 2025 5:22 pm
Forum: Coding Questions
Topic: Basic question about creating and deleting structured variables
Replies: 3
Views: 451

Re: Basic question about creating and deleting structured variables

Thanks a lot for the answers, it was driving me crazy
by eNano
Wed May 07, 2025 9:05 pm
Forum: Coding Questions
Topic: Basic question about creating and deleting structured variables
Replies: 3
Views: 451

Basic question about creating and deleting structured variables

Hi,
I have a conceptual doubt about defining and deleting structured data with complex fields inside
If I define an array of structured data with arrays and maps and list inside, and then I delete that element, are all the elements inside of that structure deleted as well ? or I need to delete them ...
by eNano
Fri Feb 28, 2025 7:00 pm
Forum: Tricks 'n' Tips
Topic: OpenB3D 3D DLL framework include file for PureBasic
Replies: 25
Views: 16051

Re: OpenB3D 3D DLL framework include file for PureBasic

Is it possible to call the OpenB3D functions from a procedure? I try to call OB3D_createSphere() inside a procedure in the same demo of the include file and gives me

[ERROR] Invalid memory access. (write error at address 8)
The Program was killed.
by eNano
Thu Feb 13, 2025 5:45 pm
Forum: General Discussion
Topic: COM question: How can I assign a COM object as a property of another COM object using COMate Plus?
Replies: 0
Views: 757

COM question: How can I assign a COM object as a property of another COM object using COMate Plus?

Hi,
I'm trying to generate a tool by connecting Autocad to my code using COMate
So far I can do some basic stuffs like creating standard things and executing some commands

Now I need to change the color of an object (for example a circle), and the color property seems to be another kind of object ...
by eNano
Fri Sep 13, 2024 7:30 pm
Forum: Coding Questions
Topic: Single procedure with universal structure type as parameter
Replies: 7
Views: 1637

Re: Single procedure with universal structure type as parameter

Hi, I keep testing things about this subject and I have another doubt, I need to do a single function to update several kind of structures, I'm thinking about making a program with some kind of plugin system.
Is this concept going to generate some internal problem or could it be ok to be used ...
by eNano
Fri Aug 30, 2024 4:44 pm
Forum: Coding Questions
Topic: Decimal point problem (was: Very noob doubt is driving me crazy)
Replies: 18
Views: 4430

Re: Decimal point problem (was: Very noob doubt is driving me crazy)

Thanks for all the answers! I'm working with some imperial to metric unit conversions in purebasic, I was guessing this was some "binary kind of thing" that I don't understand. Is it ok if I keep working with float numbers and trust the results? will I loose too much accuracy if I do a couple of ...
by eNano
Fri Aug 30, 2024 12:20 am
Forum: Coding Questions
Topic: Decimal point problem (was: Very noob doubt is driving me crazy)
Replies: 18
Views: 4430

Decimal point problem (was: Very noob doubt is driving me crazy)

A very simple doubt that I can´t find an answer:
If I debug this:

Code: Select all

Debug 538.0 * 0.0254
why the result is 13.6652000000000004575895218 when after the 4th decimal all should be zero?
I really appreciate any help
by eNano
Mon Jul 29, 2024 7:28 pm
Forum: 3D Programming
Topic: Creating a 3D relief of an Image?
Replies: 24
Views: 11084

Re: Creating a 3D relief of an Image?

Just to share an idea you could use Stable Diffusion with controlNet to get an AI based depth map of an image, it is possible to make a "bridge" between your code and Stable Diffusion but you will have to read a lot
by eNano
Mon Jul 29, 2024 5:29 pm
Forum: 3D Programming
Topic: How can I get the ID of 3d engine elements by the handle?
Replies: 2
Views: 4159

Re: How can I get the ID of 3d engine elements by the handle?

Hi! I know there is no answer yet but I need to add some details to my question, maybe someone can give me a clue.
I didn't found any internal function inside pb to manage dynamic parent / child relationships, many 3d engines (including ogre) have the option to get the children count or get the ...
by eNano
Fri Jul 26, 2024 7:42 pm
Forum: 3D Programming
Topic: How can I get the ID of 3d engine elements by the handle?
Replies: 2
Views: 4159

How can I get the ID of 3d engine elements by the handle?

Is there a way to find the purebasic ID number of a 3d element (for example a node) by using the handle of that element? I was thinking that maybe there is something similar to form elements IDs.
For example if you need to get the ID number of a button you can write:


GetProp_(GadgetID ...
by eNano
Sat Jul 20, 2024 6:03 pm
Forum: Coding Questions
Topic: Single procedure with universal structure type as parameter
Replies: 7
Views: 1637

Re: Single procedure with universal structure type as parameter

Thanks a lot for sharing your knowledge! you all gave me great ideas to study, this is still a bit confusing for me but the examples are very useful.
I'm trying to do a simple 2d vector drawing application and I need to think about how to handle the nodes and how to make improvements in some kind of ...
by eNano
Fri Jul 19, 2024 10:41 pm
Forum: Coding Questions
Topic: Single procedure with universal structure type as parameter
Replies: 7
Views: 1637

Single procedure with universal structure type as parameter

Hi,
I'm trying to do a single function that takes a single "non specific type" pointer to handle parameters with different structures
Is it safe to use something like this? I'm not expert about memory stuffs



#TYPE_RECTANGLE = 1
#TYPE_CIRCLE = 2
#TYPE_POLYGON = 3

Structure rectangleData
Width ...
by eNano
Wed Jun 26, 2024 10:02 pm
Forum: Coding Questions
Topic: Question about dll creation: arrays as parameter and answer
Replies: 1
Views: 448

Question about dll creation: arrays as parameter and answer

Hi everyone, this is my first post on the forum.
I don't have too much experience coding but I'm learning about dll creation in pb and I have a big doubt: if I have an array in the source code and somehow I pass the array pointer to a dll function as a parameter, can I re-dim that array from the dll ...