Hello @Sona_Architecture
You have to understand the difference between Revit objects and Desgnscript/Dynamo Objects.
Using Dynamo nodes you work with Dynamo elements, you can see the geometry in the Dynamo 3D view.
In python you can work with Dynamo elements or with Revit elements.
You have created a
Autodesk.DesignScript.Geometry.Solid with the dynamo core nodes, but you have created a Autodesk.Revit.DB.Solid with your python code.
You will never ever see Revit.DB elements in the Dynamo 3d view.
Converting Dynamo and Revit elements to each other is not possible for Solids!
For your understanding, everything you can find here is related to Revit elements only: https://www.revitapidocs.com/
Here a comparison how you work with revit solids and dynamo soilds in python:
Dynamo solid:
solidA.Intersect(solidB)
Revit solid:
BooleanOperationsUtils.ExecuteBooleanOperation(solidA, solidB, BooleanOperationsType.Intersect)
If you want to work with revit elements but you want to see them in dynamo background you have to use a workaround. One way would be to extract faces from the revit solid and convert them to dynamo surfaces, these can be seen in den 3D view. Another workaround is to export the solid to a SAT file and import it back with dynamo nodes. Another workaround is creating an importinstance from the solid, explode it and use the resulting FreeForm object in dynamo.
If you want to use dynamo methods in python you need to import
from Autodesk.DesignScript.Geometry import *
As you are aware of how to work with Revit.DB elements, here is an example code that works with dynamo elements.
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
def solids_intersect(solid1, solid2):
try:
intersection = Solid.Intersect(solid1, solid2)
if intersection:
return True
except:
pass
return False
input_solid = IN[0]
list_of_solids = IN[1]
intersecting_solids = []
for solid in list_of_solids:
if solids_intersect(input_solid, solid):
intersecting_solids.append(solid)
OUT = intersecting_solids
With the node to code feature you can convert pretty much all dynamo core nodes to designscript code, so working with dynamo elements in python is easier than working with revit elements.