gCAD3D for design simple surfaces and hull

pafurijaz

Senior Member
Joined
Dec 23, 2016
Messages
295
Reaction score
71
Location
Jamestown, Saint Helena
Hi, it's been a few days since I figured out how to use gCAD3D, an opensource CAD that allows you to create NUBRS surfaces by drawing or with the manual editor, I did some tests and I think it can be an alternative to create simple hulls, because it allows you to have an excellent precision in inserting vertices and lines and also in drawing curves.
This program might be appreciated by those who prefer to enter coordinates and values with the use of text.
It has an intuitive and simple set of commands, and once you understand the basics it is also possible to better understand the use of the CAD environment.
I did several tests and I must say that I did not think I would be able to build a hull until a few months ago.
I started looking at the manual and understood the basics in a few hours.
It is certainly not easy initially but FreeShip is also not simple or FreeCAD, perhaps for some this might be easier to use.
gCAD3D has several functions and exports to other formats such as IGES and STEP, it is not a stable program, however it is very light and multi-platform, and can create basic surfaces quickly and easily. Being built on a simple language it is easy to edit and control parameters and create functions to control.
It will take a while before I start mastering the program for some as it has been for me but after that I think it's also fun to use. the installation for Linux is only 1.6Mb to download and for the manual click in the links in this topic
Here are some tests made with this program and with the code I created with the internal manual editor and its CAD.

My first spiline created with text editor
4A1h5M8y_o.png


and this is the gCAD3D code for this BSpline

S20=BSP P(-260 -13. 5) P(-209 22 5) P(-137 10 8) P(-14 0.91 12) P(102 61 14)
this is my first Gordon surface
0bnLvuzl_o.png


and this is the code of this
K6OqLOv6_o.png


This is a comparison Green surface made with gCAD3D via code and Red surface created with Moi3D and command surface from network curves created with gCAD3D.
abO8X9Bi_o.png

the code but a bit different from image above

# 2021/12/30-10:57:18
# model unknown
S20=BSP P(-260 -13 5) P(-209 22 5) P(-137 10 8) P(-14 0.91 12) P(102 61 14)
S21=BSP P(-260 -13 5) P(-260 -13 0) P(-260 0 0) P(-260 5 0) P(-260 20 5)
S22=BSP P(-260 20 5) P(-209 102 5) P(-137 100 8) P(-14 99.91 12) P(102 161 14)
S23=BSP P(102 61 14) P(100 61 0) P(99.3435202 72.77655454) P(99.5593045 90.21315138) P(102 161 14)
S24=BSP P(-29.752 -1.039 11.477) P(-41.51321598 52.72765114 -8.944436762) P(-58.355 94.812 10.734)
A20=BSP U(S20 S22) U(S21 S24 S23)
ATTS "C00ff00" A20

these are an other simple test and simple solids and surfaces

4uoZT4rF_o.png


the code of above image

# 2021/12/30-17:29:56
# Precision input
P20=0,0,0
P21=250,0,0
P22=500,0,0
P23=250,0,250
P24=250,1000,350
S20=BSP P(0 0 250) P(100 570 280) P(250 1000 350)
S21=BSP P(500 0 250) P(250 1000 350)
C20=P(250 0 250) 250 D(RY)
L20=P(250 1000 350) P(250 1000 850)
L22=P(250 0 250) P(250 250 250)
R(RY P24)
C21=ARC P(P24) ANG(0) ANG(-180) 50 CW
L21=P(0 150 0) P(100 150 0)
R(RZ)
A20=SRV R(L21) C21 180 360 0 1 CW
A21=SRU C20 D(L22)
A22=SRU L20 D(L21)
ATTS "C001155" A20
ATTS "C0044FF" A21
ATTS "C990000" A22

SDhrH9wo_o.png


the code of this test above

# 2021/12/31-11:12:52
# Solid and surfaces


