Youtube lessons

Quaoar

Administrator
Staff member
Here we have the list of lessons that are already published or going to be published on our youtube channel. The list is kinda dynamic, and I do not really have any strict plan or schedule of what & when to publish. Since these lessons are entirely community-driven, feel free to share your ideas on the possible topics right below this post.

OpenCascade lessons done (too late to change...):
  1. Lesson 1: Configure Visual Studio to use OpenCascade
  2. Lesson 2: Bring OpenCascade and VTK together
  3. Lesson 3: Compile OpenCascade with MFC samples
  4. Lesson 4: Use native OpenCascade visualization
  5. Lesson 5: Use OpenCascade from CMake
  6. Lesson 6: OpenCascade in Docker
  7. Lesson 7: OpenCascade in a nutshell
  8. Lesson 8: Meet OpenCascade modules
  9. Lesson 9: OpenCascade’s interactive Draw console: build a prismatic block
  10. Lesson 10: First steps in OCAF
  11. Lesson 11: Design data model with OpenCascade OCAF
  12. Lesson 12: Visualize STEP models with colors and assembly structure
  13. Lesson 13: How to profile performance with Intel VTune Profiler
  14. Lesson 14: Intersect 2D polygons using Intf package
  15. Lesson 15: Export CAD assemblies with colors and names (create an assembly from scratch, put some names and colors, export to STEP)
  16. Lesson 16: OpenCascade in Python (PythonOCC)
  17. Lesson 17: Fast point membership classification (PMC), (see also this topic), 2 parts.
  18. Lesson 18: Bottle exercise: https://dev.opencascade.org/doc/overview/html/occt__tutorial.html
  19. Lesson 19: Handles.
  20. Lesson 20: Offsets (BRepOffsetAPI_MakeOffset).
