FreeCAD Trails Workbench (Transportation and Geomatics)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
lobz
Posts: 4
Joined: Tue Feb 07, 2023 1:40 pm

Re: FreeCAD Trails Workbench (Transportation and Geomatics)

Post by lobz »

Thanks Roy, this solved both the subtraction and the TechDraw view problem.

As the extracted shape does not contain the contour lines, I tried a small code snippet inspired by yours to create the shape for that too:

Code: Select all

doc = App.ActiveDocument
obj = doc.getObject("Surface")
new = doc.addObject("Part::Feature", "SomeCountourShape")
new.Shape = obj.ContourShapes
This created a shape containing the contour lines, they are visible in 3D view and also appear in TechDraw.

Now all I have to figure out how to display the elevation of the contour lines in TechDraw, If there is no out-of-the-box solution I guess it could be done by iterating over the subshapes of the contour shape, getting the Z coordinate of the first vertex of the first edge and generating annotation. The placement of the annotation could be tricky though.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: FreeCAD Trails Workbench (Transportation and Geomatics)

Post by HakanSeven12 »

Hi everyone. If you have any questions about this workbench use github discussions https://github.com/HakanSeven12/Trails/discussions

I won't use FreeCAD forum anymore.
Post Reply