B20=CON P(0 1000 0) P(0 1000 500) VAL(250) VAL(25)
B21=SPH P(500 0 250) 250
B22=TOR P(1100 0 100) D(RZ) VAL(250) VAL(100)
R20=PERP P(0 500 0) D(RZ) D(RX) 50
L20=P(500 500 0) P(500 500 1000) UNL
A20=SPH RZ 250 60 360 0 180
L21=P(500 1000 0) P(500 1000 500)
A21=CYL R(L21) 250 75 360 500 1
S20=BSP P(1289 930 0) P(1277 1423 0) P(958 1965 0) P(1200 2562 0)
S21=BSP P(1929 949 250) P(1938 1324 250) P(1840 1835 250) P(2156 2573 250)
S22=BSP P(2651 898 0) P(2451 1513 0) P(2586 1916 0) P(2723 2576 0)
A22=BSP U(S20 S21 S22) VAL(2)


And this is my first try of a hull with few #BSpline created few minute ago

gqd4KClW_o.png


343B2slK_o.png


The hull exported to IGES and imported in FreeCAD

cZ8NzTEk_o.png


Greetings
 
Wow, look here the surface created in gCAD3D (green) is essential and precise, the red one generated with the network of curves by Moi3D is full of control points, and the one created with gCAD3D the surface intersects and touches all profiles like the central one of the hull while remaining very simple. I am shocked.
FIIKsl9XIAMvFnx


the code of hull with few comments. you can copy this and paste in the gCAD3D under MAN internal text editor

# 2022/01/02-18:54:17
#Row boat Half Hull
L20=P(18 300 530) P(4200 15 680) #Ref_01
L21=P(1920 0 400) P(1920 600 400) #Ref_02
S20=BSP P(18 300 530) P(1920 600 400) P(4200 15 680) #Sheer
S21=BSP P(18 300 530) P(19 150 300) P(25 15 100) #Ref_Transom
S22=BSP P(18 300 530) P(69.42018057 313.7494539 421.6518722) P(129.9484041 256.0508578 310.8195596) P(169.7794948 98.9142556 257.5078143) P(238.8169239 15 114.4078664) #Transom

L22=P(-87.13365993 0 739.6318644) P(328.8199463 0 -56.95853177)
L23=P(-306.9228912 0 1152.528285) P(328.8199463 0 -56.95853177)
S23=BSP P(S20 PTS(2)) P(4195.840376 0 284.1636974) P(4161.304648 0 102.8511256) P(3992.942975 0 33.77966971) #Bow
S25=BSP P(S23 PTS(2)) P(S22 PTS(2)) #keel

S26=BSP P(S20 0.5) P(S25 0.543795)
S27=BSP P(S20 0.5) P(1925.13175 497.7201018 221.1976354) P(1937.604449 331.2659655 151.6661597) P(S25 0.543795)
A20=BSP U(S23 S27 S22) U(S20 S25) #Gordon surfaces with BSpline Networks
ATTS "C002299" A20 #surfaces color attribute
 
Last edited:
Hello PF,
Thank you for another excellent software demonstration. I have has this program on my computer for years but never spent any time learning it.
 
Hello PF,
Thank you for another excellent software demonstration. I have has this program on my computer for years but never spent any time learning it.

Thanks I'm glad it can be useful, with gCAD3D it's fun and I'm still learning, I'm impressed by the program, below I improved the hull a bit, and being parametric via text the changes are pretty simple. 
here I have constrained the curve of the transom to a plane and I have made the mirroring of the lines to make the other half
Z8wcgINZ_o.png

Z8wcgINZ_o.png

Below the new gCAD code

# 2022/01/02-18:54:17
#Row boat Half Hull
L20=P(18 300 530) P(4200 15 680) #Ref_01
L21=P(1920 0 400) P(1920 600 400) #Ref_02
S20=BSP P(18 300 530) P(1920 600 400) P(4200 15 680) #Sheer
S21=BSP P(18 300 530) P(19 150 300) P(25 15 100) #Ref_Transom