OpenCascade lessons TODO (well, just random ideas here; feel free to propose down below):http://analysissitus.org/forum/index.php?threads/simple-part-generation-tutorial.183/
  • COMING SOON: Splines in OpenCascade.
  • COMING SOON: Optimization method for cylinder fitting.
  • Simple modeling tutorial
  • GeomFill_Sweep
  • GeomPlate_BuildPlateSurface
  • Corrected Frenet and how to locate profiles along a curve
  • TopoDS-Geom how to
  • Intersect planes with IntAna_QuadQuadGeo
  • Offsets according to [Piegl, L. a., & Tiller, W. (1999). Computing offsets of NURBS curves and surfaces. CAD Computer Aided Design, 31, 147–156. https://doi.org/10.1016/S0010-4485(98)00066-9]
  • Split shapes and curves by ShapeUpgrade_SplitCurve3dContinuity.
  • Intersect edges with BOPs.
  • ThruSection and related problems.
  • OpenCascade threads.
  • Export to IFC model.
  • OCAF: overview of the standard attributes.
  • Slice a model by a stack of planes.
  • Helix in OpenCascade.
  • Convert splines to Bezier (GeomConvert_BSplineCurveToBezierCurve).
  • Viewer initialization on linux (based on Lesson 12) with docker.
  • OpenCascade + VTK without IVtk.
  • How to survive geometric tolerances.
  • Surface trimming in OpenCascade (https://forum.freecadweb.org/viewtopic.php?f=3&t=61832). This would require some advanced healing, maybe surface morphing.
  • Constrained filling of a surface by boundary edges.
  • ShapeAnalysis/ShapeFix.
  • Custom DRAW commands (C++ prototyping).
  • How to organize the non-regression testing system on top of Draw
  • OpenCascade + Qt widgets
  • OpenCascade basic types (smart pointers, geometry, topology)
  • Modeling API
  • FreeCAD modules (https://github.com/qingfengxia/FreeCAD_Mod_Dev_Guide/tree/master/pdf)
  • Use OpenCascade from C# ( https://www.red-gate.com/simple-talk/dotnet/net-development/creating-ccli-wrapper/ )
  • Set up Jenkins as CI/CD for OpenCascade-based project
  • Give Coin3D a try?
CAD lessons TODO:
  • CG quick start.
  • Plug in NetGen mesh generator.
  • BVHs explained.
  • Surface fitting from point clouds (regular, irregular, interp/approx).
  • Voxelization: ADF, F-rep, octrees.
  • Material Removal: distance fields.
Programming lessons done:
  • Using licensecc for protecting commercial software packages.
Programming lessons TODO:
  • Finding missing deps with Dependency Walker.
Analysis Situs highlights done:
  1. Export colored parts to glTF.
  2. Voxelization and point cloud generation.
  3. Thickness analysis.
  4. Shape healing by example of a benchmark model.
  5. Feature suppression ways of usage.
Analysis Situs highlights TODO:
  • Code review of analysis situs code base.
  • Save IGES from SW, open in AS, convert canonical, sew.
  • Export unique CAD parts from a CAD assembly using XDE interfaces in Tcl scripting.
  • Tolerances.
  • Feature recognition basics.
  • STEP -> XDE -> STEP conversion.
  • Mesh refinement.
  • Surface fitting.
  • AAG ways of usage.
 
Last edited:

madureiraBrazil

Looking around for some CAD
Hello,

I am trying to implement Lesson 10 (First steps with OCAF (OpenCascade Application Framework) using PythonOCC.

from OCC.Core.TDocStd import TDocStd_Document,TDocStd_Application
from OCC.Core.TDataStd import TDataStd_Integer
from OCC.Core.BinDrivers import bindrivers
from OCC.Core.TCollection import TCollection_ExtendedString
app=TDocStd_Application()
doc = TDocStd_Document(TCollection_ExtendedString("pythonocc"))
app.NewDocument(TCollection_ExtendedString("BinOcaf"),doc)
bindrivers.DefineFormat(app)
doc = TDocStd_Document(TCollection_ExtendedString("pythonocc.cbf"))
app.NewDocument(TCollection_ExtendedString("BinOcaf"),doc)
mainLab=doc.Main()
TDataStd_Integer.Set(mainLab,199)
print(app.SaveAs(doc,TCollection_ExtendedString("C:/pythonocc.cbf")))

The result of last print is 3=PCDM_SS_Failure

If some one could help me.
 

madureiraBrazil

Looking around for some CAD
Hello,

I am trying to implement Lesson 10 (First steps with OCAF (OpenCascade Application Framework) using PythonOCC.

from OCC.Core.TDocStd import TDocStd_Document,TDocStd_Application
from OCC.Core.TDataStd import TDataStd_Integer
from OCC.Core.BinDrivers import bindrivers
from OCC.Core.TCollection import TCollection_ExtendedString
app=TDocStd_Application()
doc = TDocStd_Document(TCollection_ExtendedString("pythonocc"))
app.NewDocument(TCollection_ExtendedString("BinOcaf"),doc)
bindrivers.DefineFormat(app)
doc = TDocStd_Document(TCollection_ExtendedString("pythonocc.cbf"))
app.NewDocument(TCollection_ExtendedString("BinOcaf"),doc)
mainLab=doc.Main()
TDataStd_Integer.Set(mainLab,199)
print(app.SaveAs(doc,TCollection_ExtendedString("C:/pythonocc.cbf")))

The result of last print is 3=PCDM_SS_Failure

If some one could help me.
Hello all!

I did some modifications and now it works! TDocStd_Document need to receive the 'BinOcaf' as astorageformat: TCollection_ExtendedString

from OCC.Core.TDocStd import TDocStd_Document,TDocStd_Application
from OCC.Core.TDataStd import TDataStd_Integer
from OCC.Core.BinDrivers import bindrivers
from OCC.Core.BinDrivers import bindrivers_DefineFormat
from OCC.Core.TCollection import TCollection_ExtendedString
from OCC.Core.PCDM import PCDM_SS_Failure,PCDM_SS_OK,PCDM_SS_WriteFailure,PCDM_SS_No_Obj,PCDM_SS_Doc_IsNull,PCDM_SS_DriverFailure,PCDM_SS_Failure
app=TDocStd_Application()
doc = TDocStd_Document(TCollection_ExtendedString("BinOcaf"))
app.NewDocument(TCollection_ExtendedString("BinOcaf"),doc)
bindrivers_DefineFormat(app)
mainLab=doc.Main()
TDataStd_Integer.Set(mainLab,199)
print(app.SaveAs(doc,TCollection_ExtendedString("D:/Projetos/OccTestes/GeoExtract/test.cbf")))
 

Quaoar

Administrator
Staff member
Hey @madureiraBrazil, welcome to the forum! It's cool that you sorted it out. Could you please guide me on how to set up PythonOCC? I've never used it and did not find any easy-to-follow tutorial quickly. :confused:
 

A-U

Active CAD practitioner
Great series! I'd upvote 12 (Surface filling) and propose to add a lesson on ShapeAnalysis/ShapeFix.
 

Quaoar

Administrator
Staff member
Great series! I'd upvote 12 (Surface filling) and propose to add a lesson on ShapeAnalysis/ShapeFix.
Done. Both topics are non-trivial and would require some more preparation, but thanks for giving your feedback. Do you have any specific questions related to shape healing and shape processing?
 

A-U

Active CAD practitioner
Thanks! Regarding shape healing I have two specific interests:

(1) Fixing planar faces based on possibly incorrect wires/edges - how to do it in an optimal way/which fixes are strictly necessary?
(2) General shape diagnostics in the case of filed bool ops - where to get started in such a situation?
 

geonet

Looking around for some CAD
I am just posting to thank you for the great videos.
I am voting for the C# wrapper tutorial as well!
Cheers!
 

Quaoar

Administrator
Staff member
@geonet Thanks for finding the time and coming up with the feedback. C# is on the radar although I cannot promise it any time soon.
 

redflare

Looking around for some CAD
I want to know how to select or preselection in opencascade with vtk ,which confuse me now,thanks!
 

Quaoar

Administrator
Staff member
I want to know how to select or preselection in opencascade with vtk ,which confuse me now,thanks!
Do you already use VTK with OpenCascade? Do you use IVtk package or pure VTK? I ask because the latter determines how selection is going to work.
 

redflare

Looking around for some CAD
Do you already use VTK with OpenCascade? Do you use IVtk package or pure VTK? I ask because the latter determines how selection is going to work.
I perfer to use pure VTK,becase it seems to have some problem about preselection with IVtk package.
 

David

Active CAD practitioner
Here we have the list of lessons that are already published or going to be published on our youtube channel. The list is kinda dynamic, and I do not really have any strict plan or schedule of what & when to publish. Since these lessons are entirely community-driven, feel free to share your ideas on the possible topics right below this post.

OpenCascade lessons done (too late to change...):
  1. Lesson 1: Configure Visual Studio to use OpenCascade
  2. Lesson 2: Bring OpenCascade and VTK together
  3. Lesson 3: Compile OpenCascade with MFC samples
  4. Lesson 4: Use native OpenCascade visualization
  5. Lesson 5: Use OpenCascade from CMake
  6. Lesson 6: OpenCascade in Docker
  7. Lesson 7: OpenCascade in a nutshell
  8. Lesson 8: Meet OpenCascade modules
  9. Lesson 9: OpenCascade’s interactive Draw console: build a prismatic block
  10. Lesson 10: First steps in OCAF
  11. Lesson 11: Design data model with OpenCascade OCAF
  12. Lesson 12: Visualize STEP models with colors and assembly structure
  13. Lesson 13: How to profile performance with Intel VTune Profiler
  14. Lesson 14: Intersect 2D polygons using Intf package
  15. Lesson 15: Export CAD assemblies with colors and names (create an assembly from scratch, put some names and colors, export to STEP)
  16. Lesson 16: OpenCascade in Python (PythonOCC)
OpenCascade lessons TODO (well, just random ideas here; feel free to propose down below):
  • Lesson 17 (?): Fast point membership classification based on BVH.
  • Lesson 18 (?): Slice a model by a stack of planes.
  • Progress Indication: how to get progress information back from OpenCascade algorithms.
  • Helix in OpenCascade.
  • Viewer initialization on linux (based on Lesson 12) with docker.
  • OpenCascade + VTK without IVtk.
  • How to survive geometric tolerances.
  • Surface trimming in OpenCascade (https://forum.freecadweb.org/viewtopic.php?f=3&t=61832). This would require some advanced healing, maybe surface morphing.
  • Boolean Operations in OpenCascade.
  • Constrained filling of a surface by boundary edges.
  • ShapeAnalysis/ShapeFix.
  • Splines in OpenCascade.
  • Custom DRAW commands (C++ prototyping).
  • How to organize the non-regression testing system on top of Draw
  • OpenCascade + Qt widgets
  • OpenCascade basic types (smart pointers, geometry, topology)
  • Modeling API
  • FreeCAD modules (https://github.com/qingfengxia/FreeCAD_Mod_Dev_Guide/tree/master/pdf)
  • Use OpenCascade from C# ( https://www.red-gate.com/simple-talk/dotnet/net-development/creating-ccli-wrapper/ )
  • Set up Jenkins as CI/CD for OpenCascade-based project
  • Give Coin3D a try?
CAD lessons TODO:
  • CG quick start.
  • Plug in NetGen mesh generator.
  • BVHs explained.
  • Surface fitting from point clouds (regular, irregular, interp/approx).
  • Voxelization: ADF, F-rep, octrees.
Programming lessons TODO:
  • Using licensecc for protecting commercial software packages.
  • Finding missing deps with Dependency Walker.
Analysis Situs highlights done:
  1. Export colored parts to glTF.
  2. Voxelization and point cloud generation.
  3. Thickness analysis.
Analysis Situs highlights TODO:
  • Save IGES from SW, open in AS, convert canonical, sew.
  • Tolerances.
  • Feature recognition basics.
  • STEP -> XDE -> STEP conversion.
  • Mesh refinement.
  • Surface fitting.
Further proposal: Project a 3D face after boolean solid (cut) to a plane. Using HLR unfortunately does not provide continuous, closed wire which were needed for area calculations.
 

Quaoar

Administrator
Staff member
Further proposal: Project a 3D face after boolean solid (cut) to a plane. Using HLR unfortunately does not provide continuous, closed wire which were needed for area calculations.
Does it have something to do with die casting? Is the 3D face you're talking about already planar or not necessarily? Just trying to understand the context.
 

David

Active CAD practitioner
Hallo Quaoar,

Sorry for late response. No it is not die casting. The 3D face is not planar. So my first idea was normal projection but this failed. The Hidden Line Removal (HLR) worked straigth forward, but when I tried to look for closed wires the original face was more or less split up into closed wires, but open on the outside, hence I could not heal it to a closed face, but created faces from each closed wired and summed up the area to the overall area. This is sometimes ok, but most times there are too many non-connected areas, so that I did not receive the full facial area, but only a certain fraction (60 to 100%), hence unreliable.

Any other ideas ?
 

Quaoar

Administrator
Staff member
Hey @David. Well, I guess it might be interesting to reproduce the issue first. Would you mind posting a random face you have and a piece of code you use for the projection? I know that sounds like I'm lazy, but it will help to start off.
 
Top