L22=P(-87.13365993 0 739.6318644) P(328.8199463 0 -56.95853177)
R20=P(L22 0.625108) D(L22) #ContructionP-Transom
R20 #Active CPlane
S22=BSP P(S21 PTS(1)) P(-132.0681077 254.7077813) P(-63.14105146 121.2548258) P(41.34761996 51.12785859) P(143.3337226 15 -0.4618833717) #Transom
RZ #Rest CP

L23=P(-306.9228912 0 1152.528285) P(328.8199463 0 -56.95853177)
S23=BSP P(S20 PTS(2)) P(4195.840376 15 284.1636974) P(4161.304648 15 102.8511256) P(3992.942975 15 33.77966971) #Bow
S25=BSP P(S23 PTS(2)) P(S22 PTS(2)) #keel

S26=BSP P(S20 0.5) P(S25 0.543795)
S27=BSP P(S20 0.5) P(1925.13175 497.7201018 221.1976354) P(1937.604449 331.2659655 151.6661597) P(S25 0.543795)
S28=BSP P(S20 0.882812) P(3632.061293 143.42442 256.9858662) P(S25 0.096039)
#S29=BSP P(S22 0.399902) P(S27 0.25) P(S24 0.28125) P(S23 0.125)
#S30=BSP P(S20 0.882812) P(S25 0.096039)
#S31=BSP P(S20 0.882812) P(S25 0.096039)
L24=P(1131.289 15 95.240) P(1131.289 15 800)
R21=P(L24 PTS(1)) D(L24)
R21
S24=BSP P(290.1290258 643.425509) P(99.1806746 584.165677) P(4.803903314 274.6976651) P(-54.45592982 46.4375712)
RZ
A20=BSP U(S20 S25) U(S23 S28 S27 S22) #Gordon surfaces with BSpline Networks

#Mirror BSpiline
S32=MIR S20 RY
S33=MIR S25 RY
S34=MIR S23 RY
S35=MIR S28 RY
S36=MIR S27 RY
S37=MIR S22 RY
A21=BSP U(S32 S33) U(S34 S35 S36 S37)
ATTS "C002299" A20 #surfaces color attribute

 
Here the hull completed also with lofting of keel

# 2022/01/02-18:54:17
#Row boat Half Hull
L20=P(18 300 530) P(4200 15 680) #Ref_01
L21=P(1920 0 400) P(1920 600 400) #Ref_02
S20=BSP P(18 300 530) P(1920 600 400) P(4200 15 680) #Sheer
S21=BSP P(18 300 530) P(19 150 300) P(25 15 100) #Ref_Transom

L22=P(-87.13365993 0 739.6318644) P(328.8199463 0 -56.95853177)
R20=P(L22 0.625108) D(L22) #ContructionP-Transom
R20 #Active CPlane
S22=BSP P(S21 PTS(1)) P(-132.0681077 254.7077813) P(-63.14105146 121.2548258) P(41.34761996 51.12785859) P(143.3337226 15 -0.4618833717) #Transom
RZ #Rest CP

L23=P(-306.9228912 0 1152.528285) P(328.8199463 0 -56.95853177)
S23=BSP P(S20 PTS(2)) P(4195.840376 15 284.1636974) P(4161.304648 15 102.8511256) P(3992.942975 15 33.77966971) #Bow
S25=BSP P(S23 PTS(2)) P(S22 PTS(2)) #keel

S26=BSP P(S20 0.5) P(S25 0.543795)
S27=BSP P(S20 0.5) P(1925.13175 497.7201018 221.1976354) P(1937.604449 331.2659655 151.6661597) P(S25 0.543795)
S28=BSP P(S20 0.882812) P(3632.061293 143.42442 256.9858662) P(S25 0.096039)
#S29=BSP P(S22 0.399902) P(S27 0.25) P(S24 0.28125) P(S23 0.125)
#S30=BSP P(S20 0.882812) P(S25 0.096039)
#S31=BSP P(S20 0.882812) P(S25 0.096039)
L24=P(1131.289 15 95.240) P(1131.289 15 800)
R21=P(L24 PTS(1)) D(L24)
R21
S24=BSP P(290.1290258 643.425509) P(99.1806746 584.165677) P(4.803903314 274.6976651) P(-54.45592982 46.4375712)
RZ
A20=BSP U(S20 S25) U(S23 S28 S27 S22) #Gordon surfaces with BSpline Networks

#Mirror BSpiline
S32=MIR S20 RY
S33=MIR S25 RY
S34=MIR S23 RY
S35=MIR S28 RY
S36=MIR S27 RY
S37=MIR S22 RY
A21=BSP U(S32 S33) U(S34 S35 S36 S37)
A22=BSP U(S23 S34)
A23=BSP U(S25 S33)
A24=BSP U(S22 S37)
ATTS "C002299" A20 #surfaces color attribute
ATTS "C002299" A22
ATTS "C002299" A23
ATTS "C002299" A24


CPU0qx90_o.png


And a test with PolyCAD
xIO3oqGj_o.png
 
Last edited:
Hi to all, I've update this hull now with more comments on gCAD3D code
k2Fa4DdU_o.png


# 2022/01/02-18:54:17
#Row boat Half Hull
L20=P(18 300 530) P(4200 15 680) #Ref_01
L21=P(1920 0 400) P(1920 600 400) #Ref_02
S20=BSP P(18 300 530) P(1920 600 400) P(4200 15 680) #Sheer
S21=BSP P(18 300 530) P(19 150 300) P(25 15 100) #Ref_Transom

L22=P(-87.13365993 0 739.6318644) P(328.8199463 0 -56.95853177)
R20=P(L22 0.625108) D(L22) #ContructionP-Transom
R20 #Active CPlane
S22=BSP P(S21 PTS(1)) P(-132.0681077 254.7077813) P(-63.14105146 121.2548258) P(41.34761996 51.12785859) P(143.3337226 15 -0.4618833717) #Transom
RZ #Rest CP

L23=P(-306.9228912 0 1152.528285) P(328.8199463 0 -56.95853177)
S23=BSP P(S20 PTS(2)) P(4195.840376 15 284.1636974) P(4161.304648 15 102.8511256) P(3992.942975 15 33.77966971) #Bow
S25=BSP P(S23 PTS(2)) P(S22 PTS(2)) #keel

S26=BSP P(S20 0.5) P(S25 0.543795)
S27=BSP P(S20 0.5) P(1925.13175 497.7201018 221.1976354) P(1937.604449 331.2659655 151.6661597) P(S25 0.543795) #Station 01
S28=BSP P(S20 0.882812) P(3632.061293 143.42442 256.9858662) P(S25 0.096039) #Station 02
#S29=BSP P(S22 0.399902) P(S27 0.25) P(S24 0.28125) P(S23 0.125)
#S30=BSP P(S20 0.882812) P(S25 0.096039)
#S31=BSP P(S20 0.882812) P(S25 0.096039)
L24=P(1131.289 15 95.240) P(1131.289 15 800)
R21=P(L24 PTS(1)) D(L24)
R21
S24=BSP P(290.1290258 643.425509) P(99.1806746 584.165677) P(4.803903314 274.6976651) P(-54.45592982 46.4375712)
RZ
A20=BSP U(S20 S25) U(S23 S28 S27 S22) #Gordon surfaces with BSpline Networks
#Mirror BSpiline
S32=MIR S20 RY #Sheer Mirror
S33=MIR S25 RY #Keel Mirror
S34=MIR S23 RY #Bow Mirror
S35=MIR S28 RY #Station 02 Mirror
S36=MIR S27 RY #Station 01 Mirror
S37=MIR S22 RY #Transom Mirror
R20
S30=BSP P(S21 PTS(1)) P(-420 0 0) P(S32 PTS(1))
RZ
A21=BSP U(S32 S33) U(S34 S35 S36 S37) #Gordon Side0 2
A22=BSP U(S23 S34) #Loft Bow Profile
A23=BSP U(S25 S33) #Loft keel bottom
S31=BSP P(S22 PTS(2)) P(S33 PTS(2))
A24=BSP U(S22 S37) U(S31 S30) #Transom Surfaces
S40=BSP P(S20 PTS(2)) P(S32 PTS(2))
A25=BSP U(S20 S32) U(S40 S30) #Top Surfaces for solid

ATTS "C002299" A20 #surfaces color attribute
ATTS "C002299" A22
ATTS "C002299" A23
ATTS "C002299" A24
ATTS "C002209" A25
#S38=PARL S32 VAL(-20) RZ

This is the hull with more surfaces to make a solid, that I've created with FreeCAD and is a perfect
I also attach the IGES file created with gCAD3D, but has a problem with PolyCAD and I had to save again with FreeCAD to import in PolyCAD, attached the same hull but exported again with PolyCAD(WhiteHall-Surface_only_PC.igs) imported from FreeCAD IGES and a step solid file made froma gCAD3D surfaces

I made a Surfaces from the same spiline with Moi3D and I saw a big problem with Moi3D it generate a lot CV with some strange bulges in bottom, gCAD3D Gordon surface are clean and simple than Moi3D and also the file size is bigger than IGES saved from other application.

The Red surfaces is generated with Moi3D and his size is (red - IGES size 556,2KiB
The Green one is generated with PolyCAD and the IGES size is only 17,6KiB

FDSkX98o_o.png

3xRB2UJT_o.png

Greetings
 

Attachments

I can get the design to copy and paste but I cannot see the surfaces as the green color.
Am I missing a setting?
Thanks, the results look very nice.
pfdemo2_gcad3d_nosurface.jpg
 
V-hull with gCAD3D, the B-Splines are generate from poly-lines created from points in the 3d space everything via code in gCAD3D,
 the surface from the B-Splines. and I have imported into FreeCAD and I can make solid and draft instantly, but I've much to understand, and is funny with code and the precision is very high with simple and nice surfaces

VTulLIAp_o.png

R75Cxktd_o.png

8yIssddy_o.png

uTr8E5z7_o.png


Here the code of this hull and below the IGES attached exported from gCAD3D

# 2022/01/04-20:26:35
# Hull_deep V USS_PT-564

#Points
P10=P(0 50 2478)
P20=P(184 50 436)
P30=P(21376 50 3155)
P40=P(0 2150 2478)
P50=P(10893 2520 2823)
P60=P(184 1772 436)
P70=P(10893 2145 963)
P80=P(21067 50 2547)
P90=P(2865 1908 545)
P100=P(5945 2051 679.5)
P110=P(9567 3306 880)
P120=P(16192 1654 1588)
P130=P(2865 2284 2568)
P140=P(5945 2410 2666)
P150=P(16192 2384 2989)
P160=P(17000 50 300)
P170=P(18900 50 400)
P180=P(19800 50 800)
P190=P(9837.5 50 358)

P200=MIR P30 RY
P210=MIR P40 RY
P220=MIR P60 RY
P230=MIR P20 RY
P240=MIR P10RY

#Line
L10= P30 P80
L20=MIR L10 RY
L30= P40 P60
L40=MIR L30 RY
L50= P40 P210
L60= P30 P200


#polyline
S20=POL P60 P90 P100 P70 P120 P80 #Polyline 01
S22=POL P40 P130 P140 P50 P150 P30 #Polyline02
S26=POL P20 P190 P160 P170 P180 P80 #Polyline03

#BSpiline
S21=BSP S20 VAL(3) #Chine
S23=BSP S22 VAL(3) #Sheer
S27=BSP S26 VAL(3) #Keel
S24=MIR S21 RY #Chine Mirror
S25=MIR S23 RY #Sheer Mirror
S28=MIR S27 RY #Keel Mirror
#Surface
A20=BSP U(S23 S21)
A21=BSP U(S24 S25)
A22=BSP U(S27 S21)
A23=BSP U(S28 S24)
A24=BSP U(S27 S28)
A25=BSP U(L10 L20)
A26=BSP U(L30 L40)
A27=BSP U(S23 S25) U(L50 L60)
 

Attachments

This is a simple example with a few comments that I think it can help.

All these elements can also be created by entering the data in the CAD environment, and they are the values that basically have to be entered in the command form.



For some elements it is possible to draw with the mouse, Curves, planes, points, etc., but for others it is also necessary to enter the values and data with the keyboard, in addition to entering all the values.

The XYZ coordinate system, and any point or vertices refer to these coordinates. 


For example the points are first declared with a "P" followed by a number and then the coordinates must be entered; 
example: P10 = P (100 0 150)
So this will be new point named P10 and place X100 Y0 Z150.


I hope to see others take their first steps with this CAD as well. 
And if I can I will try to help if I have the knowledge to answer.


For full documentation refer to the official documentation available on menu help of program or here in the web gCAD3D - user documentation english https://gcad3d.org/doc/html/index_en.htm
Greetings

the Code of the image below

# 2022/01/05-14:20:56
# V-Hull Version 02
#Lines for Reference
L20=P(0 0 0) P(5000 0 0)#low center line
L21=P(5000 0 0) P(5500 0 600)
L22=P(0 0 800) P(0 1000 800)
L23=P(0 0 800) P(5800 0 1200)

#Contruction Plane on center line L23
R20=P(L23 PTS(1)) D(L23) D(L22)#CPlane inclined
R20
#Points on CPlane R20
P5=P(0 1000 0)
P10=P(1000 1050 0)
P20=P(2000 1100 0)
P30=P(3000 1150 0)
P40=P(3800 1180 0)
P50=P(4500 1000 0)
P60=P(5000 690 0)
P70=P(5450 340 0)
#Reset Plane
RZ
P80=P(5800 0 1200)
#Polyline from points
S10=POL P5 P10 P20 P30 P40 P50 P60 P70 P80
#BSPline from Polyline VAL(3)= #Spiline degree
S20=BSP S10 VAL(3)#My Spiline this is a name
#CPlane 20 activation
R20

You can add comments in e new row but if you add comments in the same row of gCAD object you create a custom name for object and this help

upload_2022-1-5_17-57-20.png

jqHeNMjP_o.png
 
For me, the SolidDisplay Off only affects the blue lines not the surfaces. If I have the courage maybe I send an email to one of the developers of gCAD3D to ask.

Regardless, it is amazing how much work programs like gCAD3D and OpenSCAD can do with their relatively simple scripting languages.

It is also amazing how PF can learn so many programs and share the results with us!
Grazie Mille!
:)
 
Hi, I casually read the gCAD3D manual, and I hadn't noticed an important part concerning the language used for coding the elements.


Apt is an acronym for Automatically Programmed Tool. It was the first CAM program. It is a special-purpose language that was created in the late 1950's for the programming of computer-controlled machine tools.

Some resource (Books) available here in Internet Archive

Standard ISO 4343:2000

upload_2023-1-31_1-29-36.png


Quote from: Aptos Home https://aptos.sourceforge.net/

"Apt is used to program cnc machine tools to create complex parts using a cutting tool moving in space. It is used to calculate a point-to-point path a tool must follow to generate a desired form. Apt is a CAM system based on a special-purpose language. It was created and refined during the late 1950's and early 1960's to simplify the task of calculating geometry points that a tool must traverse in space to cut the increasingly complex parts required in the aerospace industry. It was a direct result of the new cnc technology becoming available at that time, and the daunting task that a machinist or engineer faced calculating the movements of the cnc for the complex parts for which it was capable. Apt was created before graphical interfaces were available, and so it relies on text to specify the geometry and toolpaths needed to machine a part."

"Apt is capable of calculating complex machine tool instructions for 2.5d contouring, 3d surfacing, and continuous 5-axis control. Five-axis control permits the tool path to be continuously oriented anywhere in 3d space and at any angle within the constraints of the particular machine tool. The tool itself can be defined with up to 7 variables denoting various tool shapes like ball end, bullnose, dovetail, and chamfer."

With this information now I think can be easier understanding the manual input!

cgCAD3D is constantly update now there is a new version the V.2.50

Greetings
 
Last edited:
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making any potentially dangerous or financial decision, always employ and consult appropriate professionals. Your circumstances or experience may be different.

  • Back
    Top